From: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
Add a new netlink event to notify change in CPU capabilities in terms of
performance and efficiency.
Firmware may change CPU capabilities as a result of thermal events in the
system or to account for changes in the TDP (thermal design power) level.
This notification type will allow user space to avoid running workloads
on certain CPUs or proactively adjust power limits to avoid future events.
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: Aubrey Li <aubrey.li@xxxxxxxxxxxxxxx>
Cc: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
Cc: "Ravi V. Shankar" <ravi.v.shankar@xxxxxxxxx>
Reviewed-by: Len Brown <len.brown@xxxxxxxxx>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
---
drivers/thermal/thermal_netlink.c | 52 +++++++++++++++++++++++++++++++
drivers/thermal/thermal_netlink.h | 13 ++++++++
include/uapi/linux/thermal.h | 6 +++-
3 files changed, 70 insertions(+), 1 deletion(-)
+struct cpu_capability {
+ int cpu;
+ int perf;
+ int eff;