diff options
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
| -rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 00e99f9df192..96ed0a2cc3ba 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -140,6 +140,10 @@ cpu_mp_start(void)  	setidt(IPI_STOP, pti ? IDTVEC(cpustop_pti) : IDTVEC(cpustop),  	    SDT_SYSIGT, SEL_KPL, 0); +	/* Install an inter-CPU IPI for CPU offline */ +	setidt(IPI_OFF, pti ? IDTVEC(cpuoff_pti) : IDTVEC(cpuoff), +	    SDT_SYSIGT, SEL_KPL, 0); +  	/* Install an inter-CPU IPI for CPU suspend/resume */  	setidt(IPI_SUSPEND, pti ? IDTVEC(cpususpend_pti) : IDTVEC(cpususpend),  	    SDT_SYSIGT, SEL_KPL, 0); @@ -176,6 +180,15 @@ cpu_mp_start(void)  #endif  } +void +cpu_mp_stop(void) +{ +	cpuset_t other_cpus = all_cpus; + +	CPU_CLR(PCPU_GET(cpuid), &other_cpus); +	offline_cpus(other_cpus); +} +  /*   * AP CPU's call this to initialize themselves.   */ | 
