diff options
author | jhb <jhb@FreeBSD.org> | 2001-12-17 23:14:35 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-12-17 23:14:35 +0000 |
commit | 05dfe86282654dc55f5734b34dd8ba1d6a880593 (patch) | |
tree | 5f040bf85ca01ca4f0c71f66e7018c3df052e911 /sys/alpha | |
parent | 67e3e37c96fe507d9be6a6fc7b6b948582fbf62c (diff) | |
download | FreeBSD-src-05dfe86282654dc55f5734b34dd8ba1d6a880593.zip FreeBSD-src-05dfe86282654dc55f5734b34dd8ba1d6a880593.tar.gz |
Small cleanups to the SMP code:
- Axe inlvtlb_ok as it was completely redundant with smp_active.
- Remove references to non-existent variable and non-existent file
in i386/include/smp.h.
- Don't perform initializations local to each CPU while holding the
ap boot lock on i386 while an AP bootstraps itself.
- Reorganize the AP startup code some to unify the latter half of the
functions to bring an AP up. Eventually this might be broken out into
a MI function in subr_smp.c.
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/mp_machdep.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/alpha/alpha/mp_machdep.c b/sys/alpha/alpha/mp_machdep.c index 40257c1..f15e130 100644 --- a/sys/alpha/alpha/mp_machdep.c +++ b/sys/alpha/alpha/mp_machdep.c @@ -153,14 +153,6 @@ smp_init_secondary(void) (void)alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH); mc_expected = 0; - /* - * Set curproc to our per-cpu idleproc so that mutexes have - * something unique to lock with. - * - * XXX: shouldn't this already be set for us? - */ - PCPU_SET(curthread, PCPU_GET(idlethread)); - /* * Set flags in our per-CPU slot in the HWRPB. */ @@ -187,8 +179,9 @@ smp_init_secondary(void) smp_cpus++; - CTR0(KTR_SMP, "smp_init_secondary"); + CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", PCPU_GET(cpuid)); + /* Build our map of 'other' CPUs. */ PCPU_SET(other_cpus, all_cpus & ~(1 << PCPU_GET(cpuid))); printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); @@ -201,17 +194,16 @@ smp_init_secondary(void) mtx_unlock_spin(&ap_boot_mtx); while (smp_started == 0) - alpha_mb(); /* nothing */ + ; /* nothing */ microuptime(PCPU_PTR(switchtime)); PCPU_SET(switchticks, ticks); /* ok, now grab sched_lock and enter the scheduler */ - (void)alpha_pal_swpipl(ALPHA_PSL_IPL_0); mtx_lock_spin(&sched_lock); cpu_throw(); /* doesn't return */ - panic("scheduler returned us to " __func__); + panic("scheduler returned us to %s", __func__); } static int |