[PATCH] cpu state clean after hot remove

Clean CPU states in order to reuse smp boot code for CPU hotplug.

Signed-off-by: Li Shaohua<shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Li Shaohua
2005-06-25 14:54:56 -07:00
committed by Linus Torvalds
parent 0bb3184df5
commit e1367daf3e
7 changed files with 186 additions and 42 deletions

View File

@@ -651,3 +651,15 @@ void __devinit cpu_init(void)
clear_used_math();
mxcsr_feature_mask_init();
}
#ifdef CONFIG_HOTPLUG_CPU
void __devinit cpu_uninit(void)
{
int cpu = raw_smp_processor_id();
cpu_clear(cpu, cpu_initialized);
/* lazy TLB state */
per_cpu(cpu_tlbstate, cpu).state = 0;
per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
}
#endif