@@ -829,17 +829,26 @@
#define MSR_IA32_MPERF 0x000000e7
#define MSR_IA32_APERF 0x000000e8
-#define MSR_IA32_THERM_CONTROL 0x0000019a
-#define MSR_IA32_THERM_INTERRUPT 0x0000019b
-
-#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 MSR_IA32_THERM_CONTROL 0x0000019a
+#define THERM_ON_DEM_CLO_MOD_DUTY_CYC_MASK GENMASK_ULL(3, 1)
+#define THERM_ON_DEM_CLO_MOD_ENABLE BIT_ULL(4)
-#define THERM_STATUS_PROCHOT (1 << 0)
-#define THERM_STATUS_POWER_LIMIT (1 << 10)
+#define MSR_IA32_THERM_INTERRUPT 0x0000019b
+#define THERM_INT_HIGH_ENABLE BIT_ULL(0)
+#define THERM_INT_LOW_ENABLE BIT_ULL(1)
+#define THERM_INT_PROCHOT_ENABLE BIT_ULL(2)
+#define THERM_INT_FORCEPR_ENABLE BIT_ULL(3)
+#define THERM_INT_CRITICAL_TEM_ENABLE BIT_ULL(4)
+#define THERM_INT_PLN_ENABLE BIT_ULL(24)
+
+#define MSR_IA32_THERM_STATUS 0x0000019c
+#define THERM_STATUS_PROCHOT BIT_ULL(0)
+#define THERM_STATUS_PROCHOT_LOG BIT_ULL(1)
+#define THERM_STATUS_PROCHOT_FORCEPR_EVENT BIT_ULL(2)
+#define THERM_STATUS_PROCHOT_FORCEPR_LOG BIT_ULL(3)
+#define THERM_STATUS_CRITICAL_TEMP BIT_ULL(4)
+#define THERM_STATUS_CRITICAL_TEMP_LOG BIT_ULL(5)
+#define THERM_STATUS_POWER_LIMIT BIT_ULL(10)
#define MSR_THERM2_CTL 0x0000019d
@@ -861,17 +870,24 @@
#define ENERGY_PERF_BIAS_POWERSAVE 15
#define MSR_IA32_PACKAGE_THERM_STATUS 0x000001b1
-
-#define PACKAGE_THERM_STATUS_PROCHOT (1 << 0)
-#define PACKAGE_THERM_STATUS_POWER_LIMIT (1 << 10)
-#define PACKAGE_THERM_STATUS_HFI_UPDATED (1 << 26)
+#define PACKAGE_THERM_STATUS_PROCHOT BIT_ULL(0)
+#define PACKAGE_THERM_STATUS_PROCHOT_LOG BIT_ULL(1)
+#define PACKAGE_THERM_STATUS_PROCHOT_EVENT BIT_ULL(2)
+#define PACKAGE_THERM_STATUS_PROCHOT_EVENT_LOG BIT_ULL(3)
+#define PACKAGE_THERM_STATUS_CRITICAL_TEMP BIT_ULL(4)
+#define PACKAGE_THERM_STATUS_CRITICAL_TEMP_LOG BIT_ULL(5)
+#define PACKAGE_THERM_STATUS_POWER_LIMIT BIT_ULL(10)
+#define PACKAGE_THERM_STATUS_POWER_LIMIT_LOG BIT_ULL(11)
+#define PACKAGE_THERM_STATUS_DIG_READOUT_MASK GENMASK_ULL(22, 16)
+#define PACKAGE_THERM_STATUS_HFI_UPDATED BIT_ULL(26)
#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)
-#define PACKAGE_THERM_INT_HFI_ENABLE (1 << 25)
+#define PACKAGE_THERM_INT_HIGH_ENABLE BIT_ULL(0)
+#define PACKAGE_THERM_INT_LOW_ENABLE BIT_ULL(1)
+#define PACKAGE_THERM_INT_PROCHOT_ENABLE BIT_ULL(2)
+#define PACKAGE_THERM_INT_OVERHEAT_ENABLE BIT_ULL(4)
+#define PACKAGE_THERM_INT_PLN_ENABLE BIT_ULL(24)
+#define PACKAGE_THERM_INT_HFI_ENABLE BIT_ULL(25)
/* Thermal Thresholds Support */
#define THERM_INT_THRESHOLD0_ENABLE (1 << 15)
@@ -191,7 +191,6 @@ static const struct attribute_group thermal_attr_group = {
#endif /* CONFIG_SYSFS */
#define THERM_THROT_POLL_INTERVAL HZ
-#define THERM_STATUS_PROCHOT_LOG BIT(1)
static u64 therm_intr_core_clear_mask;
static u64 therm_intr_pkg_clear_mask;