Patch "ACPI: bus: Set CPPC _OSC bits for all and when CPPC_LIB is supported" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ACPI: bus: Set CPPC _OSC bits for all and when CPPC_LIB is supported

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     acpi-bus-set-cppc-_osc-bits-for-all-and-when-cppc_li.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2fe8ea4913493b66bd05600db9241d3cd4d5af4a
Author: Pierre Gondois <pierre.gondois@xxxxxxx>
Date:   Wed May 18 11:08:58 2022 +0200

    ACPI: bus: Set CPPC _OSC bits for all and when CPPC_LIB is supported
    
    [ Upstream commit 72f2ecb7ece7c1d89758d4929d98e95d95fe7199 ]
    
    The _OSC method allows the OS and firmware to communicate about
    supported features/capabitlities. It also allows the OS to take
    control of some features.
    
    In ACPI 6.4, s6.2.11.2 Platform-Wide OSPM Capabilities, the CPPC
    (resp. v2) bit should be set by the OS if it 'supports controlling
    processor performance via the interfaces described in the _CPC
    object'.
    
    The OS supports CPPC and parses the _CPC object only if
    CONFIG_ACPI_CPPC_LIB is set. Replace the x86 specific
    boot_cpu_has(X86_FEATURE_HWP) dynamic check with an arch
    generic CONFIG_ACPI_CPPC_LIB build-time check.
    
    Note:
    CONFIG_X86_INTEL_PSTATE selects CONFIG_ACPI_CPPC_LIB.
    
    Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
    Reviewed-by: Sudeep Holla <sudeep.holla@xxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 9eca43d1d941..1fc24f4fbcb4 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -329,10 +329,11 @@ static void acpi_bus_osc_negotiate_platform_control(void)
 #endif
 #ifdef CONFIG_X86
 	capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT;
-	if (boot_cpu_has(X86_FEATURE_HWP)) {
-		capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_SUPPORT;
-		capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPCV2_SUPPORT;
-	}
+#endif
+
+#ifdef CONFIG_ACPI_CPPC_LIB
+	capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_SUPPORT;
+	capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPCV2_SUPPORT;
 #endif
 
 	capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_FLEXIBLE_ADR_SPACE;
@@ -357,10 +358,9 @@ static void acpi_bus_osc_negotiate_platform_control(void)
 		return;
 	}
 
-#ifdef CONFIG_X86
-	if (boot_cpu_has(X86_FEATURE_HWP))
-		osc_sb_cppc_not_supported = !(capbuf_ret[OSC_SUPPORT_DWORD] &
-				(OSC_SB_CPC_SUPPORT | OSC_SB_CPCV2_SUPPORT));
+#ifdef CONFIG_ACPI_CPPC_LIB
+	osc_sb_cppc_not_supported = !(capbuf_ret[OSC_SUPPORT_DWORD] &
+			(OSC_SB_CPC_SUPPORT | OSC_SB_CPCV2_SUPPORT));
 #endif
 
 	/*



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux