Skip to content

Commit 78ac74d

Browse files
author
CKI KWF Bot
committed
Merge: thermal: intel: updates to 6.17
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1631 Description: updates for thermal: intel JIRA: https://issues.redhat.com/browse/RHEL-110837 Build Info: 69138402 Tested: Successful platform test results on Intel (intel-raptorlake-s-s-17-iotg-01) system. Signed-off-by: Steve Best <sbest@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents e8487b3 + 339f72d commit 78ac74d

17 files changed

+30
-18
lines changed

drivers/thermal/armada_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ static int armada_get_temp_legacy(struct thermal_zone_device *thermal,
408408
return ret;
409409
}
410410

411-
static struct thermal_zone_device_ops legacy_ops = {
411+
static const struct thermal_zone_device_ops legacy_ops = {
412412
.get_temp = armada_get_temp_legacy,
413413
};
414414

drivers/thermal/da9062-thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static int da9062_thermal_get_temp(struct thermal_zone_device *z,
137137
return 0;
138138
}
139139

140-
static struct thermal_zone_device_ops da9062_thermal_ops = {
140+
static const struct thermal_zone_device_ops da9062_thermal_ops = {
141141
.get_temp = da9062_thermal_get_temp,
142142
};
143143

drivers/thermal/dove_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static int dove_get_temp(struct thermal_zone_device *thermal,
106106
return 0;
107107
}
108108

109-
static struct thermal_zone_device_ops ops = {
109+
static const struct thermal_zone_device_ops ops = {
110110
.get_temp = dove_get_temp,
111111
};
112112

drivers/thermal/imx_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static bool imx_should_bind(struct thermal_zone_device *tz,
361361
return trip->type == THERMAL_TRIP_PASSIVE;
362362
}
363363

364-
static struct thermal_zone_device_ops imx_tz_ops = {
364+
static const struct thermal_zone_device_ops imx_tz_ops = {
365365
.should_bind = imx_should_bind,
366366
.get_temp = imx_get_temp,
367367
.change_mode = imx_change_mode,

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ static int int3400_thermal_change_mode(struct thermal_zone_device *thermal,
515515
return result;
516516
}
517517

518-
static struct thermal_zone_device_ops int3400_thermal_ops = {
518+
static const struct thermal_zone_device_ops int3400_thermal_ops = {
519519
.get_temp = int3400_thermal_get_temp,
520520
.change_mode = int3400_thermal_change_mode,
521521
};

drivers/thermal/intel/int340x_thermal/int3402_thermal.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ static int int3402_thermal_probe(struct platform_device *pdev)
4545
struct int3402_thermal_data *d;
4646
int ret;
4747

48+
if (!adev)
49+
return -ENODEV;
50+
4851
if (!acpi_has_method(adev->handle, "_TMP"))
4952
return -ENODEV;
5053

drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev,
133133
if (ACPI_SUCCESS(status))
134134
int34x_zone->aux_trip_nr = trip_cnt;
135135

136-
zone_trips = kzalloc(sizeof(*zone_trips) * (trip_cnt + INT340X_THERMAL_MAX_TRIP_COUNT),
137-
GFP_KERNEL);
136+
zone_trips = kcalloc(trip_cnt + INT340X_THERMAL_MAX_TRIP_COUNT,
137+
sizeof(*zone_trips), GFP_KERNEL);
138138
if (!zone_trips) {
139139
ret = -ENOMEM;
140140
goto err_trips_alloc;
@@ -143,7 +143,7 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev,
143143
for (i = 0; i < trip_cnt; i++) {
144144
zone_trips[i].type = THERMAL_TRIP_PASSIVE;
145145
zone_trips[i].temperature = THERMAL_TEMP_INVALID;
146-
zone_trips[i].flags |= THERMAL_TRIP_FLAG_RW_TEMP;
146+
zone_trips[i].flags = THERMAL_TRIP_FLAG_RW_TEMP;
147147
zone_trips[i].priv = THERMAL_INT_TO_TRIP_PRIV(i);
148148
}
149149

drivers/thermal/intel/int340x_thermal/processor_thermal_device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#define PCI_DEVICE_ID_INTEL_SKL_THERMAL 0x1903
3232
#define PCI_DEVICE_ID_INTEL_TGL_THERMAL 0x9A03
3333
#define PCI_DEVICE_ID_INTEL_PTL_THERMAL 0xB01D
34+
#define PCI_DEVICE_ID_INTEL_WCL_THERMAL 0xFD1D
3435

3536
struct power_config {
3637
u32 index;

drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,9 @@ static const struct pci_device_id proc_thermal_pci_ids[] = {
485485
{ PCI_DEVICE_DATA(INTEL, ADL_THERMAL, PROC_THERMAL_FEATURE_RAPL |
486486
PROC_THERMAL_FEATURE_FIVR | PROC_THERMAL_FEATURE_DVFS | PROC_THERMAL_FEATURE_WT_REQ) },
487487
{ PCI_DEVICE_DATA(INTEL, LNLM_THERMAL, PROC_THERMAL_FEATURE_MSI_SUPPORT |
488-
PROC_THERMAL_FEATURE_RAPL | PROC_THERMAL_FEATURE_DLVR |
489-
PROC_THERMAL_FEATURE_WT_HINT | PROC_THERMAL_FEATURE_POWER_FLOOR) },
488+
PROC_THERMAL_FEATURE_RAPL | PROC_THERMAL_FEATURE_DLVR | PROC_THERMAL_FEATURE_DVFS |
489+
PROC_THERMAL_FEATURE_WT_HINT | PROC_THERMAL_FEATURE_POWER_FLOOR |
490+
PROC_THERMAL_FEATURE_PTC) },
490491
{ PCI_DEVICE_DATA(INTEL, MTLP_THERMAL, PROC_THERMAL_FEATURE_RAPL |
491492
PROC_THERMAL_FEATURE_FIVR | PROC_THERMAL_FEATURE_DVFS | PROC_THERMAL_FEATURE_DLVR |
492493
PROC_THERMAL_FEATURE_WT_HINT | PROC_THERMAL_FEATURE_POWER_FLOOR) },
@@ -495,8 +496,13 @@ static const struct pci_device_id proc_thermal_pci_ids[] = {
495496
{ PCI_DEVICE_DATA(INTEL, RPL_THERMAL, PROC_THERMAL_FEATURE_RAPL |
496497
PROC_THERMAL_FEATURE_FIVR | PROC_THERMAL_FEATURE_DVFS | PROC_THERMAL_FEATURE_WT_REQ) },
497498
{ PCI_DEVICE_DATA(INTEL, PTL_THERMAL, PROC_THERMAL_FEATURE_RAPL |
498-
PROC_THERMAL_FEATURE_DLVR | PROC_THERMAL_FEATURE_MSI_SUPPORT |
499-
PROC_THERMAL_FEATURE_WT_HINT | PROC_THERMAL_FEATURE_POWER_FLOOR) },
499+
PROC_THERMAL_FEATURE_DLVR | PROC_THERMAL_FEATURE_DVFS |
500+
PROC_THERMAL_FEATURE_MSI_SUPPORT | PROC_THERMAL_FEATURE_WT_HINT |
501+
PROC_THERMAL_FEATURE_POWER_FLOOR | PROC_THERMAL_FEATURE_PTC) },
502+
{ PCI_DEVICE_DATA(INTEL, WCL_THERMAL, PROC_THERMAL_FEATURE_MSI_SUPPORT |
503+
PROC_THERMAL_FEATURE_RAPL | PROC_THERMAL_FEATURE_DLVR |
504+
PROC_THERMAL_FEATURE_DVFS | PROC_THERMAL_FEATURE_WT_HINT |
505+
PROC_THERMAL_FEATURE_POWER_FLOOR | PROC_THERMAL_FEATURE_PTC) },
500506
{ },
501507
};
502508

drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ int proc_thermal_rfim_add(struct pci_dev *pdev, struct proc_thermal_device *proc
442442
switch (pdev->device) {
443443
case PCI_DEVICE_ID_INTEL_LNLM_THERMAL:
444444
case PCI_DEVICE_ID_INTEL_PTL_THERMAL:
445+
case PCI_DEVICE_ID_INTEL_WCL_THERMAL:
445446
dlvr_mmio_regs_table = lnl_dlvr_mmio_regs;
446447
dlvr_mapping = lnl_dlvr_mapping;
447448
break;

0 commit comments

Comments
 (0)