Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux

Pull thermal management fixes from Zhang Rui:

- Fix a wrong __percpu structure declaration in intel_powerclamp driver
(Luc Van Oostenryck)

- Fix truncated name of the idle injection kthreads created by
intel_powerclamp driver (Zhang Rui)

- Fix the missing UUID supports in int3400 thermal driver (Matthew
Garrett)

- Fix a crash when accessing the debugfs of bcm2835 SoC thermal driver
(Phil Elwell)

- A couple of trivial fixes/cleanups in some SoC thermal drivers

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
thermal/intel_powerclamp: fix truncated kthread name
thermal: mtk: Allocate enough space for mtk_thermal.
thermal/int340x_thermal: fix mode setting
thermal/int340x_thermal: Add additional UUIDs
thermal: cpu_cooling: Remove unused cur_freq variable
thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs
thermal: samsung: Fix incorrect check after code merge
thermal/intel_powerclamp: fix __percpu declaration of worker_data

+30 -16
+4 -5
drivers/thermal/broadcom/bcm2835_thermal.c
··· 119 119 120 120 static void bcm2835_thermal_debugfs(struct platform_device *pdev) 121 121 { 122 - struct thermal_zone_device *tz = platform_get_drvdata(pdev); 123 - struct bcm2835_thermal_data *data = tz->devdata; 122 + struct bcm2835_thermal_data *data = platform_get_drvdata(pdev); 124 123 struct debugfs_regset32 *regset; 125 124 126 125 data->debugfsdir = debugfs_create_dir("bcm2835_thermal", NULL); ··· 265 266 266 267 data->tz = tz; 267 268 268 - platform_set_drvdata(pdev, tz); 269 + platform_set_drvdata(pdev, data); 269 270 270 271 /* 271 272 * Thermal_zone doesn't enable hwmon as default, ··· 289 290 290 291 static int bcm2835_thermal_remove(struct platform_device *pdev) 291 292 { 292 - struct thermal_zone_device *tz = platform_get_drvdata(pdev); 293 - struct bcm2835_thermal_data *data = tz->devdata; 293 + struct bcm2835_thermal_data *data = platform_get_drvdata(pdev); 294 + struct thermal_zone_device *tz = data->tz; 294 295 295 296 debugfs_remove_recursive(data->debugfsdir); 296 297 thermal_zone_of_sensor_unregister(&pdev->dev, tz);
+1 -2
drivers/thermal/cpu_cooling.c
··· 536 536 struct thermal_zone_device *tz, u32 power, 537 537 unsigned long *state) 538 538 { 539 - unsigned int cur_freq, target_freq; 539 + unsigned int target_freq; 540 540 u32 last_load, normalised_power; 541 541 struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata; 542 542 struct cpufreq_policy *policy = cpufreq_cdev->policy; 543 543 544 - cur_freq = cpufreq_quick_get(policy->cpu); 545 544 power = power > 0 ? power : 0; 546 545 last_load = cpufreq_cdev->last_load ?: 1; 547 546 normalised_power = (power * 100) / last_load;
+17 -4
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
··· 22 22 INT3400_THERMAL_PASSIVE_1, 23 23 INT3400_THERMAL_ACTIVE, 24 24 INT3400_THERMAL_CRITICAL, 25 + INT3400_THERMAL_ADAPTIVE_PERFORMANCE, 26 + INT3400_THERMAL_EMERGENCY_CALL_MODE, 27 + INT3400_THERMAL_PASSIVE_2, 28 + INT3400_THERMAL_POWER_BOSS, 29 + INT3400_THERMAL_VIRTUAL_SENSOR, 30 + INT3400_THERMAL_COOLING_MODE, 31 + INT3400_THERMAL_HARDWARE_DUTY_CYCLING, 25 32 INT3400_THERMAL_MAXIMUM_UUID, 26 33 }; 27 34 ··· 36 29 "42A441D6-AE6A-462b-A84B-4A8CE79027D3", 37 30 "3A95C389-E4B8-4629-A526-C52C88626BAE", 38 31 "97C68AE7-15FA-499c-B8C9-5DA81D606E0A", 32 + "63BE270F-1C11-48FD-A6F7-3AF253FF3E2D", 33 + "5349962F-71E6-431D-9AE8-0A635B710AEE", 34 + "9E04115A-AE87-4D1C-9500-0F3E340BFE75", 35 + "F5A35014-C209-46A4-993A-EB56DE7530A1", 36 + "6ED722A7-9240-48A5-B479-31EEF723D7CF", 37 + "16CAF1B7-DD38-40ED-B1C1-1B8A1913D531", 38 + "BE84BABF-C4D4-403D-B495-3128FD44dAC1", 39 39 }; 40 40 41 41 struct int3400_thermal_priv { ··· 313 299 314 300 platform_set_drvdata(pdev, priv); 315 301 316 - if (priv->uuid_bitmap & 1 << INT3400_THERMAL_PASSIVE_1) { 317 - int3400_thermal_ops.get_mode = int3400_thermal_get_mode; 318 - int3400_thermal_ops.set_mode = int3400_thermal_set_mode; 319 - } 302 + int3400_thermal_ops.get_mode = int3400_thermal_get_mode; 303 + int3400_thermal_ops.set_mode = int3400_thermal_set_mode; 304 + 320 305 priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0, 321 306 priv, &int3400_thermal_ops, 322 307 &int3400_thermal_params, 0, 0);
+2 -2
drivers/thermal/intel/intel_powerclamp.c
··· 101 101 bool clamping; 102 102 }; 103 103 104 - static struct powerclamp_worker_data * __percpu worker_data; 104 + static struct powerclamp_worker_data __percpu *worker_data; 105 105 static struct thermal_cooling_device *cooling_dev; 106 106 static unsigned long *cpu_clamping_mask; /* bit map for tracking per cpu 107 107 * clamping kthread worker ··· 494 494 struct powerclamp_worker_data *w_data = per_cpu_ptr(worker_data, cpu); 495 495 struct kthread_worker *worker; 496 496 497 - worker = kthread_create_worker_on_cpu(cpu, 0, "kidle_inject/%ld", cpu); 497 + worker = kthread_create_worker_on_cpu(cpu, 0, "kidle_inj/%ld", cpu); 498 498 if (IS_ERR(worker)) 499 499 return; 500 500
+5 -2
drivers/thermal/mtk_thermal.c
··· 199 199 #define MT7622_TS1 0 200 200 #define MT7622_NUM_CONTROLLER 1 201 201 202 + /* The maximum number of banks */ 203 + #define MAX_NUM_ZONES 8 204 + 202 205 /* The calibration coefficient of sensor */ 203 206 #define MT7622_CALIBRATION 165 204 207 ··· 252 249 const int num_controller; 253 250 const int *controller_offset; 254 251 bool need_switch_bank; 255 - struct thermal_bank_cfg bank_data[]; 252 + struct thermal_bank_cfg bank_data[MAX_NUM_ZONES]; 256 253 }; 257 254 258 255 struct mtk_thermal { ··· 271 268 s32 vts[MAX_NUM_VTS]; 272 269 273 270 const struct mtk_thermal_data *conf; 274 - struct mtk_thermal_bank banks[]; 271 + struct mtk_thermal_bank banks[MAX_NUM_ZONES]; 275 272 }; 276 273 277 274 /* MT8183 thermal sensor data */
+1 -1
drivers/thermal/samsung/exynos_tmu.c
··· 666 666 struct exynos_tmu_data *data = p; 667 667 int value, ret = 0; 668 668 669 - if (!data || !data->tmu_read || !data->enabled) 669 + if (!data || !data->tmu_read) 670 670 return -EINVAL; 671 671 else if (!data->enabled) 672 672 /*