diff options
author | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2006-10-30 14:46:36 +0000 |
---|---|---|
committer | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2006-10-30 14:46:36 +0000 |
commit | 7266f06876c434bebf7d413d9141c2c54908a256 (patch) | |
tree | 71d7b9ebb10d62cefb0251c117c07cf4e54d66ba /sys | |
parent | e38be535be921aef060db439f5a8e1dec74e38e3 (diff) |
Now the primary CPU starts the CMMUs which tied to the secondary CPUs.
Without this, the performance is not good on multi-CPU machine with
non-MULTIPROCESSOR kernel, because the secondary CPUs run on the
never-ending loop without cache.
ok miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/luna88k/luna88k/machdep.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c index 4d86938aa81..2991ee82ffc 100644 --- a/sys/arch/luna88k/luna88k/machdep.c +++ b/sys/arch/luna88k/luna88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.33 2006/05/15 21:40:04 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.34 2006/10/30 14:46:35 aoyama Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -1071,6 +1071,8 @@ luna88k_bootstrap() #ifndef MULTIPROCESSOR cpuid_t master_cpu; #endif + cpuid_t cpu; + extern void m8820x_initialize_cpu(cpuid_t); cmmu = &cmmu8820x; @@ -1095,6 +1097,20 @@ luna88k_bootstrap() set_cpu_number(master_cpu); /* + * On the luna88k, secondary processors are not disabled while the + * kernel is initializing. We just initialized the CMMUs tied to the + * currently-running CPU; initialize the others with similar settings + * here as well. + */ + for (cpu = 0; cpu < max_cpus; cpu++) { + if (cpu == master_cpu) + continue; + if (m88k_cpus[cpu].ci_alive == 0) + continue; + m8820x_initialize_cpu(cpu); + } + + /* * Now that set_cpu_number() set us with a valid cpu_info pointer, * we need to initialize p_addr and curpcb before autoconf, for the * fault handler to behave properly [except for badaddr() faults, |