Skip to content

Commit 896c515

Browse files
committed
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
2 parents b57841f + ae817e6 commit 896c515

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp
153153
cancel_delayed_work_sync(&pci_info->work);
154154
proc_thermal_mmio_write(pci_info, PROC_THERMAL_MMIO_INT_ENABLE_0, 0);
155155
proc_thermal_mmio_write(pci_info, PROC_THERMAL_MMIO_THRES_0, 0);
156-
thermal_zone_device_disable(tzd);
157156
pci_info->stored_thres = 0;
158157
return 0;
159158
}

drivers/thermal/intel/intel_powerclamp.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ static int max_idle_set(const char *arg, const struct kernel_param *kp)
235235
goto skip_limit_set;
236236
}
237237

238+
if (!cpumask_available(idle_injection_cpu_mask)) {
239+
ret = allocate_copy_idle_injection_mask(cpu_present_mask);
240+
if (ret)
241+
goto skip_limit_set;
242+
}
243+
238244
if (check_invalid(idle_injection_cpu_mask, new_max_idle)) {
239245
ret = -EINVAL;
240246
goto skip_limit_set;
@@ -791,7 +797,8 @@ static int __init powerclamp_init(void)
791797
return retval;
792798

793799
mutex_lock(&powerclamp_lock);
794-
retval = allocate_copy_idle_injection_mask(cpu_present_mask);
800+
if (!cpumask_available(idle_injection_cpu_mask))
801+
retval = allocate_copy_idle_injection_mask(cpu_present_mask);
795802
mutex_unlock(&powerclamp_lock);
796803

797804
if (retval)

0 commit comments

Comments
 (0)