]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ACPI: processor idle: Check for architectural support for LPI
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 25 Feb 2022 19:06:46 +0000 (13:06 -0600)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 10:00:34 +0000 (12:00 +0200)
commit6e491f032611520b6e40d310fc7fe2238d4e6d9f
treebc16582ebca2fa6d8786e50af73250ea93ecdfdf
parentd17a0f698080382abf3166e3514acf5fa716c746
ACPI: processor idle: Check for architectural support for LPI

BugLink: https://bugs.launchpad.net/bugs/1969857
commit eb087f305919ee8169ad65665610313e74260463 upstream.

When `osc_pc_lpi_support_confirmed` is set through `_OSC` and `_LPI` is
populated then the cpuidle driver assumes that LPI is fully functional.

However currently the kernel only provides architectural support for LPI
on ARM.  This leads to high power consumption on X86 platforms that
otherwise try to enable LPI.

So probe whether or not LPI support is implemented before enabling LPI in
the kernel.  This is done by overloading `acpi_processor_ffh_lpi_probe` to
check whether it returns `-EOPNOTSUPP`. It also means that all future
implementations of `acpi_processor_ffh_lpi_probe` will need to follow
these semantics as well.

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/acpi/processor_idle.c