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 21fb59ab4b97
("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 279f838a61f9 ("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: 279f838a61f9 ("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
..
2024-10-18 15:53:00 -07:00
2024-09-27 08:48:37 -07:00
2024-10-29 00:46:20 +02:00
2024-09-17 15:27:01 +02:00
2024-09-18 10:49:45 +02:00
2024-11-03 10:15:50 -10:00
2024-09-19 10:18:15 +02:00
2024-11-01 07:54:11 -10:00
2024-11-02 04:44:27 +10:00
2024-10-24 16:31:58 -07:00
2024-09-19 10:18:15 +02:00
2024-10-05 10:31:04 -07:00
2024-11-03 08:35:29 -10:00
2024-10-27 08:29:36 -10:00
2024-09-29 09:22:34 -07:00
2024-10-29 04:01:40 +01:00
2024-10-11 11:23:21 -07:00
2024-09-26 08:43:17 -07:00
2024-11-01 13:41:55 -10:00
2024-11-01 15:44:23 -10:00
2024-10-27 08:40:33 -10:00
2024-09-26 12:00:25 -07:00
2024-10-30 08:16:23 -10:00
2024-10-11 10:03:13 +00:00
2024-10-19 12:52:19 -07:00
2024-09-09 12:22:06 +02:00
2024-10-30 08:16:23 -10:00
2024-09-11 16:02:54 +02:00
2024-10-07 11:33:26 -07:00
2024-10-07 11:33:26 -07:00
2024-10-07 11:33:26 -07:00
2024-09-04 17:24:58 -05:00