ACPI: scan: Release PM resources blocked by unused objects
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 9 Oct 2021 14:22:09 +0000 (16:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:15 +0000 (19:16 +0100)
commitcfc1a472a8d89c0d0bbb3600501eeeebc5ec8039
tree0887193742e35bf3cd1facf5eef9d1a6d7f492c2
parent37f2aebf16564c2e8bd3845eea7ad054711e4e96
ACPI: scan: Release PM resources blocked by unused objects

[ Upstream commit c10383e8ddf4810b9a5c1595404c2724d925a0a6 ]

On some systems the ACPI namespace contains device objects that are
not used in certain configurations of the system.  If they start off
in the D0 power state configuration, they will stay in it until the
system reboots, because of the lack of any mechanism possibly causing
their configuration to change.  If that happens, they may prevent
some power resources from being turned off or generally they may
prevent the platform from getting into the deepest low-power states
thus causing some energy to be wasted.

Address this issue by changing the configuration of unused ACPI
device objects to the D3cold power state one after carrying out
the ACPI-based enumeration of devices.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214091
Link: https://lore.kernel.org/linux-acpi/20211007205126.11769-1-mario.limonciello@amd.com/
Reported-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/glue.c
drivers/acpi/internal.h
drivers/acpi/scan.c