diff options
author | Li Shaohua <shaohua.li@intel.com> | 2005-06-25 17:54:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:30 -0400 |
commit | e1367daf3eed5cd619ee88c9907e1e6ddaa58406 (patch) | |
tree | dce60efefba356e0a914669587586a6174e41b94 /arch/i386/kernel/cpu/common.c | |
parent | 0bb3184df537002a742bafddf3f4fb482b7fe610 (diff) |
[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>
Diffstat (limited to 'arch/i386/kernel/cpu/common.c')
-rw-r--r-- | arch/i386/kernel/cpu/common.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index aac74758caf4..2203a9d20212 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -651,3 +651,15 @@ void __devinit cpu_init(void) | |||
651 | clear_used_math(); | 651 | clear_used_math(); |
652 | mxcsr_feature_mask_init(); | 652 | mxcsr_feature_mask_init(); |
653 | } | 653 | } |
654 | |||
655 | #ifdef CONFIG_HOTPLUG_CPU | ||
656 | void __devinit cpu_uninit(void) | ||
657 | { | ||
658 | int cpu = raw_smp_processor_id(); | ||
659 | cpu_clear(cpu, cpu_initialized); | ||
660 | |||
661 | /* lazy TLB state */ | ||
662 | per_cpu(cpu_tlbstate, cpu).state = 0; | ||
663 | per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm; | ||
664 | } | ||
665 | #endif | ||