linux/arch/x86
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
..
boot mm: rework accept memory helpers 2024-09-01 20:26:07 -07:00
coco x86/tdx: Fix "in-kernel MMIO" check 2024-09-26 09:45:04 -07:00
configs tinyconfig: remove unnecessary 'is not set' for choice blocks 2024-09-01 20:34:38 +09:00
crypto move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
entry - Explicitly disable the TSC deadline timer when going idle to address 2024-10-20 12:04:32 -07:00
events Performance events changes for v6.12: 2024-09-18 15:03:58 +02:00
hyperv hyperv-next for v6.12 2024-09-19 08:15:30 +02:00
ia32
include ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
kernel ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
kvm KVM: nSVM: Ignore nCR3[4:0] when loading PDPTEs from memory 2024-10-20 07:31:06 -04:00
lib x86: fix user address masking non-canonical speculation issue 2024-10-25 09:53:03 -07:00
math-emu x86/math-emu: Fix function cast warnings 2024-04-08 16:06:22 +02:00
mm x86: 2024-09-28 09:20:14 -07:00
net bpf, x64: Fix a jit convergence issue 2024-09-04 16:46:22 -07:00
pci x86/PCI: Check pcie_find_root_port() return for NULL 2024-08-21 15:28:08 -05:00
platform xen: branch for v6.12-rc1a 2024-09-27 09:55:30 -07:00
power - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
purgatory Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
ras
realmode Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools Changes: 2024-05-19 11:32:42 -07:00
um This pull request contains the following changes for UML: 2024-09-27 12:48:48 -07:00
video arch: Fix name collision with ACPI's video.o 2024-05-20 21:17:06 +00:00
virt x86/sev: Ensure that RMP table fixups are reserved 2024-10-23 12:34:06 +02:00
xen x86/xen: mark boot CPU of PV guest in MSR_IA32_APICBASE 2024-10-08 16:18:57 +02:00
.gitignore
Kbuild x86/build: Use obj-y to descend into arch/x86/virt/ 2024-03-30 10:41:49 +01:00
Kconfig x86/lam: Disable ADDRESS_MASKING in most cases 2024-10-21 15:05:43 -07:00
Kconfig.assembler x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS 2024-06-20 19:48:18 +02:00
Kconfig.cpu
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-05-20 11:37:23 +02:00
Makefile rust: cfi: add support for CFI_CLANG with Rust 2024-09-16 17:29:58 +02:00
Makefile_32.cpu
Makefile.postlink
Makefile.um arch: um: rust: Use the generated target.json again 2024-07-03 12:22:11 +02:00