Skip to content

Commit d78794d

Browse files
committed
Merge tag 'thermal-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control updates from Rafael Wysocki: "These add support for Intel Panther Lake processors in multiple places, modify Intel thermal drivers to stop selecting the user space thermal governor which is not necessary for them to work any more and clean up the thermal core somewhat: - Add support for Panther Lake processors in multiple places (Zhang Rui, Srinivas Pandruvada) - Remove explicit user_space governor selection from Intel thermal drivers (Srinivas Pandruvada) - Rename a few things and relocate a comment in the thermal subsystem (Rafael Wysocki)" * tag 'thermal-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: core: Rename function argument related to trip crossing thermal: gov_bang_bang: Relocate regulation logic description thermal: core: Rename callback functions in two governors thermal: intel: Fix compile issue when CONFIG_NET is not defined thermal: intel: int340x: Panther Lake power floor and workload hint support thermal: intel: int340x: Panther Lake DLVR support thermal: intel: Remove explicit user_space governor selection ACPI: DPTF: Support Panther Lake thermal: intel: int340x: processor: Enable MMIO RAPL for Panther Lake powercap: intel_rapl: Add support for Panther Lake platform
2 parents 603f162 + 2dc7486 commit d78794d

16 files changed

+61
-48
lines changed

drivers/acpi/dptf/dptf_pch_fivr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ static const struct acpi_device_id pch_fivr_device_ids[] = {
152152
{"INTC1064", 0},
153153
{"INTC106B", 0},
154154
{"INTC10A3", 0},
155+
{"INTC10D7", 0},
155156
{"", 0},
156157
};
157158
MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids);

drivers/acpi/dptf/dptf_power.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ static const struct acpi_device_id int3407_device_ids[] = {
236236
{"INTC106D", 0},
237237
{"INTC10A4", 0},
238238
{"INTC10A5", 0},
239+
{"INTC10D8", 0},
240+
{"INTC10D9", 0},
239241
{"", 0},
240242
};
241243
MODULE_DEVICE_TABLE(acpi, int3407_device_ids);

drivers/acpi/dptf/int340x_thermal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
5555
{"INTC10A3"},
5656
{"INTC10A4"},
5757
{"INTC10A5"},
58+
{"INTC10D4"},
59+
{"INTC10D5"},
60+
{"INTC10D6"},
61+
{"INTC10D7"},
62+
{"INTC10D8"},
63+
{"INTC10D9"},
5864
{""},
5965
};
6066

drivers/acpi/fan.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
{"INTC1063", }, /* Fan for Meteor Lake generation */ \
2020
{"INTC106A", }, /* Fan for Lunar Lake generation */ \
2121
{"INTC10A2", }, /* Fan for Raptor Lake generation */ \
22+
{"INTC10D6", }, /* Fan for Panther Lake generation */ \
2223
{"PNP0C0B", } /* Generic ACPI fan */
2324

2425
#define ACPI_FPS_NAME_LEN 20

drivers/powercap/intel_rapl_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {
12651265
X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, &rapl_defaults_spr_server),
12661266
X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X, &rapl_defaults_spr_server),
12671267
X86_MATCH_VFM(INTEL_LUNARLAKE_M, &rapl_defaults_core),
1268+
X86_MATCH_VFM(INTEL_PANTHERLAKE_L, &rapl_defaults_core),
12681269
X86_MATCH_VFM(INTEL_ARROWLAKE_H, &rapl_defaults_core),
12691270
X86_MATCH_VFM(INTEL_ARROWLAKE, &rapl_defaults_core),
12701271
X86_MATCH_VFM(INTEL_ARROWLAKE_U, &rapl_defaults_core),

drivers/thermal/gov_bang_bang.c

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@
77
* Based on step_wise.c with following Copyrights:
88
* Copyright (C) 2012 Intel Corp
99
* Copyright (C) 2012 Durgadoss R <durgadoss.r@intel.com>
10+
*
11+
* Regulation Logic: a two point regulation, deliver cooling state depending
12+
* on the previous state shown in this diagram:
13+
*
14+
* Fan: OFF ON
15+
*
16+
* |
17+
* |
18+
* trip_temp: +---->+
19+
* | | ^
20+
* | | |
21+
* | | Temperature
22+
* (trip_temp - hyst): +<----+
23+
* |
24+
* |
25+
* |
26+
*
27+
* * If the fan is not running and temperature exceeds trip_temp, the fan
28+
* gets turned on.
29+
* * In case the fan is running, temperature must fall below
30+
* (trip_temp - hyst) so that the fan gets turned off again.
1031
*/
1132

1233
#include <linux/thermal.h>
@@ -34,36 +55,14 @@ static void bang_bang_set_instance_target(struct thermal_instance *instance,
3455
}
3556

3657
/**
37-
* bang_bang_control - controls devices associated with the given zone
58+
* bang_bang_trip_crossed - controls devices associated with the given zone
3859
* @tz: thermal_zone_device
3960
* @trip: the trip point
40-
* @crossed_up: whether or not the trip has been crossed on the way up
41-
*
42-
* Regulation Logic: a two point regulation, deliver cooling state depending
43-
* on the previous state shown in this diagram:
44-
*
45-
* Fan: OFF ON
46-
*
47-
* |
48-
* |
49-
* trip_temp: +---->+
50-
* | | ^
51-
* | | |
52-
* | | Temperature
53-
* (trip_temp - hyst): +<----+
54-
* |
55-
* |
56-
* |
57-
*
58-
* * If the fan is not running and temperature exceeds trip_temp, the fan
59-
* gets turned on.
60-
* * In case the fan is running, temperature must fall below
61-
* (trip_temp - hyst) so that the fan gets turned off again.
62-
*
61+
* @upward: whether or not the trip has been crossed on the way up
6362
*/
64-
static void bang_bang_control(struct thermal_zone_device *tz,
65-
const struct thermal_trip *trip,
66-
bool crossed_up)
63+
static void bang_bang_trip_crossed(struct thermal_zone_device *tz,
64+
const struct thermal_trip *trip,
65+
bool upward)
6766
{
6867
const struct thermal_trip_desc *td = trip_to_trip_desc(trip);
6968
struct thermal_instance *instance;
@@ -75,7 +74,7 @@ static void bang_bang_control(struct thermal_zone_device *tz,
7574
tz->temperature, trip->hysteresis);
7675

7776
list_for_each_entry(instance, &td->thermal_instances, trip_node)
78-
bang_bang_set_instance_target(instance, crossed_up);
77+
bang_bang_set_instance_target(instance, upward);
7978
}
8079

8180
static void bang_bang_manage(struct thermal_zone_device *tz)
@@ -123,7 +122,7 @@ static void bang_bang_update_tz(struct thermal_zone_device *tz,
123122

124123
static struct thermal_governor thermal_gov_bang_bang = {
125124
.name = "bang_bang",
126-
.trip_crossed = bang_bang_control,
125+
.trip_crossed = bang_bang_trip_crossed,
127126
.manage = bang_bang_manage,
128127
.update_tz = bang_bang_update_tz,
129128
};

drivers/thermal/gov_user_space.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ static int user_space_bind(struct thermal_zone_device *tz)
2323
}
2424

2525
/**
26-
* notify_user_space - Notifies user space about thermal events
26+
* user_space_trip_crossed - Notify user space about trip crossing events
2727
* @tz: thermal_zone_device
2828
* @trip: trip point
29-
* @crossed_up: whether or not the trip has been crossed on the way up
29+
* @upward: whether or not the trip has been crossed on the way up
3030
*
3131
* This function notifies the user space through UEvents.
3232
*/
33-
static void notify_user_space(struct thermal_zone_device *tz,
34-
const struct thermal_trip *trip,
35-
bool crossed_up)
33+
static void user_space_trip_crossed(struct thermal_zone_device *tz,
34+
const struct thermal_trip *trip,
35+
bool upward)
3636
{
3737
char *thermal_prop[5];
3838
int i;
@@ -52,7 +52,7 @@ static void notify_user_space(struct thermal_zone_device *tz,
5252

5353
static struct thermal_governor thermal_gov_user_space = {
5454
.name = "user_space",
55-
.trip_crossed = notify_user_space,
55+
.trip_crossed = user_space_trip_crossed,
5656
.bind_to_tz = user_space_bind,
5757
};
5858
THERMAL_GOVERNOR_DECLARE(thermal_gov_user_space);

drivers/thermal/intel/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ config INTEL_TCC
2121

2222
config X86_PKG_TEMP_THERMAL
2323
tristate "X86 package temperature thermal driver"
24-
depends on X86_THERMAL_VECTOR
25-
select THERMAL_GOV_USER_SPACE
24+
depends on X86_THERMAL_VECTOR && NET
25+
select THERMAL_NETLINK
2626
select INTEL_TCC
2727
default m
2828
help

drivers/thermal/intel/int340x_thermal/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
config INT340X_THERMAL
77
tristate "ACPI INT340X thermal drivers"
8-
depends on X86_64 && ACPI && PCI
9-
select THERMAL_GOV_USER_SPACE
8+
depends on X86_64 && ACPI && PCI && NET
9+
select THERMAL_NETLINK
1010
select ACPI_THERMAL_REL
1111
select ACPI_FAN
1212
select ACPI_THERMAL_LIB

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,6 @@ static struct thermal_zone_device_ops int3400_thermal_ops = {
521521
};
522522

523523
static struct thermal_zone_params int3400_thermal_params = {
524-
.governor_name = "user_space",
525524
.no_hwmon = true,
526525
};
527526

@@ -690,6 +689,7 @@ static const struct acpi_device_id int3400_thermal_match[] = {
690689
{"INTC1042", 0},
691690
{"INTC1068", 0},
692691
{"INTC10A0", 0},
692+
{"INTC10D4", 0},
693693
{}
694694
};
695695

0 commit comments

Comments
 (0)