diff options
author | obrien <obrien@FreeBSD.org> | 2002-09-30 07:03:16 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-09-30 07:03:16 +0000 |
commit | 9d71de259777438be45c94d5ebda3d0653eba29c (patch) | |
tree | 792776138902270118c8505d6c664e2d4e69ca34 /sys/i386 | |
parent | ce49c7b7967169976010377237850e93ad91a61a (diff) | |
download | FreeBSD-src-9d71de259777438be45c94d5ebda3d0653eba29c.zip FreeBSD-src-9d71de259777438be45c94d5ebda3d0653eba29c.tar.gz |
Only print out the "SMP: AP CPU #N Launched!" message on verbose boots.
The kernel printf() isn't race-free
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/mp_machdep.c | 8 | ||||
-rw-r--r-- | sys/i386/i386/mptable.c | 8 | ||||
-rw-r--r-- | sys/i386/include/mptable.h | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index 42651f4..c23f699 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -2487,18 +2487,18 @@ ap_init(void) mtx_lock_spin(&ap_boot_mtx); - CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", PCPU_GET(cpuid)); - smp_cpus++; + CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", PCPU_GET(cpuid)); + if (bootverbose) + printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); + /* Build our map of 'other' CPUs. */ PCPU_SET(other_cpus, all_cpus & ~PCPU_GET(cpumask)); if (bootverbose) apic_dump("ap_init()"); - printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); - if (smp_cpus == mp_ncpus) { /* enable IPI's, tlb shootdown, freezes etc */ atomic_store_rel_int(&smp_started, 1); diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index 42651f4..c23f699 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -2487,18 +2487,18 @@ ap_init(void) mtx_lock_spin(&ap_boot_mtx); - CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", PCPU_GET(cpuid)); - smp_cpus++; + CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", PCPU_GET(cpuid)); + if (bootverbose) + printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); + /* Build our map of 'other' CPUs. */ PCPU_SET(other_cpus, all_cpus & ~PCPU_GET(cpumask)); if (bootverbose) apic_dump("ap_init()"); - printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); - if (smp_cpus == mp_ncpus) { /* enable IPI's, tlb shootdown, freezes etc */ atomic_store_rel_int(&smp_started, 1); diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index 42651f4..c23f699 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -2487,18 +2487,18 @@ ap_init(void) mtx_lock_spin(&ap_boot_mtx); - CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", PCPU_GET(cpuid)); - smp_cpus++; + CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", PCPU_GET(cpuid)); + if (bootverbose) + printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); + /* Build our map of 'other' CPUs. */ PCPU_SET(other_cpus, all_cpus & ~PCPU_GET(cpumask)); if (bootverbose) apic_dump("ap_init()"); - printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); - if (smp_cpus == mp_ncpus) { /* enable IPI's, tlb shootdown, freezes etc */ atomic_store_rel_int(&smp_started, 1); |