diff options
author | Zhang Rui <rui.zhang@intel.com> | 2008-04-29 02:35:56 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2008-07-16 17:27:01 -0400 |
commit | b62b8ef906cdf7115af579ce7378886ce3e0ce00 (patch) | |
tree | 9017eff86e7a8d22a88d92df88021f01162d7e0e | |
parent | 26d46867b7d27f68a446b073dac7817721ae4c8f (diff) |
force offline the processor during hot-removal
The ACPI device node for the cpu has already been unregistered
when acpi_processor_handle_eject is called.
Thus we should offline the cpu and continue, rather than a failure here.
http://bugzilla.kernel.org/show_bug.cgi?id=9772
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | drivers/acpi/processor_core.c | 6 | ||||
-rw-r--r-- | kernel/cpu.c | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 9dd0fa93b9e1..1c0008edccda 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -1014,9 +1014,9 @@ static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu) | |||
1014 | 1014 | ||
1015 | static int acpi_processor_handle_eject(struct acpi_processor *pr) | 1015 | static int acpi_processor_handle_eject(struct acpi_processor *pr) |
1016 | { | 1016 | { |
1017 | if (cpu_online(pr->id)) { | 1017 | if (cpu_online(pr->id)) |
1018 | return (-EINVAL); | 1018 | cpu_down(pr->id); |
1019 | } | 1019 | |
1020 | arch_unregister_cpu(pr->id); | 1020 | arch_unregister_cpu(pr->id); |
1021 | acpi_unmap_lsapic(pr->id); | 1021 | acpi_unmap_lsapic(pr->id); |
1022 | return (0); | 1022 | return (0); |
diff --git a/kernel/cpu.c b/kernel/cpu.c index b11f06dc149a..cfb1d43ab801 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -299,6 +299,7 @@ int __ref cpu_down(unsigned int cpu) | |||
299 | cpu_maps_update_done(); | 299 | cpu_maps_update_done(); |
300 | return err; | 300 | return err; |
301 | } | 301 | } |
302 | EXPORT_SYMBOL(cpu_down); | ||
302 | #endif /*CONFIG_HOTPLUG_CPU*/ | 303 | #endif /*CONFIG_HOTPLUG_CPU*/ |
303 | 304 | ||
304 | /* Requires cpu_add_remove_lock to be held */ | 305 | /* Requires cpu_add_remove_lock to be held */ |