Index: sys/amd64/acpica/acpi_wakeup.c =================================================================== --- sys/amd64/acpica/acpi_wakeup.c (revision 223140) +++ sys/amd64/acpica/acpi_wakeup.c (working copy) @@ -226,7 +226,8 @@ return (ret); #ifdef SMP - wakeup_cpus = PCPU_GET(other_cpus); + wakeup_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &wakeup_cpus); #endif AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); Index: sys/amd64/amd64/vm_machdep.c =================================================================== --- sys/amd64/amd64/vm_machdep.c (revision 223140) +++ sys/amd64/amd64/vm_machdep.c (working copy) @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include @@ -535,8 +534,8 @@ u_int cnt; if (smp_active) { - sched_pin(); - map = PCPU_GET(other_cpus); + map = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &map); CPU_NAND(&map, &stopped_cpus); if (!CPU_EMPTY(&map)) { printf("cpu_reset: Stopping other CPUs\n"); @@ -545,7 +544,6 @@ if (PCPU_GET(cpuid) != 0) { cpu_reset_proxyid = PCPU_GET(cpuid); - sched_unpin(); cpustop_restartfunc = cpu_reset_proxy; cpu_reset_proxy_active = 0; printf("cpu_reset: Restarting BSP\n"); @@ -564,8 +562,7 @@ while (1); /* NOTREACHED */ - } else - sched_unpin(); + } DELAY(1000000); } Index: sys/amd64/amd64/mp_machdep.c =================================================================== --- sys/amd64/amd64/mp_machdep.c (revision 223140) +++ sys/amd64/amd64/mp_machdep.c (working copy) @@ -604,7 +604,7 @@ void init_secondary(void) { - cpuset_t tcpuset, tallcpus; + cpuset_t tcpuset; struct pcpu *pc; struct nmi_pcpu *np; u_int64_t msr, cr0; @@ -743,11 +743,6 @@ if (cpu_logical > 1 && PCPU_GET(apic_id) % cpu_logical != 0) CPU_OR(&logical_cpus_mask, &tcpuset); - /* Build our map of 'other' CPUs. */ - tallcpus = all_cpus; - CPU_NAND(&tallcpus, &tcpuset); - PCPU_SET(other_cpus, tallcpus); - if (bootverbose) lapic_dump("AP"); @@ -893,7 +888,6 @@ static int start_all_aps(void) { - cpuset_t tallcpus, tcpuset; vm_offset_t va = boot_address + KERNBASE; u_int64_t *pt4, *pt3, *pt2; u_int32_t mpbioswarmvec; @@ -961,12 +955,6 @@ CPU_SET(cpu, &all_cpus); /* record AP in CPU map */ } - /* build our map of 'other' CPUs */ - tallcpus = all_cpus; - tcpuset = PCPU_GET(cpumask); - CPU_NAND(&tallcpus, &tcpuset); - PCPU_SET(other_cpus, tallcpus); - /* restore the warmstart vector */ *(u_int32_t *) WARMBOOT_OFF = mpbioswarmvec; @@ -1349,11 +1337,13 @@ void ipi_all_but_self(u_int ipi) { + cpuset_t other_cpus; - sched_pin(); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); + if (IPI_IS_BITMAPED(ipi)) { - ipi_selected(PCPU_GET(other_cpus), ipi); - sched_unpin(); + ipi_selected(other_cpus, ipi); return; } @@ -1363,8 +1353,7 @@ * Set the mask of receiving CPUs for this purpose. */ if (ipi == IPI_STOP_HARD) - CPU_OR_ATOMIC(&ipi_nmi_pending, PCPU_PTR(other_cpus)); - sched_unpin(); + CPU_OR_ATOMIC(&ipi_nmi_pending, &other_cpus); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); Index: sys/amd64/amd64/pmap.c =================================================================== --- sys/amd64/amd64/pmap.c (revision 223140) +++ sys/amd64/amd64/pmap.c (working copy) @@ -933,7 +933,8 @@ smp_invlpg(va); } else { cpumask = PCPU_GET(cpumask); - other_cpus = PCPU_GET(other_cpus); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); if (CPU_OVERLAP(&pmap->pm_active, &cpumask)) invlpg(va); CPU_AND(&other_cpus, &pmap->pm_active); @@ -956,7 +957,8 @@ smp_invlpg_range(sva, eva); } else { cpumask = PCPU_GET(cpumask); - other_cpus = PCPU_GET(other_cpus); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); if (CPU_OVERLAP(&pmap->pm_active, &cpumask)) for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); @@ -978,7 +980,8 @@ smp_invltlb(); } else { cpumask = PCPU_GET(cpumask); - other_cpus = PCPU_GET(other_cpus); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); if (CPU_OVERLAP(&pmap->pm_active, &cpumask)) invltlb(); CPU_AND(&other_cpus, &pmap->pm_active); @@ -1048,7 +1051,8 @@ sched_pin(); cpumask = PCPU_GET(cpumask); - other_cpus = PCPU_GET(other_cpus); + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); if (pmap == kernel_pmap) active = all_cpus; else