diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-07-01 12:54:29 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-07-03 00:13:24 +0200 |
commit | c95b7595f85c688d5c569ddbbd6ab6a4bdae2f36 (patch) | |
tree | f94c10c0c704e8b847389127f90d93e6887d97d2 /include/linux/acpi.h | |
parent | 3cd7957e85e67120bb9f6bfb75d81dcc19af282b (diff) | |
download | lwn-c95b7595f85c688d5c569ddbbd6ab6a4bdae2f36.tar.gz lwn-c95b7595f85c688d5c569ddbbd6ab6a4bdae2f36.zip |
ACPI: PM: Introduce "poweroff" callbacks for ACPI PM domain and LPSS
In general, it is not correct to call pm_generic_suspend(),
pm_generic_suspend_late() and pm_generic_suspend_noirq() during the
hibernation's "poweroff" transition, because device drivers may
provide special callbacks to be invoked then and the wrappers in
question cause system suspend callbacks to be run. Unfortunately,
that happens in the ACPI PM domain and ACPI LPSS.
To address this potential issue, introduce "poweroff" callbacks
for the ACPI PM and LPSS that will use pm_generic_poweroff(),
pm_generic_poweroff_late() and pm_generic_poweroff_noirq() as
appropriate.
Fixes: 05087360fd7a (ACPI / PM: Take SMART_SUSPEND driver flag into account)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index ea7415440901..22840633c28c 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -920,6 +920,7 @@ int acpi_subsys_suspend_late(struct device *dev); int acpi_subsys_suspend_noirq(struct device *dev); int acpi_subsys_suspend(struct device *dev); int acpi_subsys_freeze(struct device *dev); +int acpi_subsys_poweroff(struct device *dev); #else static inline int acpi_dev_resume_early(struct device *dev) { return 0; } static inline int acpi_subsys_prepare(struct device *dev) { return 0; } @@ -928,6 +929,7 @@ static inline int acpi_subsys_suspend_late(struct device *dev) { return 0; } static inline int acpi_subsys_suspend_noirq(struct device *dev) { return 0; } static inline int acpi_subsys_suspend(struct device *dev) { return 0; } static inline int acpi_subsys_freeze(struct device *dev) { return 0; } +static inline int acpi_subsys_poweroff(struct device *dev) { return 0; } #endif #ifdef CONFIG_ACPI |