Remove the usage of pc_other_cpus from amd64.
Tested by: pluknet
This commit is contained in:
parent
49ea5c076c
commit
2e4cefa632
@ -226,7 +226,8 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
|
||||
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));
|
||||
|
@ -604,7 +604,7 @@ cpu_mp_announce(void)
|
||||
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 @@ init_secondary(void)
|
||||
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 @@ assign_cpu_ids(void)
|
||||
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 @@ start_all_aps(void)
|
||||
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 @@ ipi_cpu(int cpu, u_int ipi)
|
||||
void
|
||||
ipi_all_but_self(u_int ipi)
|
||||
{
|
||||
cpuset_t other_cpus;
|
||||
|
||||
other_cpus = all_cpus;
|
||||
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
|
||||
|
||||
sched_pin();
|
||||
if (IPI_IS_BITMAPED(ipi)) {
|
||||
ipi_selected(PCPU_GET(other_cpus), ipi);
|
||||
sched_unpin();
|
||||
ipi_selected(other_cpus, ipi);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1363,8 +1353,7 @@ ipi_all_but_self(u_int ipi)
|
||||
* 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);
|
||||
|
@ -933,7 +933,8 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va)
|
||||
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 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
|
||||
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 @@ pmap_invalidate_all(pmap_t pmap)
|
||||
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 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde)
|
||||
|
||||
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
|
||||
|
@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/pioctl.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sched.h>
|
||||
#include <sys/sf_buf.h>
|
||||
#include <sys/smp.h>
|
||||
#include <sys/sysctl.h>
|
||||
@ -535,8 +534,8 @@ cpu_reset()
|
||||
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 @@ cpu_reset()
|
||||
|
||||
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 @@ cpu_reset()
|
||||
|
||||
while (1);
|
||||
/* NOTREACHED */
|
||||
} else
|
||||
sched_unpin();
|
||||
}
|
||||
|
||||
DELAY(1000000);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user