Skip to contentSkip to conversation

ACPI: Only evaluate the Intel _OSC and _PDC on platforms with HWP

PATCH In review Mario Limonciello 2 participants 4 messages Jun 14, 2024 – Jun 18, 2024 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: Only evaluate the Intel _OSC and _PDC on platforms with HWP

The UUID 4077A616-290C-47BE-9EBD-D87058713953 and _PDC methods are only used on Intel platforms with HWP support.

Attempting to evaluate them and showing messages on hardware without HWP is pointless needlessly noisy.

Gate the code on X86_FEATURE_HWP.

Cc PradeepVineshReddy (Pradeep Vinesh Reddy) Kodamati <[email protected]>
---
 drivers/acpi/acpi_processor.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/acpi_processor.c +2 -0
index 7a0dd35d62c9..84848b5e65d6 100644
@@ -597,6 +597,8 @@ static bool __init acpi_early_processor_osc(void)
 
 void __init acpi_early_processor_control_setup(void)
 {
+	if (!boot_cpu_has(X86_FEATURE_HWP))
+		return;
 	if (acpi_early_processor_osc()) {
 		pr_info("_OSC evaluated successfully for all CPUs\n");
 	} else {
Signature · 1 line
2.43.0
#1 lore raw
Quoted 3 lines · Mario Limonciello

The UUID 4077A616-290C-47BE-9EBD-D87058713953 and _PDC methods are only used on Intel platforms with HWP support.

I beg to differ. See arch_acpi_set_proc_cap_bits() definition.

Quoted 4 lines

Attempting to evaluate them and showing messages on hardware without HWP is pointless needlessly noisy.

Gate the code on X86_FEATURE_HWP.

Not really.

Quoted 23 lines
Cc PradeepVineshReddy (Pradeep Vinesh Reddy) Kodamati <[email protected]>
---
 drivers/acpi/acpi_processor.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/acpi_processor.c +2 -1
index 7a0dd35d62c9..84848b5e65d6 100644
@@ -597,6 +597,8 @@ static bool __init acpi_early_processor_osc(void)
 
 void __init acpi_early_processor_control_setup(void)
 {
+       if (!boot_cpu_has(X86_FEATURE_HWP))
+               return;
        if (acpi_early_processor_osc()) {
                pr_info("_OSC evaluated successfully for all CPUs\n");
        } else {
--

2.43.0

#2 lore raw
Quoted 7 lines · Rafael J. Wysocki
Quoted 3 lines · Mario Limonciello

The UUID 4077A616-290C-47BE-9EBD-D87058713953 and _PDC methods are only used on Intel platforms with HWP support.

I beg to differ. See arch_acpi_set_proc_cap_bits() definition.

Ah I see; thanks for sharing. I agree with you.

Quoted 7 lines
Quoted 5 lines

Attempting to evaluate them and showing messages on hardware without HWP is pointless needlessly noisy.

Gate the code on X86_FEATURE_HWP.

Not really.

I guess this really started getting noisy in 6.6 (9527264).

Would you be open to downgrading to debug instead?

Quoted 24 lines
Quoted 24 lines
Cc PradeepVineshReddy (Pradeep Vinesh Reddy) Kodamati <[email protected]>
---
  drivers/acpi/acpi_processor.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/acpi/acpi_processor.c +2 -1
index 7a0dd35d62c9..84848b5e65d6 100644
@@ -597,6 +597,8 @@ static bool __init acpi_early_processor_osc(void)
 
  void __init acpi_early_processor_control_setup(void)
  {
+       if (!boot_cpu_has(X86_FEATURE_HWP))
+               return;
         if (acpi_early_processor_osc()) {
                 pr_info("_OSC evaluated successfully for all CPUs\n");
         } else {
--

2.43.0

#3 lore raw
Quoted 16 lines · Mario Limonciello
Quoted 7 lines · Rafael J. Wysocki
Quoted 3 lines · Mario Limonciello

The UUID 4077A616-290C-47BE-9EBD-D87058713953 and _PDC methods are only used on Intel platforms with HWP support.

I beg to differ. See arch_acpi_set_proc_cap_bits() definition.

Ah I see; thanks for sharing. I agree with you.

Quoted 4 lines
Quoted 4 lines

Attempting to evaluate them and showing messages on hardware without HWP is pointless needlessly noisy.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Gate the code on X86_FEATURE_HWP.

Not really.

I guess this really started getting noisy in 6.6 (9527264).

Would you be open to downgrading to debug instead?

That would be fine, thanks!

Quoted 25 lines
Quoted 24 lines
Quoted 24 lines
Cc PradeepVineshReddy (Pradeep Vinesh Reddy) Kodamati <[email protected]>
---
  drivers/acpi/acpi_processor.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/acpi/acpi_processor.c +2 -1
index 7a0dd35d62c9..84848b5e65d6 100644
@@ -597,6 +597,8 @@ static bool __init acpi_early_processor_osc(void)
 
  void __init acpi_early_processor_control_setup(void)
  {
+       if (!boot_cpu_has(X86_FEATURE_HWP))
+               return;
         if (acpi_early_processor_osc()) {
                 pr_info("_OSC evaluated successfully for all CPUs\n");
         } else {
--

2.43.0