]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 28 Dec 2022 21:24:10 +0000 (22:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:22:46 +0000 (10:22 +0200)
commit73b4cbed9176a4009bb3cb9b04e46f8163f6e452
treeeb6dcbc3b616e40c4f280dcbbc617b198a270b5a
parentcd031669682ec0c4653cfd223644e1ec98a80179
ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily

commit 99387b016022c29234c4ebf9abd34358c6e56532 upstream.

Modify acpi_processor_get_platform_limit() to avoid updating its
frequency QoS request when the _PPC return value has not changed
by comparing that value to the previous _PPC return value stored in
the performance_platform_limit field of the struct acpi_processor
corresponding to the given CPU.

While at it, do the _PPC return value check against the state count
earlier, to avoid setting performance_platform_limit to an invalid
value, and make acpi_processor_ppc_init() use FREQ_QOS_MAX_DEFAULT_VALUE
as the "no limit" frequency QoS for consistency.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Hagar Hemdan <hagarhem@amazon.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/processor_perflib.c