]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: bus: Avoid using CPPC if not supported by firmware
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 16 Mar 2022 12:39:03 +0000 (13:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:10:44 +0000 (15:10 +0200)
commit895885122cf3a62ed00c6283b05279a135b81273
treeffa7770c2862fe91c82b15fa999c3a24e03c0a71
parentb48ba8089d267eaa7748a71685aac41ee108d9b1
ACPI: bus: Avoid using CPPC if not supported by firmware

[ Upstream commit c42fa24b44751c62c86e98430ef915c0609a2ab8 ]

If the platform firmware indicates that it does not support CPPC by
clearing the OSC_SB_CPC_SUPPORT and OSC_SB_CPCV2_SUPPORT bits in the
platform _OSC capabilities mask, avoid attempting to evaluate _CPC
which may fail in that case.

Because the OSC_SB_CPC_SUPPORT and OSC_SB_CPCV2_SUPPORT bits are only
added to the supported platform capabilities mask on x86, when
X86_FEATURE_HWP is supported, allow _CPC to be evaluated regardless
in the other cases.

Link: https://lore.kernel.org/linux-acpi/CAJZ5v0i=ecAksq0TV+iLVObm-=fUfdqPABzzkgm9K6KxO1ZCcg@mail.gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Stable-dep-of: 60949b7b8054 ("ACPI: CPPC: Fix MASK_VAL() usage")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/bus.c
drivers/acpi/cppc_acpi.c
include/linux/acpi.h