Skip to content

Commit

Permalink
force offline the processor during hot-removal
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhang Rui authored and Andi Kleen committed Jul 16, 2008
1 parent 26d4686 commit b62b8ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit b62b8ef

Please sign in to comment.