Skip to content

Commit 22e8a0a

Browse files
committed
Revert "ACPI: CPPC: Only probe for _CPC if CPPC v2 is acked"
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2164217 Upstream Status: RHEL Only This reverts commit 19f75aa. The upstream commit was backported incorrectly and needs to be reapplied. Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
1 parent cadc0a4 commit 22e8a0a

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

drivers/acpi/bus.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ EXPORT_SYMBOL_GPL(osc_cpc_flexible_adr_space_confirmed);
297297
bool osc_sb_native_usb4_support_confirmed;
298298
EXPORT_SYMBOL_GPL(osc_sb_native_usb4_support_confirmed);
299299

300-
bool osc_sb_cppc2_support_acked;
300+
bool osc_sb_cppc_not_supported;
301301

302302
static u8 sb_uuid_str[] = "0811B06E-4A27-44F9-8D60-3CBBC22E7B48";
303303
static void acpi_bus_osc_negotiate_platform_control(void)
@@ -357,6 +357,12 @@ static void acpi_bus_osc_negotiate_platform_control(void)
357357
return;
358358
}
359359

360+
#ifdef CONFIG_X86
361+
if (boot_cpu_has(X86_FEATURE_HWP))
362+
osc_sb_cppc_not_supported = !(capbuf_ret[OSC_SUPPORT_DWORD] &
363+
(OSC_SB_CPC_SUPPORT | OSC_SB_CPCV2_SUPPORT));
364+
#endif
365+
360366
/*
361367
* Now run _OSC again with query flag clear and with the caps
362368
* supported by both the OS and the platform.
@@ -370,10 +376,6 @@ static void acpi_bus_osc_negotiate_platform_control(void)
370376

371377
capbuf_ret = context.ret.pointer;
372378
if (context.ret.length > OSC_SUPPORT_DWORD) {
373-
#ifdef CONFIG_X86
374-
osc_sb_cppc2_support_acked = capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_CPCV2_SUPPORT;
375-
#endif
376-
377379
osc_sb_apei_support_acked =
378380
capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_APEI_SUPPORT;
379381
osc_pc_lpi_support_confirmed =

drivers/acpi/cppc_acpi.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -673,11 +673,8 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
673673
acpi_status status;
674674
int ret = -ENODATA;
675675

676-
if (!osc_sb_cppc2_support_acked) {
677-
pr_debug("CPPC v2 _OSC not acked\n");
678-
if (!cpc_supported_by_cpu())
679-
return -ENODEV;
680-
}
676+
if (osc_sb_cppc_not_supported)
677+
return -ENODEV;
681678

682679
/* Parse the ACPI _CPC table for this CPU. */
683680
status = acpi_evaluate_object_typed(handle, "_CPC", NULL, &output,

include/linux/acpi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
585585
extern bool osc_sb_apei_support_acked;
586586
extern bool osc_pc_lpi_support_confirmed;
587587
extern bool osc_sb_native_usb4_support_confirmed;
588-
extern bool osc_sb_cppc2_support_acked;
588+
extern bool osc_sb_cppc_not_supported;
589589
extern bool osc_cpc_flexible_adr_space_confirmed;
590590

591591
/* USB4 Capabilities */

0 commit comments

Comments
 (0)