Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: cpufreq: Add highest perf change notification

Platform firmware sends notify 0x85 to inform the OS that the highest
performance of a CPU has changed.

This will be used by the AMD P-state driver to update the ranking of
preferred cores and set the priority of cores accordingly.

Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Perry Yuan <perry.yuan@amd.com>
Signed-off-by: Meng Li <li.meng@amd.com>
Link: https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#processor-device-notification-values
[ rjw: New subject, changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Meng Li and committed by
Rafael J. Wysocki
9c4a13a0 f3a05239

+7
+6
drivers/acpi/processor_driver.c
··· 27 27 #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 28 28 #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 29 29 #define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 30 + #define ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED 0x85 30 31 31 32 MODULE_AUTHOR("Paul Diefenbaugh"); 32 33 MODULE_DESCRIPTION("ACPI Processor Driver"); ··· 81 80 break; 82 81 case ACPI_PROCESSOR_NOTIFY_THROTTLING: 83 82 acpi_processor_tstate_has_changed(pr); 83 + acpi_bus_generate_netlink_event(device->pnp.device_class, 84 + dev_name(&device->dev), event, 0); 85 + break; 86 + case ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED: 87 + cpufreq_update_limits(pr->id); 84 88 acpi_bus_generate_netlink_event(device->pnp.device_class, 85 89 dev_name(&device->dev), event, 0); 86 90 break;
+1
include/linux/cpufreq.h
··· 263 263 return false; 264 264 } 265 265 static inline void disable_cpufreq(void) { } 266 + static inline void cpufreq_update_limits(unsigned int cpu) { } 266 267 #endif 267 268 268 269 #ifdef CONFIG_CPU_FREQ_STAT