aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-03-03 12:13:05 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:56 -0400
commit045f9d22029e94d6609d46f8ee07c63f4693dfb3 (patch)
tree2eea11b017c1614d5de9138d78436e1e3759bcdc
parentfc25da9ec6c910976b76c70f7604a838679f75b2 (diff)
x86: use remove_from_maps in cpu_disable
it is already used in x86_64. In i386, it only removes from cpu_online_map Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/smpboot_32.c7
-rw-r--r--arch/x86/kernel/smpboot_64.c8
2 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index a58ca7f18013..4939b3a01b24 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -1041,6 +1041,11 @@ void __init native_smp_prepare_boot_cpu(void)
1041} 1041}
1042 1042
1043#ifdef CONFIG_HOTPLUG_CPU 1043#ifdef CONFIG_HOTPLUG_CPU
1044static void __ref remove_cpu_from_maps(int cpu)
1045{
1046 cpu_clear(cpu, cpu_online_map);
1047}
1048
1044int __cpu_disable(void) 1049int __cpu_disable(void)
1045{ 1050{
1046 cpumask_t map = cpu_online_map; 1051 cpumask_t map = cpu_online_map;
@@ -1066,7 +1071,7 @@ int __cpu_disable(void)
1066 1071
1067 remove_siblinginfo(cpu); 1072 remove_siblinginfo(cpu);
1068 1073
1069 cpu_clear(cpu, map); 1074 remove_cpu_from_maps(cpu);
1070 fixup_irqs(map); 1075 fixup_irqs(map);
1071 /* It's now safe to remove this processor from the online map */ 1076 /* It's now safe to remove this processor from the online map */
1072 cpu_clear(cpu, cpu_online_map); 1077 cpu_clear(cpu, cpu_online_map);
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
index ca3a3c5b64fe..6509d3c1b3df 100644
--- a/arch/x86/kernel/smpboot_64.c
+++ b/arch/x86/kernel/smpboot_64.c
@@ -838,10 +838,9 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
838} 838}
839 839
840#ifdef CONFIG_HOTPLUG_CPU 840#ifdef CONFIG_HOTPLUG_CPU
841static void __ref remove_cpu_from_maps(void) 841static void __ref remove_cpu_from_maps(int cpu)
842{ 842{
843 int cpu = smp_processor_id(); 843 cpu_clear(cpu, cpu_online_map);
844
845 cpu_clear(cpu, cpu_callout_map); 844 cpu_clear(cpu, cpu_callout_map);
846 cpu_clear(cpu, cpu_callin_map); 845 cpu_clear(cpu, cpu_callin_map);
847 clear_bit(cpu, (unsigned long *)&cpu_initialized); /* was set by cpu_init() */ 846 clear_bit(cpu, (unsigned long *)&cpu_initialized); /* was set by cpu_init() */
@@ -880,8 +879,7 @@ int __cpu_disable(void)
880 remove_siblinginfo(cpu); 879 remove_siblinginfo(cpu);
881 880
882 /* It's now safe to remove this processor from the online map */ 881 /* It's now safe to remove this processor from the online map */
883 cpu_clear(cpu, cpu_online_map); 882 remove_cpu_from_maps(cpu);
884 remove_cpu_from_maps();
885 fixup_irqs(cpu_online_map); 883 fixup_irqs(cpu_online_map);
886 return 0; 884 return 0;
887} 885}