diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2021-08-19 19:40:05 -0700 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-08-25 20:09:37 +0200 |
commit | 950809cd6ca2ff2e2bb9d826c4d9e35d134d7de0 (patch) | |
tree | 1a6105459cf72309dae8a21848db87c20215863a /drivers/thermal/intel/therm_throt.c | |
parent | 43dde64bb1b45c7e4194f4ae30cf16c37bc317e0 (diff) | |
download | linux-stable-950809cd6ca2ff2e2bb9d826c4d9e35d134d7de0.tar.gz linux-stable-950809cd6ca2ff2e2bb9d826c4d9e35d134d7de0.tar.bz2 linux-stable-950809cd6ca2ff2e2bb9d826c4d9e35d134d7de0.zip |
thermal: intel: Allow processing of HWP interrupt
Add a weak function to process HWP (Hardware P-states) notifications and
move updating HWP_STATUS MSR to this function.
This allows HWP interrupts to be processed by the intel_pstate driver in
HWP mode by overriding the implementation.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal/intel/therm_throt.c')
-rw-r--r-- | drivers/thermal/intel/therm_throt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/thermal/intel/therm_throt.c b/drivers/thermal/intel/therm_throt.c index 99abdc03c44c..dab7e8fb1059 100644 --- a/drivers/thermal/intel/therm_throt.c +++ b/drivers/thermal/intel/therm_throt.c @@ -569,13 +569,18 @@ static void notify_thresholds(__u64 msr_val) platform_thermal_notify(msr_val); } +void __weak notify_hwp_interrupt(void) +{ + wrmsrl_safe(MSR_HWP_STATUS, 0); +} + /* Thermal transition interrupt handler */ void intel_thermal_interrupt(void) { __u64 msr_val; if (static_cpu_has(X86_FEATURE_HWP)) - wrmsrl_safe(MSR_HWP_STATUS, 0); + notify_hwp_interrupt(); rdmsrl(MSR_IA32_THERM_STATUS, msr_val); |