diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-03-31 12:02:46 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-03-31 12:02:46 +0200 |
commit | 896c5150edfd5c01ed7abfcf02612f4aac6296b3 (patch) | |
tree | 4b56f00e6b003bede0dfdf4948815200e212f96a | |
parent | b57841fb0b564c61508222e885ac8f30a2811089 (diff) | |
parent | ae817e618d4b5d221daae34d32a39476e4bdcb36 (diff) | |
download | linux-896c5150edfd5c01ed7abfcf02612f4aac6296b3.tar.gz linux-896c5150edfd5c01ed7abfcf02612f4aac6296b3.tar.bz2 linux-896c5150edfd5c01ed7abfcf02612f4aac6296b3.zip |
Merge branch 'thermal-intel-fixes'
Merge Intel thermal driver fixes for 6.3-rc5:
- Fix handling of two recently added module parameters in the Intel
powerclamp thermal driver (David Arcari).
- Fix one more deadlock in the int340x thermal driver (Srinivas
Pandruvada).
* thermal-intel-fixes:
thermal: intel: powerclamp: Fix cpumask and max_idle module parameters
thermal: intel: int340x: processor_thermal: Fix additional deadlock
-rw-r--r-- | drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c | 1 | ||||
-rw-r--r-- | drivers/thermal/intel/intel_powerclamp.c | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c index 90526f46c9b1..d71ee50e7878 100644 --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c @@ -153,7 +153,6 @@ static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp cancel_delayed_work_sync(&pci_info->work); proc_thermal_mmio_write(pci_info, PROC_THERMAL_MMIO_INT_ENABLE_0, 0); proc_thermal_mmio_write(pci_info, PROC_THERMAL_MMIO_THRES_0, 0); - thermal_zone_device_disable(tzd); pci_info->stored_thres = 0; return 0; } diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c index c7ba5680cd48..91fc7e239497 100644 --- a/drivers/thermal/intel/intel_powerclamp.c +++ b/drivers/thermal/intel/intel_powerclamp.c @@ -235,6 +235,12 @@ static int max_idle_set(const char *arg, const struct kernel_param *kp) goto skip_limit_set; } + if (!cpumask_available(idle_injection_cpu_mask)) { + ret = allocate_copy_idle_injection_mask(cpu_present_mask); + if (ret) + goto skip_limit_set; + } + if (check_invalid(idle_injection_cpu_mask, new_max_idle)) { ret = -EINVAL; goto skip_limit_set; @@ -791,7 +797,8 @@ static int __init powerclamp_init(void) return retval; mutex_lock(&powerclamp_lock); - retval = allocate_copy_idle_injection_mask(cpu_present_mask); + if (!cpumask_available(idle_injection_cpu_mask)) + retval = allocate_copy_idle_injection_mask(cpu_present_mask); mutex_unlock(&powerclamp_lock); if (retval) |