Skip to content

Commit 9530971

Browse files
author
CKI KWF Bot
committed
Merge: Update int340x_thermal driver to upstream 6.17
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7452 JIRA: https://issues.redhat.com/browse/RHEL-85463 Omitted-fix: 9220aa8 ("x86/msr: Remove a superfluous inclusion of <asm/asm.h>") partial commit, the affected portion of efef7f1 was not included Various improvements and additional platform support. Signed-off-by: David Arcari <darcari@redhat.com> Approved-by: Steve Best <sbest@redhat.com> Approved-by: Tony Camuso <tcamuso@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 7e25be9 + 2300edf commit 9530971

24 files changed

+403
-17
lines changed

Documentation/driver-api/thermal/intel_dptf.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,36 @@ ABI.
191191
User space can specify any one of the available workload type using
192192
this interface.
193193

194+
:file:`/sys/bus/pci/devices/0000\:00\:04.0/ptc_0_control`
195+
:file:`/sys/bus/pci/devices/0000\:00\:04.0/ptc_1_control`
196+
:file:`/sys/bus/pci/devices/0000\:00\:04.0/ptc_2_control`
197+
198+
All these controls needs admin privilege to update.
199+
200+
``enable`` (RW)
201+
1 for enable, 0 for disable. Shows the current enable status of
202+
platform temperature control feature. User space can enable/disable
203+
hardware controls.
204+
205+
``temperature_target`` (RW)
206+
Update a new temperature target in milli degree celsius for hardware to
207+
use for the temperature control.
208+
209+
``thermal_tolerance`` (RW)
210+
This attribute ranges from 0 to 7, where 0 represents
211+
the most aggressive control to avoid any temperature overshoots, and
212+
7 represents a more graceful approach, favoring performance even at
213+
the expense of temperature overshoots.
214+
Note: This level may not scale linearly. For example, a value of 3 does
215+
not necessarily imply a 50% improvement in performance compared to a
216+
value of 0.
217+
218+
Given that this is platform temperature control, it is expected that a
219+
single user-level manager owns and manages the controls. If multiple
220+
user-level software applications attempt to write different targets, it
221+
can lead to unexpected behavior.
222+
223+
194224
DPTF Processor thermal RFIM interface
195225
--------------------------------------------
196226

drivers/acpi/dptf/dptf_power.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ static const struct acpi_device_id int3407_device_ids[] = {
238238
{"INTC10A5", 0},
239239
{"INTC10D8", 0},
240240
{"INTC10D9", 0},
241+
{"INTC1100", 0},
242+
{"INTC1101", 0},
241243
{"", 0},
242244
};
243245
MODULE_DEVICE_TABLE(acpi, int3407_device_ids);

drivers/acpi/dptf/int340x_thermal.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
6161
{"INTC10D7"},
6262
{"INTC10D8"},
6363
{"INTC10D9"},
64+
{"INTC10FC"},
65+
{"INTC10FD"},
66+
{"INTC10FE"},
67+
{"INTC10FF"},
68+
{"INTC1100"},
69+
{"INTC1101"},
70+
{"INTC1102"},
6471
{""},
6572
};
6673

drivers/acpi/fan.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
{"INTC106A", }, /* Fan for Lunar Lake generation */ \
1919
{"INTC10A2", }, /* Fan for Raptor Lake generation */ \
2020
{"INTC10D6", }, /* Fan for Panther Lake generation */ \
21+
{"INTC10FE", }, /* Fan for Wildcat Lake generation */ \
2122
{"PNP0C0B", } /* Generic ACPI fan */
2223

2324
#define ACPI_FPS_NAME_LEN 20

drivers/thermal/armada_thermal.c

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

413-
static struct thermal_zone_device_ops legacy_ops = {
413+
static const struct thermal_zone_device_ops legacy_ops = {
414414
.get_temp = armada_get_temp_legacy,
415415
};
416416

drivers/thermal/da9062-thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static int da9062_thermal_get_temp(struct thermal_zone_device *z,
170170
return 0;
171171
}
172172

173-
static struct thermal_zone_device_ops da9062_thermal_ops = {
173+
static const struct thermal_zone_device_ops da9062_thermal_ops = {
174174
.get_temp = da9062_thermal_get_temp,
175175
.get_trip_type = da9062_thermal_get_trip_type,
176176
.get_trip_temp = da9062_thermal_get_trip_temp,

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
@@ -396,7 +396,7 @@ static int imx_unbind(struct thermal_zone_device *tz,
396396
return 0;
397397
}
398398

399-
static struct thermal_zone_device_ops imx_tz_ops = {
399+
static const struct thermal_zone_device_ops imx_tz_ops = {
400400
.bind = imx_bind,
401401
.unbind = imx_unbind,
402402
.get_temp = imx_get_temp,

drivers/thermal/intel/int340x_thermal/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_device_pci_legacy.o
99
obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_device_pci.o
1010
obj-$(CONFIG_PROC_THERMAL_MMIO_RAPL) += processor_thermal_rapl.o
1111
obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_rfim.o
12+
obj-$(CONFIG_INT340X_THERMAL) += platform_temperature_control.o
1213
obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_mbox.o
1314
obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_wt_req.o
1415
obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_wt_hint.o

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ static int int3400_thermal_change_mode(struct thermal_zone_device *thermal,
522522
return result;
523523
}
524524

525-
static struct thermal_zone_device_ops int3400_thermal_ops = {
525+
static const struct thermal_zone_device_ops int3400_thermal_ops = {
526526
.get_temp = int3400_thermal_get_temp,
527527
.change_mode = int3400_thermal_change_mode,
528528
};
@@ -697,6 +697,7 @@ static const struct acpi_device_id int3400_thermal_match[] = {
697697
{"INTC1068", 0},
698698
{"INTC10A0", 0},
699699
{"INTC10D4", 0},
700+
{"INTC10FC", 0},
700701
{}
701702
};
702703

0 commit comments

Comments
 (0)