History

Merge tag 'thermal-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki: "These remove two recently added excessive lockdep assertions from the sysfs-related thermal code and fix two issues in Intel thermal drivers. Specifics: - Drop two lockdep assertions producing false positive warnings from the sysfs-related thermal core code (Rafael Wysocki) - 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)" * tag 'thermal-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: powerclamp: Fix cpumask and max_idle module parameters thermal: intel: int340x: processor_thermal: Fix additional deadlock thermal: core: Drop excessive lockdep_assert_held() calls

Linus Torvalds committed 3 years ago

Commit 2bac7dc2 parents f964333 896c5153 files · +10 −6Browse files

Unified · Split

3 files
  1. drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +0 −1
  2. drivers/thermal/intel/intel_powerclamp.c +8 −1
  3. drivers/thermal/thermal_sysfs.c +2 −4
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c+0−1
@@ -153,7 +153,6 @@ static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp · 152 unmodified lines
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+8−1
@@ -235,6 +235,12 @@ static int max_idle_set(const char *arg, const struct kernel_param *kp) · 234 unmodified lines
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) · 550 unmodified lines
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)
drivers/thermal/thermal_sysfs.c+2−4
@@ -876,8 +876,6 @@ static void cooling_device_stats_setup(struct thermal_cooling_device *cdev) · 875 unmodified lines
876876 unsigned long states = cdev->max_state + 1;
877877 int var;
878878
879− lockdep_assert_held(&cdev->lock);
880−
881879 var = sizeof(*stats);
882880 var += sizeof(*stats->time_in_state) * states;
883881 var += sizeof(*stats->trans_table) * states * states;
@@ -903,8 +901,6 @@ out: · 19 unmodified lines
903901
904902 static void cooling_device_stats_destroy(struct thermal_cooling_device *cdev)
905903 {
906− lockdep_assert_held(&cdev->lock);
907−
908904 kfree(cdev->stats);
909905 cdev->stats = NULL;
910906 }
@@ -931,6 +927,8 @@ void thermal_cooling_device_destroy_sysfs(struct thermal_cooling_device *cdev) · 20 unmodified lines
931927
932928 void thermal_cooling_device_stats_reinit(struct thermal_cooling_device *cdev)
933929 {
930+ lockdep_assert_held(&cdev->lock);
931+
934932 cooling_device_stats_destroy(cdev);
935933 cooling_device_stats_setup(cdev);
936934 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t