Package Level Thermal Control and Power
PATCH v2 4/5 Package Level Thermal Control and Power
From: Fenghua Yu <[email protected]>
Power limit notification feature is published in Intel 64 and IA-32 Architectures SDMV Vol 3A 14.5.6 Power Limit Notification.
It is implemented first on Intel Sandy Bridge platform.
The patch handles notification interrupt. Interrupt handler dumps power limit information in log_buf, logs the event in mce log, and increases the event counters (core_power_limit and package_power_limit). Upper level applications could use the data to detect system health or diagnose functionality/performance issues.
In the future, the event could be handled in a more fancy way.
Signed-off-by Fenghua Yu <[email protected]>
Reviewed-by Len Brown <[email protected]>
--- arch/x86/include/asm/msr-index.h | 4 + arch/x86/kernel/cpu/mcheck/therm_throt.c | 186 +++++++++++++++++++++--------- 2 files changed, 136 insertions(+), 54 deletions(-)
arch/x86/include/asm/msr-index.h +4 -0
@@ -226,10 +226,12 @@#define THERM_INT_HIGH_ENABLE (1 << 0)#define THERM_INT_LOW_ENABLE (1 << 1) +#define THERM_INT_PLN_ENABLE (1 << 24)#define MSR_IA32_THERM_STATUS 0x0000019c#define THERM_STATUS_PROCHOT (1 << 0) +#define THERM_STATUS_POWER_LIMIT (1 << 10)#define MSR_THERM2_CTL 0x0000019d
@@ -242,11 +244,13 @@#define MSR_IA32_PACKAGE_THERM_STATUS 0x000001b1#define PACKAGE_THERM_STATUS_PROCHOT (1 << 0) +#define PACKAGE_THERM_STATUS_POWER_LIMIT (1 << 10)#define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x000001b2#define PACKAGE_THERM_INT_HIGH_ENABLE (1 << 0)#define PACKAGE_THERM_INT_LOW_ENABLE (1 << 1) +#define PACKAGE_THERM_INT_PLN_ENABLE (1 << 24)/* MISC_ENABLE bits: architectural */ #define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0)
arch/x86/kernel/cpu/mcheck/therm_throt.c +132 -54
302 lines not on this page · raw message
Signature · 7 lines
1.7.2 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors