1
linux/arch/x86/kernel/acpi
Mario Limonciello b79276dcac ACPI: processor: Move arch_init_invariance_cppc() call later
arch_init_invariance_cppc() is called at the end of
acpi_cppc_processor_probe() in order to configure frequency invariance
based upon the values from _CPC.

This however doesn't work on AMD CPPC shared memory designs that have
AMD preferred cores enabled because _CPC needs to be analyzed from all
cores to judge if preferred cores are enabled.

This issue manifests to users as a warning since commit 21fb59ab4b
("ACPI: CPPC: Adjust debug messages in amd_set_max_freq_ratio() to warn"):
```
Could not retrieve highest performance (-19)
```

However the warning isn't the cause of this, it was actually
commit 279f838a61 ("x86/amd: Detect preferred cores in
amd_get_boost_ratio_numerator()") which exposed the issue.

To fix this problem, change arch_init_invariance_cppc() into a new weak
symbol that is called at the end of acpi_processor_driver_init().
Each architecture that supports it can declare the symbol to override
the weak one.

Define it for x86, in arch/x86/kernel/acpi/cppc.c, and for all of the
architectures using the generic arch_topology.c code.

Fixes: 279f838a61 ("x86/amd: Detect preferred cores in amd_get_boost_ratio_numerator()")
Reported-by: Ivan Shapovalov <intelfx@intelfx.name>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219431
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20241104222855.3959267-1-superm1@kernel.org
[ rjw: Changelog edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-11-06 21:31:36 +01:00
..
apei.c
boot.c xen: allow mapping ACPI data using a different physical address 2024-09-12 08:25:07 +02:00
cppc.c ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
cstate.c cpuidle: ACPI/intel: fix MWAIT hint target C-state computation 2024-03-05 21:25:18 +01:00
madt_playdead.S x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method 2024-06-17 17:46:25 +02:00
madt_wakeup.c x86/acpi: Remove __ro_after_init from acpi_mp_wake_mailbox 2024-08-07 20:04:38 +02:00
Makefile x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method 2024-06-17 17:46:25 +02:00
sleep.c
sleep.h
wakeup_32.S
wakeup_64.S x86/acpi: Use %rip-relative addressing in wakeup_64.S 2023-11-30 20:09:49 +01:00