Index: sys/i386/i386/pmap.c =================================================================== --- sys/i386/i386/pmap.c (revision 211102) +++ sys/i386/i386/pmap.c (working copy) @@ -949,8 +949,7 @@ pmap_update_pde_invalidate(vm_offset_t va, pd_entr void pmap_invalidate_page(pmap_t pmap, vm_offset_t va) { - u_int cpumask; - u_int other_cpus; + cpumask_t cpumask, other_cpus; sched_pin(); if (pmap == kernel_pmap || pmap->pm_active == all_cpus) { @@ -970,8 +969,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) void pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - u_int cpumask; - u_int other_cpus; + cpumask_t cpumask, other_cpus; vm_offset_t addr; sched_pin(); @@ -995,8 +993,7 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva void pmap_invalidate_all(pmap_t pmap) { - u_int cpumask; - u_int other_cpus; + cpumask_t cpumask, other_cpus; sched_pin(); if (pmap == kernel_pmap || pmap->pm_active == all_cpus) { Index: sys/i386/i386/mp_machdep.c =================================================================== --- sys/i386/i386/mp_machdep.c (revision 211102) +++ sys/i386/i386/mp_machdep.c (working copy) @@ -174,7 +174,7 @@ static u_long *ipi_statclock_counts[MAXCPU]; * Local data and functions. */ -static u_int logical_cpus; +static cpumask_t logical_cpus; static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ @@ -210,8 +210,8 @@ static int start_all_aps(void); static int start_ap(int apic_id); static void release_aps(void *dummy); -static int hlt_logical_cpus; -static u_int hyperthreading_cpus; +static cpumask_t hlt_logical_cpus; +static cpumask_t hyperthreading_cpus; static cpumask_t hyperthreading_cpus_mask; static int hyperthreading_allowed = 1; static struct sysctl_ctx_list logical_cpu_clist; @@ -1424,9 +1424,12 @@ ipi_nmi_handler() void cpustop_handler(void) { - int cpu = PCPU_GET(cpuid); - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; + u_int cpu; + cpu = PCPU_GET(cpuid); + cpumask = PCPU_GET(cpumask); + savectx(&stoppcbs[cpu]); /* Indicate that we are stopped */ @@ -1593,13 +1596,15 @@ SYSINIT(cpu_hlt, SI_SUB_SMP, SI_ORDER_ANY, cpu_hlt int mp_grab_cpu_hlt(void) { - u_int mask = PCPU_GET(cpumask); + cpuset_t mask; #ifdef MP_WATCHDOG - u_int cpuid = PCPU_GET(cpuid); + u_int cpuid; #endif int retval; + mask = PCPU_GET(cpumask); #ifdef MP_WATCHDOG + cpuid = PCPU_GET(cpuid); ap_watchdog(cpuid); #endif Index: sys/amd64/amd64/pmap.c =================================================================== --- sys/amd64/amd64/pmap.c (revision 211102) +++ sys/amd64/amd64/pmap.c (working copy) @@ -926,8 +926,7 @@ pmap_update_pde_invalidate(vm_offset_t va, pd_entr void pmap_invalidate_page(pmap_t pmap, vm_offset_t va) { - u_int cpumask; - u_int other_cpus; + cpumask_t cpumask, other_cpus; sched_pin(); if (pmap == kernel_pmap || pmap->pm_active == all_cpus) { @@ -947,8 +946,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) void pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - u_int cpumask; - u_int other_cpus; + cpumask_t cpumask, other_cpus; vm_offset_t addr; sched_pin(); @@ -972,8 +970,7 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva void pmap_invalidate_all(pmap_t pmap) { - u_int cpumask; - u_int other_cpus; + cpumask_t cpumask, other_cpus; sched_pin(); if (pmap == kernel_pmap || pmap->pm_active == all_cpus) { Index: sys/amd64/amd64/mp_machdep.c =================================================================== --- sys/amd64/amd64/mp_machdep.c (revision 211102) +++ sys/amd64/amd64/mp_machdep.c (working copy) @@ -127,7 +127,7 @@ extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast * Local data and functions. */ -static u_int logical_cpus; +static cpumask_t logical_cpus; static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ @@ -162,8 +162,8 @@ static int start_all_aps(void); static int start_ap(int apic_id); static void release_aps(void *dummy); -static int hlt_logical_cpus; -static u_int hyperthreading_cpus; +static cpumask_t hlt_logical_cpus; +static cpumask_t hyperthreading_cpus; static cpumask_t hyperthreading_cpus_mask; static int hyperthreading_allowed = 1; static struct sysctl_ctx_list logical_cpu_clist; @@ -1337,9 +1337,12 @@ ipi_nmi_handler() void cpustop_handler(void) { - int cpu = PCPU_GET(cpuid); - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; + u_int cpu; + cpu = PCPU_GET(cpuid); + cpumask = PCPU_GET(cpumask); + savectx(&stoppcbs[cpu]); /* Indicate that we are stopped */ @@ -1365,10 +1368,13 @@ cpustop_handler(void) void cpususpend_handler(void) { + cpumask_t cpumask; register_t cr3, rf; - int cpu = PCPU_GET(cpuid); - int cpumask = PCPU_GET(cpumask); + u_int cpu; + cpu = PCPU_GET(cpuid); + cpumask = PCPU_GET(cpumask); + rf = intr_disable(); cr3 = rcr3(); @@ -1539,13 +1545,15 @@ SYSINIT(cpu_hlt, SI_SUB_SMP, SI_ORDER_ANY, cpu_hlt int mp_grab_cpu_hlt(void) { - u_int mask = PCPU_GET(cpumask); + cpuset_t mask; #ifdef MP_WATCHDOG - u_int cpuid = PCPU_GET(cpuid); + u_int cpuid; #endif int retval; + mask = PCPU_GET(cpumask); #ifdef MP_WATCHDOG + cpuid = PCPU_GET(cpuid); ap_watchdog(cpuid); #endif