Skip to content

Commit 1ff7bc3

Browse files
committed
Merge tag 'pm-5.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more power management updates from Rafael Wysocki: "These update the ARM cpufreq drivers and fix up the CPPC cpufreq driver after recent changes, update the OPP code and PM documentation and add power sequences support to the system reboot and power off code. Specifics: - Add Tegra234 cpufreq support (Sumit Gupta) - Clean up and enhance the Mediatek cpufreq driver (Wan Jiabing, Rex-BC Chen, and Jia-Wei Chang) - Fix up the CPPC cpufreq driver after recent changes (Zheng Bin, Pierre Gondois) - Minor update to dt-binding for Qcom's opp-v2-kryo-cpu (Yassine Oudjana) - Use list iterator only inside the list_for_each_entry loop (Xiaomeng Tong, and Jakob Koschel) - New APIs related to finding OPP based on interconnect bandwidth (Krzysztof Kozlowski) - Fix the missing of_node_put() in _bandwidth_supported() (Dan Carpenter) - Cleanups (Krzysztof Kozlowski, and Viresh Kumar) - Add Out of Band mode description to the intel-speed-select utility documentation (Srinivas Pandruvada) - Add power sequences support to the system reboot and power off code and make related platform-specific changes for multiple platforms (Dmitry Osipenko, Geert Uytterhoeven)" * tag 'pm-5.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (60 commits) cpufreq: CPPC: Fix unused-function warning cpufreq: CPPC: Fix build error without CONFIG_ACPI_CPPC_CPUFREQ_FIE Documentation: admin-guide: PM: Add Out of Band mode kernel/reboot: Change registration order of legacy power-off handler m68k: virt: Switch to new sys-off handler API kernel/reboot: Add devm_register_restart_handler() kernel/reboot: Add devm_register_power_off_handler() soc/tegra: pmc: Use sys-off handler API to power off Nexus 7 properly reboot: Remove pm_power_off_prepare() regulator: pfuze100: Use devm_register_sys_off_handler() ACPI: power: Switch to sys-off handler API memory: emif: Use kernel_can_power_off() mips: Use do_kernel_power_off() ia64: Use do_kernel_power_off() x86: Use do_kernel_power_off() sh: Use do_kernel_power_off() m68k: Switch to new sys-off handler API powerpc: Use do_kernel_power_off() xen/x86: Use do_kernel_power_off() parisc: Use do_kernel_power_off() ...
2 parents 32665a9 + 9f9c1f6 commit 1ff7bc3

File tree

39 files changed

+1648
-551
lines changed

39 files changed

+1648
-551
lines changed

Documentation/admin-guide/pm/intel-speed-select.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,28 @@ Which shows that the base frequency now increased from 2600 MHz at performance
262262
level 0 to 2800 MHz at performance level 4. As a result, any workload, which can
263263
use fewer CPUs, can see a boost of 200 MHz compared to performance level 0.
264264

265+
Changing performance level via BMC Interface
266+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
267+
268+
It is possible to change SST-PP level using out of band (OOB) agent (Via some
269+
remote management console, through BMC "Baseboard Management Controller"
270+
interface). This mode is supported from the Sapphire Rapids processor
271+
generation. The kernel and tool change to support this mode is added to Linux
272+
kernel version 5.18. To enable this feature, kernel config
273+
"CONFIG_INTEL_HFI_THERMAL" is required. The minimum version of the tool
274+
is "v1.12" to support this feature, which is part of Linux kernel version 5.18.
275+
276+
To support such configuration, this tool can be used as a daemon. Add
277+
a command line option --oob::
278+
279+
# intel-speed-select --oob
280+
Intel(R) Speed Select Technology
281+
Executing on CPU model:143[0x8f]
282+
OOB mode is enabled and will run as daemon
283+
284+
In this mode the tool will online/offline CPUs based on the new performance
285+
level.
286+
265287
Check presence of other Intel(R) SST features
266288
---------------------------------------------
267289

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: "http://devicetree.org/schemas/arm/tegra/nvidia,tegra-ccplex-cluster.yaml#"
5+
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6+
7+
title: NVIDIA Tegra CPU COMPLEX CLUSTER area device tree bindings
8+
9+
maintainers:
10+
- Sumit Gupta <[email protected]>
11+
- Mikko Perttunen <[email protected]>
12+
- Jon Hunter <[email protected]>
13+
- Thierry Reding <[email protected]>
14+
15+
description: |+
16+
The Tegra CPU COMPLEX CLUSTER area contains memory-mapped
17+
registers that initiate CPU frequency/voltage transitions.
18+
19+
properties:
20+
$nodename:
21+
pattern: "ccplex@([0-9a-f]+)$"
22+
23+
compatible:
24+
enum:
25+
- nvidia,tegra186-ccplex-cluster
26+
- nvidia,tegra234-ccplex-cluster
27+
28+
reg:
29+
maxItems: 1
30+
31+
nvidia,bpmp:
32+
$ref: '/schemas/types.yaml#/definitions/phandle'
33+
description: |
34+
Specifies the BPMP node that needs to be queried to get
35+
operating point data for all CPUs.
36+
37+
additionalProperties: false
38+
39+
required:
40+
- compatible
41+
- reg
42+
- nvidia,bpmp
43+
- status
44+
45+
examples:
46+
- |
47+
ccplex@e000000 {
48+
compatible = "nvidia,tegra234-ccplex-cluster";
49+
reg = <0x0e000000 0x5ffff>;
50+
nvidia,bpmp = <&bpmp>;
51+
status = "okay";
52+
};

Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ Optional properties:
2020
Vsram to fit SoC specific needs. When absent, the voltage scaling
2121
flow is handled by hardware, hence no software "voltage tracking" is
2222
needed.
23+
- mediatek,cci:
24+
Used to confirm the link status between cpufreq and mediatek cci. Because
25+
cpufreq and mediatek cci could share the same regulator in some MediaTek SoCs.
26+
To prevent the issue of high frequency and low voltage, we need to use this
27+
property to make sure mediatek cci is ready.
28+
For details of mediatek cci, please refer to
29+
Documentation/devicetree/bindings/interconnect/mediatek,cci.yaml
2330
- #cooling-cells:
2431
For details, please refer to
2532
Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml

Documentation/devicetree/bindings/opp/opp-v2-kryo-cpu.yaml

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ description: |
1717
the CPU frequencies subset and voltage value of each OPP varies based on
1818
the silicon variant in use.
1919
Qualcomm Technologies, Inc. Process Voltage Scaling Tables
20-
defines the voltage and frequency value based on the msm-id in SMEM
21-
and speedbin blown in the efuse combination.
22-
The qcom-cpufreq-nvmem driver reads the msm-id and efuse value from the SoC
23-
to provide the OPP framework with required information (existing HW bitmap).
20+
defines the voltage and frequency value based on the speedbin blown in
21+
the efuse combination.
22+
The qcom-cpufreq-nvmem driver reads the efuse value from the SoC to provide
23+
the OPP framework with required information (existing HW bitmap).
2424
This is used to determine the voltage and frequency value for each OPP of
2525
operating-points-v2 table when it is parsed by the OPP framework.
2626
@@ -50,15 +50,11 @@ patternProperties:
5050
description: |
5151
A single 32 bit bitmap value, representing compatible HW.
5252
Bitmap:
53-
0: MSM8996 V3, speedbin 0
54-
1: MSM8996 V3, speedbin 1
55-
2: MSM8996 V3, speedbin 2
56-
3: unused
57-
4: MSM8996 SG, speedbin 0
58-
5: MSM8996 SG, speedbin 1
59-
6: MSM8996 SG, speedbin 2
60-
7-31: unused
61-
maximum: 0x77
53+
0: MSM8996, speedbin 0
54+
1: MSM8996, speedbin 1
55+
2: MSM8996, speedbin 2
56+
3-31: unused
57+
maximum: 0x7
6258

6359
clock-latency-ns: true
6460

@@ -184,19 +180,19 @@ examples:
184180
opp-307200000 {
185181
opp-hz = /bits/ 64 <307200000>;
186182
opp-microvolt = <905000 905000 1140000>;
187-
opp-supported-hw = <0x77>;
183+
opp-supported-hw = <0x7>;
188184
clock-latency-ns = <200000>;
189185
};
190-
opp-1593600000 {
191-
opp-hz = /bits/ 64 <1593600000>;
186+
opp-1401600000 {
187+
opp-hz = /bits/ 64 <1401600000>;
192188
opp-microvolt = <1140000 905000 1140000>;
193-
opp-supported-hw = <0x71>;
189+
opp-supported-hw = <0x5>;
194190
clock-latency-ns = <200000>;
195191
};
196-
opp-2188800000 {
197-
opp-hz = /bits/ 64 <2188800000>;
192+
opp-1593600000 {
193+
opp-hz = /bits/ 64 <1593600000>;
198194
opp-microvolt = <1140000 905000 1140000>;
199-
opp-supported-hw = <0x10>;
195+
opp-supported-hw = <0x1>;
200196
clock-latency-ns = <200000>;
201197
};
202198
};
@@ -209,25 +205,25 @@ examples:
209205
opp-307200000 {
210206
opp-hz = /bits/ 64 <307200000>;
211207
opp-microvolt = <905000 905000 1140000>;
212-
opp-supported-hw = <0x77>;
208+
opp-supported-hw = <0x7>;
213209
clock-latency-ns = <200000>;
214210
};
215-
opp-1593600000 {
216-
opp-hz = /bits/ 64 <1593600000>;
211+
opp-1804800000 {
212+
opp-hz = /bits/ 64 <1804800000>;
217213
opp-microvolt = <1140000 905000 1140000>;
218-
opp-supported-hw = <0x70>;
214+
opp-supported-hw = <0x6>;
219215
clock-latency-ns = <200000>;
220216
};
221-
opp-2150400000 {
222-
opp-hz = /bits/ 64 <2150400000>;
217+
opp-1900800000 {
218+
opp-hz = /bits/ 64 <1900800000>;
223219
opp-microvolt = <1140000 905000 1140000>;
224-
opp-supported-hw = <0x31>;
220+
opp-supported-hw = <0x4>;
225221
clock-latency-ns = <200000>;
226222
};
227-
opp-2342400000 {
228-
opp-hz = /bits/ 64 <2342400000>;
223+
opp-2150400000 {
224+
opp-hz = /bits/ 64 <2150400000>;
229225
opp-microvolt = <1140000 905000 1140000>;
230-
opp-supported-hw = <0x10>;
226+
opp-supported-hw = <0x1>;
231227
clock-latency-ns = <200000>;
232228
};
233229
};

arch/arm/kernel/reboot.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ void machine_power_off(void)
116116
{
117117
local_irq_disable();
118118
smp_send_stop();
119-
120-
if (pm_power_off)
121-
pm_power_off();
119+
do_kernel_power_off();
122120
}
123121

124122
/*

arch/arm64/kernel/process.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ void machine_power_off(void)
111111
{
112112
local_irq_disable();
113113
smp_send_stop();
114-
if (pm_power_off)
115-
pm_power_off();
114+
do_kernel_power_off();
116115
}
117116

118117
/*

arch/csky/kernel/power.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@ EXPORT_SYMBOL(pm_power_off);
99
void machine_power_off(void)
1010
{
1111
local_irq_disable();
12-
if (pm_power_off)
13-
pm_power_off();
12+
do_kernel_power_off();
1413
asm volatile ("bkpt");
1514
}
1615

1716
void machine_halt(void)
1817
{
1918
local_irq_disable();
20-
if (pm_power_off)
21-
pm_power_off();
19+
do_kernel_power_off();
2220
asm volatile ("bkpt");
2321
}
2422

arch/ia64/kernel/process.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/module.h>
2020
#include <linux/notifier.h>
2121
#include <linux/personality.h>
22+
#include <linux/reboot.h>
2223
#include <linux/sched.h>
2324
#include <linux/sched/debug.h>
2425
#include <linux/sched/hotplug.h>
@@ -599,8 +600,7 @@ machine_halt (void)
599600
void
600601
machine_power_off (void)
601602
{
602-
if (pm_power_off)
603-
pm_power_off();
603+
do_kernel_power_off();
604604
machine_halt();
605605
}
606606

arch/m68k/emu/natfeat.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/string.h>
1616
#include <linux/kernel.h>
1717
#include <linux/module.h>
18+
#include <linux/reboot.h>
1819
#include <linux/io.h>
1920
#include <asm/machdep.h>
2021
#include <asm/natfeat.h>
@@ -90,5 +91,5 @@ void __init nf_init(void)
9091
pr_info("NatFeats found (%s, %lu.%lu)\n", buf, version >> 16,
9192
version & 0xffff);
9293

93-
mach_power_off = nf_poweroff;
94+
register_platform_power_off(nf_poweroff);
9495
}

arch/m68k/include/asm/machdep.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ extern int (*mach_get_rtc_pll)(struct rtc_pll_info *);
2323
extern int (*mach_set_rtc_pll)(struct rtc_pll_info *);
2424
extern void (*mach_reset)( void );
2525
extern void (*mach_halt)( void );
26-
extern void (*mach_power_off)( void );
2726
extern unsigned long (*mach_hd_init) (unsigned long, unsigned long);
2827
extern void (*mach_hd_setup)(char *, int *);
2928
extern void (*mach_heartbeat) (int);

0 commit comments

Comments
 (0)