]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:23:09 +0000 (09:23 +0200)
commit5d131318bb8765839e45c0e55fd1f57483e62a50
tree1d214297c2bc2d84d76edb0ed35d1ae1f545d50f
parent503934df3108c75bb4f913c6d483df2ae2c3eff0
ACPI: processor idle: Check for architectural support for LPI

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>
drivers/acpi/processor_idle.c