Skip to content

Commit 9c4a13a

Browse files
Meng Lirafaeljw
authored andcommitted
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 <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Perry Yuan <[email protected]> Signed-off-by: Meng Li <[email protected]> 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 <[email protected]>
1 parent f3a0523 commit 9c4a13a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

drivers/acpi/processor_driver.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
2828
#define ACPI_PROCESSOR_NOTIFY_POWER 0x81
2929
#define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82
30+
#define ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED 0x85
3031

3132
MODULE_AUTHOR("Paul Diefenbaugh");
3233
MODULE_DESCRIPTION("ACPI Processor Driver");
@@ -83,6 +84,11 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
8384
acpi_bus_generate_netlink_event(device->pnp.device_class,
8485
dev_name(&device->dev), event, 0);
8586
break;
87+
case ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED:
88+
cpufreq_update_limits(pr->id);
89+
acpi_bus_generate_netlink_event(device->pnp.device_class,
90+
dev_name(&device->dev), event, 0);
91+
break;
8692
default:
8793
acpi_handle_debug(handle, "Unsupported event [0x%x]\n", event);
8894
break;

include/linux/cpufreq.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ static inline bool cpufreq_supports_freq_invariance(void)
263263
return false;
264264
}
265265
static inline void disable_cpufreq(void) { }
266+
static inline void cpufreq_update_limits(unsigned int cpu) { }
266267
#endif
267268

268269
#ifdef CONFIG_CPU_FREQ_STAT

0 commit comments

Comments
 (0)