diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-12-29 15:25:35 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-12-29 15:25:35 +0100 |
commit | d22ddcbc4fb7a483d0721eddfda3f0558821d372 (patch) | |
tree | 9f3623f9faac8a7d4e1aac59e51123187fb94925 /include/acpi | |
parent | bfecc2b3e34c6751343bacd317c4dfd1d695142c (diff) | |
download | linux-stable-d22ddcbc4fb7a483d0721eddfda3f0558821d372.tar.gz linux-stable-d22ddcbc4fb7a483d0721eddfda3f0558821d372.tar.bz2 linux-stable-d22ddcbc4fb7a483d0721eddfda3f0558821d372.zip |
ACPI / hotplug: Add demand_offline hotplug profile flag
Add a new ACPI hotplug profile flag, demand_offline, such that if
set for the given ACPI device object's scan handler, it will cause
acpi_scan_hot_remove() to check if that device object's physical
companions are offline upfront and fail the hot removal if that
is not the case.
That flag will be useful to overcome a problem with containers on
some system where they can only be hot-removed after some cleanup
operations carried out by user space, which needs to be notified
of the container hot-removal before the kernel attempts to offline
devices in the container. In those cases the current implementation
of acpi_scan_hot_remove() is not sufficient, because it first tries
to offline the devices in the container and only if that is
suffcessful it tries to offline the container itself. As a result,
the container hot-removal notification is not delivered to user space
at the right time.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 7135fe3d6daa..48d302501539 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -91,8 +91,9 @@ struct acpi_device; struct acpi_hotplug_profile { struct kobject kobj; - bool enabled:1; int (*scan_dependent)(struct acpi_device *adev); + bool enabled:1; + bool demand_offline:1; }; static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile( |