linux/include/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
..
platform ACPICA: haiku: Fix invalid value used for semaphores 2024-08-29 17:26:51 +02:00
acbuffer.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acconfig.h ACPICA: Detect FACS in reduced hardware build 2024-08-29 14:40:28 +02:00
acexcep.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acnames.h ACPICA: Detect GED device and keep track of _EVT 2023-07-10 18:33:47 +02:00
acoutput.h ACPICA: Implement ACPI_WARNING_ONCE and ACPI_ERROR_ONCE 2024-08-29 17:51:24 +02:00
acpi_bus.h Merge branches 'acpi-video', 'acpi-resource', 'acpi-pad' and 'acpi-misc' 2024-09-11 22:05:16 +02:00
acpi_drivers.h ACPI: platform: Move SMB0001 HID to the header and reuse 2023-07-04 19:28:20 +02:00
acpi_io.h Revert "ACPI: Add memory semantics to acpi_os_map_memory()" 2021-09-23 20:39:36 +02:00
acpi_lpat.h
acpi_numa.h ACPI: processor: Replace kernel.h with the necessary inclusions 2021-11-24 17:44:04 +01:00
acpi.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acpiosxf.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
acpixf.h Merge branch 'acpica' 2024-09-11 21:42:20 +02:00
acrestyp.h ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array 2023-04-06 20:29:12 +02:00
actbl1.h ACPICA: HMAT: Add extended linear address mode to MSCIS 2024-08-29 19:04:22 +02:00
actbl2.h ACPICA: MPAM: Correct the typo in struct acpi_mpam_msc_node member 2024-08-29 17:48:53 +02:00
actbl3.h ACPICA: SPCR: Update the SPCR table to version 4 2024-08-29 17:34:36 +02:00
actbl.h ACPI: CPPC: Add definition for undefined FADT preferred PM profile value 2023-06-21 18:44:56 +02:00
actypes.h ACPICA: Add support for Windows 11 22H2 _OSI string 2024-08-29 19:04:22 +02:00
acuuid.h ACPICA: Update all copyrights/signons to 2023 2023-04-06 20:29:11 +02:00
apei.h ACPI: APEI: Fix missing ERST record id 2022-04-13 20:29:24 +02:00
battery.h ACPI: battery: add devm_battery_hook_register() 2024-07-01 21:22:18 +08:00
button.h
cppc_acpi.h ACPI: CPPC: Make rmw_lock a raw_spin_lock 2024-10-29 12:56:19 +01:00
ghes.h ACPI: APEI: Fix AER info corruption when error status data has multiple sections 2023-09-21 20:44:23 +02:00
hed.h
nfit.h
nhlt.h ACPI: NHLT: Streamline struct naming 2024-03-27 16:36:45 +01:00
pcc.h ACPI: PCC: Add PCC shared memory region command and status bitfields 2023-09-28 15:48:48 +01:00
proc_cap_intel.h ACPI: processor: Introduce acpi_processor_osc() 2023-07-14 17:59:40 +02:00
processor.h ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
reboot.h
video.h ACPI: video: Add Dell UART backlight controller detection 2024-08-19 15:58:35 +02:00