diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-05-02 18:26:16 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-05-12 08:14:24 -0400 |
commit | 683058e315f00a216fd6c79df4f63bc9945ca434 (patch) | |
tree | e4b143220938ebb24a7bf72f286f275090b2afef /drivers/acpi/internal.h | |
parent | 0902a9044fa5b7a0456ea4daacec2c2b3189ba8c (diff) |
ACPI / hotplug: Use device offline/online for graceful hot-removal
Modify the generic ACPI hotplug code to be able to check if devices
scheduled for hot-removal may be gracefully removed from the system
using the device offline/online mechanism introduced previously.
Namely, make acpi_scan_hot_remove() handling device hot-removal call
device_offline() for all physical companions of the ACPI device nodes
involved in the operation and check the results. If any of the
device_offline() calls fails, the function will not progress to the
removal phase (which cannot be aborted), unless its (new) force
argument is set (in case of a failing offline it will put the devices
offlined by it back online).
In support of 'forced' device hot-removal, add a new sysfs attribute
'force_remove' that will reside under /sys/firmware/acpi/hotplug/.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'drivers/acpi/internal.h')
-rw-r--r-- | drivers/acpi/internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 6f1afd9118c8..4548f0a114ce 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h | |||
@@ -47,6 +47,8 @@ void acpi_memory_hotplug_init(void); | |||
47 | static inline void acpi_memory_hotplug_init(void) {} | 47 | static inline void acpi_memory_hotplug_init(void) {} |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | extern bool acpi_force_hot_remove; | ||
51 | |||
50 | void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, | 52 | void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, |
51 | const char *name); | 53 | const char *name); |
52 | int acpi_scan_add_handler_with_hotplug(struct acpi_scan_handler *handler, | 54 | int acpi_scan_add_handler_with_hotplug(struct acpi_scan_handler *handler, |