diff options
author | Toshi Kani <toshi.kani@hp.com> | 2012-05-23 22:25:21 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-06-04 01:09:20 -0400 |
commit | 51af3b9202ccffe0476899d5c29f0ae7e6bfdcea (patch) | |
tree | 01ce04f48c0714ff59919dec488a5312fadaa299 | |
parent | c4753e57b78b213f2384fa0dbafa348b087114fa (diff) |
ACPI: Add _OST support for ACPI CPU hotplug
Changed acpi_processor_hotplug_notify() to call ACPI _OST method
when ACPI CPU hotplug operation has completed.
Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/processor_driver.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 0734086537b8..971c45474703 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -701,9 +701,9 @@ static void acpi_processor_hotplug_notify(acpi_handle handle, | |||
701 | { | 701 | { |
702 | struct acpi_processor *pr; | 702 | struct acpi_processor *pr; |
703 | struct acpi_device *device = NULL; | 703 | struct acpi_device *device = NULL; |
704 | u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */ | ||
704 | int result; | 705 | int result; |
705 | 706 | ||
706 | |||
707 | switch (event) { | 707 | switch (event) { |
708 | case ACPI_NOTIFY_BUS_CHECK: | 708 | case ACPI_NOTIFY_BUS_CHECK: |
709 | case ACPI_NOTIFY_DEVICE_CHECK: | 709 | case ACPI_NOTIFY_DEVICE_CHECK: |
@@ -715,14 +715,18 @@ static void acpi_processor_hotplug_notify(acpi_handle handle, | |||
715 | if (!is_processor_present(handle)) | 715 | if (!is_processor_present(handle)) |
716 | break; | 716 | break; |
717 | 717 | ||
718 | if (acpi_bus_get_device(handle, &device)) { | 718 | if (!acpi_bus_get_device(handle, &device)) |
719 | result = acpi_processor_device_add(handle, &device); | 719 | break; |
720 | if (result) | 720 | |
721 | printk(KERN_ERR PREFIX | 721 | result = acpi_processor_device_add(handle, &device); |
722 | "Unable to add the device\n"); | 722 | if (result) { |
723 | printk(KERN_ERR PREFIX "Unable to add the device\n"); | ||
723 | break; | 724 | break; |
724 | } | 725 | } |
726 | |||
727 | ost_code = ACPI_OST_SC_SUCCESS; | ||
725 | break; | 728 | break; |
729 | |||
726 | case ACPI_NOTIFY_EJECT_REQUEST: | 730 | case ACPI_NOTIFY_EJECT_REQUEST: |
727 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 731 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
728 | "received ACPI_NOTIFY_EJECT_REQUEST\n")); | 732 | "received ACPI_NOTIFY_EJECT_REQUEST\n")); |
@@ -736,15 +740,23 @@ static void acpi_processor_hotplug_notify(acpi_handle handle, | |||
736 | if (!pr) { | 740 | if (!pr) { |
737 | printk(KERN_ERR PREFIX | 741 | printk(KERN_ERR PREFIX |
738 | "Driver data is NULL, dropping EJECT\n"); | 742 | "Driver data is NULL, dropping EJECT\n"); |
739 | return; | 743 | break; |
740 | } | 744 | } |
745 | |||
746 | /* REVISIT: update when eject is supported */ | ||
747 | ost_code = ACPI_OST_SC_EJECT_NOT_SUPPORTED; | ||
741 | break; | 748 | break; |
749 | |||
742 | default: | 750 | default: |
743 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 751 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
744 | "Unsupported event [0x%x]\n", event)); | 752 | "Unsupported event [0x%x]\n", event)); |
745 | break; | 753 | |
754 | /* non-hotplug event; possibly handled by other handler */ | ||
755 | return; | ||
746 | } | 756 | } |
747 | 757 | ||
758 | /* Inform firmware that the hotplug operation has completed */ | ||
759 | (void) acpi_evaluate_hotplug_ost(handle, event, ost_code, NULL); | ||
748 | return; | 760 | return; |
749 | } | 761 | } |
750 | 762 | ||