1
linux/drivers/base
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
..
firmware_loader firmware_loader: Block path traversal 2024-09-03 12:47:55 +02:00
power PM: domains: Fix alloc/free in dev_pm_domain_attach|detach_list() 2024-10-10 13:55:17 +02:00
regmap move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
test drivers: base: test: Make property entry API test modular 2023-10-05 13:11:44 +02:00
arch_numa.c arch_numa: switch over to numa_memblks 2024-09-03 21:15:32 -07:00
arch_topology.c ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
attribute_container.c driver core: attribute_container: Remove unused functions 2024-09-13 15:41:42 +02:00
auxiliary_sysfs.c driver core: auxiliary bus: show auxiliary device IRQs 2024-07-11 14:17:03 -07:00
auxiliary.c drivers/base: Introduce device_match_t for device finding APIs 2024-09-03 12:48:51 +02:00
base.h Revert "driver core: shut down devices asynchronously" 2024-09-25 11:01:27 +02:00
bus.c drivers/base: Introduce device_match_t for device finding APIs 2024-09-03 12:48:51 +02:00
cacheinfo.c drivers: cacheinfo: use __free attribute instead of of_node_put() 2024-07-31 13:56:34 +02:00
class.c driver core: class: Check namespace relevant parameters in class_register() 2024-09-03 13:00:20 +02:00
component.c driver core: component: fix spellos 2024-01-30 15:58:06 -08:00
container.c driver core: container: make container_subsys const 2023-12-21 13:56:10 +01:00
core.c Driver core revert fix for 6.12-rc6 2024-11-03 08:51:53 -10:00
cpu.c Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
dd.c Driver core update for 6.12-rc1 2024-09-27 08:48:37 -07:00
devcoredump.c devcoredump: Add dev_coredumpm_timeout() 2024-06-12 11:29:36 -04:00
devres.c devres: Correclty strip percpu address space of devm_free_percpu() argument 2024-09-03 13:15:21 +02:00
devtmpfs.c driver core: clean up the logic to determine which /sys/dev/ directory to use 2023-03-31 17:45:07 +02:00
driver.c drivers/base: Introduce device_match_t for device finding APIs 2024-09-03 12:48:51 +02:00
firmware.c
hypervisor.c
init.c drivers: base: Move cpu_dev_init() after node_dev_init() 2023-12-06 12:41:49 +09:00
isa.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
Kconfig arch_numa: switch over to numa_memblks 2024-09-03 21:15:32 -07:00
Makefile driver core: auxiliary bus: show auxiliary device IRQs 2024-07-11 14:17:03 -07:00
map.c driver: base: Prefer unsigned int to bare use of unsigned 2021-07-21 17:30:09 +02:00
memory.c crash: add a new kexec flag for hotplug support 2024-04-23 14:59:01 +10:00
module.c Revert "driver core: Fix uevent_show() vs driver detach race" 2024-10-29 01:23:43 +01:00
node.c cxl/region: Deal with numa nodes not enumerated by SRAT 2024-03-12 14:54:03 -07:00
physical_location.c driver core: location: Free struct acpi_pld_info *pld before return false 2023-01-20 14:20:30 +01:00
physical_location.h driver core: physical_location.h remove extern from function prototypes 2023-03-24 15:35:48 +01:00
pinctrl.c
platform-msi.c genirq/msi: Remove platform MSI leftovers 2024-07-18 20:31:21 +02:00
platform.c platform: Make platform_bus_type constant 2024-09-03 13:00:50 +02:00
property.c Char/Misc and other driver subsystem changes for 6.10-rc1 2024-05-22 12:26:46 -07:00
soc.c driver core: mark remaining local bus_type variables as const 2023-12-21 13:56:30 +01:00
swnode.c device property: Don't use "proxy" headers 2024-03-07 22:07:26 +00:00
syscore.c
topology.c drivers/base: fix userspace break from using bin_attributes for cpumap and cpulist 2022-07-15 17:36:33 +02:00
trace.c devres: Enable trace events 2021-06-15 17:14:36 +02:00
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
transport_class.c drivers: base: transport_class: fix resource leak when transport_add_device() fails 2023-01-20 14:22:53 +01:00