Package Level Thermal Control and Power
PATCH v2 3/5 Package Level Thermal Control and Power
From: Fenghua Yu <[email protected]>
Add package level thermal throttle interrupt support. The interrupt handler increases package level thermal throttle count. It also logs the event in MCE log.
The package level thermal throttle interrupt happens across threads in a package. Each thread handles the interrupt individually. User level application is supposed to retrieve correct event count and log based on package/thread topology. This is the same situation for core level interrupt handler.
core_throttle_count and package_throttle_count are used for user interface. Previously only throttle_count is used for core throttle count. If you think new core_throttle_count name breaks user interface, I can change this part.
This patch also fixes a bug which defines reverse THERM_INT_LOW_ENABLE bit and THERM_INT_HIGH_ENABLE bit.
--- arch/x86/include/asm/msr-index.h | 10 +++- arch/x86/kernel/cpu/mcheck/therm_throt.c | 89 ++++++++++++++++++++++++------ 2 files changed, 79 insertions(+), 20 deletions(-)
arch/x86/include/asm/msr-index.h +8 -2
@@ -224,8 +224,8 @@#define MSR_IA32_THERM_CONTROL 0x0000019a#define MSR_IA32_THERM_INTERRUPT 0x0000019b -#define THERM_INT_LOW_ENABLE (1 << 0) -#define THERM_INT_HIGH_ENABLE (1 << 1) +#define THERM_INT_HIGH_ENABLE (1 << 0) +#define THERM_INT_LOW_ENABLE (1 << 1)#define MSR_IA32_THERM_STATUS 0x0000019c
@@ -240,8 +240,14 @@#define MSR_IA32_TEMPERATURE_TARGET 0x000001a2#define MSR_IA32_PACKAGE_THERM_STATUS 0x000001b1 + +#define PACKAGE_THERM_STATUS_PROCHOT (1 << 0) +#define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x000001b2 +#define PACKAGE_THERM_INT_HIGH_ENABLE (1 << 0) +#define PACKAGE_THERM_INT_LOW_ENABLE (1 << 1) +/* MISC_ENABLE bits: architectural */ #define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0)#define MSR_IA32_MISC_ENABLE_TCC (1ULL << 1)
arch/x86/kernel/cpu/mcheck/therm_throt.c +71 -18
169 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