]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
force offline the processor during hot-removal
authorZhang Rui <rui.zhang@intel.com>
Tue, 29 Apr 2008 06:35:56 +0000 (02:35 -0400)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 16 Jul 2008 21:27:01 +0000 (23:27 +0200)
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>
drivers/acpi/processor_core.c
kernel/cpu.c

index 9dd0fa93b9e1c1e2a9bd459638918ba47c25125e..1c0008edccdaba616da88da593d1b1ce06d4eaa0 100644 (file)
@@ -1014,9 +1014,9 @@ static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu)
 
 static int acpi_processor_handle_eject(struct acpi_processor *pr)
 {
-       if (cpu_online(pr->id)) {
-               return (-EINVAL);
-       }
+       if (cpu_online(pr->id))
+               cpu_down(pr->id);
+
        arch_unregister_cpu(pr->id);
        acpi_unmap_lsapic(pr->id);
        return (0);
index b11f06dc149add3a29c072e2ec9356499dd9dbc1..cfb1d43ab801b69f24c47c0cdb17332c25f6f99e 100644 (file)
@@ -299,6 +299,7 @@ int __ref cpu_down(unsigned int cpu)
        cpu_maps_update_done();
        return err;
 }
+EXPORT_SYMBOL(cpu_down);
 #endif /*CONFIG_HOTPLUG_CPU*/
 
 /* Requires cpu_add_remove_lock to be held */