Skip to content

Commit 2504ba8

Browse files
committed
Merge tag 'pm-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki: "These add EPP support to the AMD P-state cpufreq driver, add support for new platforms to the Intel RAPL power capping driver, intel_idle and the Qualcomm cpufreq driver, enable thermal cooling for Tegra194, drop the custom cpufreq driver for loongson1 that is not necessary any more (and the corresponding cpufreq platform device), fix assorted issues and clean up code. Specifics: - Add EPP support to the AMD P-state cpufreq driver (Perry Yuan, Wyes Karny, Arnd Bergmann, Bagas Sanjaya) - Drop the custom cpufreq driver for loongson1 that is not necessary any more and the corresponding cpufreq platform device (Keguang Zhang) - Remove "select SRCU" from system sleep, cpufreq and OPP Kconfig entries (Paul E. McKenney) - Enable thermal cooling for Tegra194 (Yi-Wei Wang) - Register module device table and add missing compatibles for cpufreq-qcom-hw (Nícolas F. R. A. Prado, Abel Vesa and Luca Weiss) - Various dt binding updates for qcom-cpufreq-nvmem and opp-v2-kryo-cpu (Christian Marangi) - Make kobj_type structure in the cpufreq core constant (Thomas Weißschuh) - Make cpufreq_unregister_driver() return void (Uwe Kleine-König) - Make the TEO cpuidle governor check CPU utilization in order to refine idle state selection (Kajetan Puchalski) - Make Kconfig select the haltpoll cpuidle governor when the haltpoll cpuidle driver is selected and replace a default_idle() call in that driver with arch_cpu_idle() to allow MWAIT to be used (Li RongQing) - Add Emerald Rapids Xeon support to the intel_idle driver (Artem Bityutskiy) - Add ARCH_SUSPEND_POSSIBLE dependencies for ARMv4 cpuidle drivers to avoid randconfig build failures (Arnd Bergmann) - Make kobj_type structures used in the cpuidle sysfs interface constant (Thomas Weißschuh) - Make the cpuidle driver registration code update microsecond values of idle state parameters in accordance with their nanosecond values if they are provided (Rafael Wysocki) - Make the PSCI cpuidle driver prevent topology CPUs from being suspended on PREEMPT_RT (Krzysztof Kozlowski) - Document that pm_runtime_force_suspend() cannot be used with DPM_FLAG_SMART_SUSPEND (Richard Fitzgerald) - Add EXPORT macros for exporting PM functions from drivers (Richard Fitzgerald) - Remove /** from non-kernel-doc comments in hibernation code (Randy Dunlap) - Fix possible name leak in powercap_register_zone() (Yang Yingliang) - Add Meteor Lake and Emerald Rapids support to the intel_rapl power capping driver (Zhang Rui) - Modify the idle_inject power capping facility to support 100% idle injection (Srinivas Pandruvada) - Fix large time windows handling in the intel_rapl power capping driver (Zhang Rui) - Fix memory leaks with using debugfs_lookup() in the generic PM domains and Energy Model code (Greg Kroah-Hartman) - Add missing 'cache-unified' property in the example for kryo OPP bindings (Rob Herring) - Fix error checking in opp_migrate_dentry() (Qi Zheng) - Let qcom,opp-fuse-level be a 2-long array for qcom SoCs (Konrad Dybcio) - Modify some power management utilities to use the canonical ftrace path (Ross Zwisler) - Correct spelling problems for Documentation/power/ as reported by codespell (Randy Dunlap)" * tag 'pm-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (53 commits) Documentation: amd-pstate: disambiguate user space sections cpufreq: amd-pstate: Fix invalid write to MSR_AMD_CPPC_REQ dt-bindings: opp: opp-v2-kryo-cpu: enlarge opp-supported-hw maximum dt-bindings: cpufreq: qcom-cpufreq-nvmem: make cpr bindings optional dt-bindings: cpufreq: qcom-cpufreq-nvmem: specify supported opp tables PM: Add EXPORT macros for exporting PM functions cpuidle: psci: Do not suspend topology CPUs on PREEMPT_RT MIPS: loongson32: Drop obsolete cpufreq platform device powercap: intel_rapl: Fix handling for large time window cpuidle: driver: Update microsecond values of state parameters as needed cpuidle: sysfs: make kobj_type structures constant cpuidle: add ARCH_SUSPEND_POSSIBLE dependencies PM: EM: fix memory leak with using debugfs_lookup() PM: domains: fix memory leak with using debugfs_lookup() cpufreq: Make kobj_type structure constant cpufreq: davinci: Fix clk use after free cpufreq: amd-pstate: avoid uninitialized variable use cpufreq: Make cpufreq_unregister_driver() return void OPP: fix error checking in opp_migrate_dentry() dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM8550 compatible ...
2 parents 4a7d37e + dd855f0 commit 2504ba8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1160
-384
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7041,3 +7041,10 @@
70417041
management firmware translates the requests into actual
70427042
hardware states (core frequency, data fabric and memory
70437043
clocks etc.)
7044+
active
7045+
Use amd_pstate_epp driver instance as the scaling driver,
7046+
driver provides a hint to the hardware if software wants
7047+
to bias toward performance (0x0) or energy efficiency (0xff)
7048+
to the CPPC firmware. then CPPC power algorithm will
7049+
calculate the runtime workload and adjust the realtime cores
7050+
frequency.

Documentation/admin-guide/pm/amd-pstate.rst

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ with :c:macro:`MSR_AMD_CPPC_ENABLE` or ``cppc_set_enable``, it will respond
230230
to the request from AMD P-States.
231231

232232

233-
User Space Interface in ``sysfs``
234-
==================================
233+
User Space Interface in ``sysfs`` - Per-policy control
234+
======================================================
235235

236236
``amd-pstate`` exposes several global attributes (files) in ``sysfs`` to
237237
control its functionality at the system level. They are located in the
@@ -262,6 +262,25 @@ lowest non-linear performance in `AMD CPPC Performance Capability
262262
<perf_cap_>`_.)
263263
This attribute is read-only.
264264

265+
``energy_performance_available_preferences``
266+
267+
A list of all the supported EPP preferences that could be used for
268+
``energy_performance_preference`` on this system.
269+
These profiles represent different hints that are provided
270+
to the low-level firmware about the user's desired energy vs efficiency
271+
tradeoff. ``default`` represents the epp value is set by platform
272+
firmware. This attribute is read-only.
273+
274+
``energy_performance_preference``
275+
276+
The current energy performance preference can be read from this attribute.
277+
and user can change current preference according to energy or performance needs
278+
Please get all support profiles list from
279+
``energy_performance_available_preferences`` attribute, all the profiles are
280+
integer values defined between 0 to 255 when EPP feature is enabled by platform
281+
firmware, if EPP feature is disabled, driver will ignore the written value
282+
This attribute is read-write.
283+
265284
Other performance and frequency values can be read back from
266285
``/sys/devices/system/cpu/cpuX/acpi_cppc/``, see :ref:`cppc_sysfs`.
267286

@@ -280,8 +299,30 @@ module which supports the new AMD P-States mechanism on most of the future AMD
280299
platforms. The AMD P-States mechanism is the more performance and energy
281300
efficiency frequency management method on AMD processors.
282301

283-
Kernel Module Options for ``amd-pstate``
284-
=========================================
302+
303+
AMD Pstate Driver Operation Modes
304+
=================================
305+
306+
``amd_pstate`` CPPC has two operation modes: CPPC Autonomous(active) mode and
307+
CPPC non-autonomous(passive) mode.
308+
active mode and passive mode can be chosen by different kernel parameters.
309+
When in Autonomous mode, CPPC ignores requests done in the Desired Performance
310+
Target register and takes into account only the values set to the Minimum requested
311+
performance, Maximum requested performance, and Energy Performance Preference
312+
registers. When Autonomous is disabled, it only considers the Desired Performance Target.
313+
314+
Active Mode
315+
------------
316+
317+
``amd_pstate=active``
318+
319+
This is the low-level firmware control mode which is implemented by ``amd_pstate_epp``
320+
driver with ``amd_pstate=active`` passed to the kernel in the command line.
321+
In this mode, ``amd_pstate_epp`` driver provides a hint to the hardware if software
322+
wants to bias toward performance (0x0) or energy efficiency (0xff) to the CPPC firmware.
323+
then CPPC power algorithm will calculate the runtime workload and adjust the realtime
324+
cores frequency according to the power supply and thermal, core voltage and some other
325+
hardware conditions.
285326

286327
Passive Mode
287328
------------
@@ -298,6 +339,35 @@ processor must provide at least nominal performance requested and go higher if c
298339
operating conditions allow.
299340

300341

342+
User Space Interface in ``sysfs`` - General
343+
===========================================
344+
345+
Global Attributes
346+
-----------------
347+
348+
``amd-pstate`` exposes several global attributes (files) in ``sysfs`` to
349+
control its functionality at the system level. They are located in the
350+
``/sys/devices/system/cpu/amd-pstate/`` directory and affect all CPUs.
351+
352+
``status``
353+
Operation mode of the driver: "active", "passive" or "disable".
354+
355+
"active"
356+
The driver is functional and in the ``active mode``
357+
358+
"passive"
359+
The driver is functional and in the ``passive mode``
360+
361+
"disable"
362+
The driver is unregistered and not functional now.
363+
364+
This attribute can be written to in order to change the driver's
365+
operation mode or to unregister it. The string written to it must be
366+
one of the possible values of it and, if successful, writing one of
367+
these values to the sysfs file will cause the driver to switch over
368+
to the operation mode represented by that string - or to be
369+
unregistered in the "disable" case.
370+
301371
``cpupower`` tool support for ``amd-pstate``
302372
===============================================
303373

Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ properties:
2626
items:
2727
- enum:
2828
- qcom,qdu1000-cpufreq-epss
29+
- qcom,sc7280-cpufreq-epss
30+
- qcom,sc8280xp-cpufreq-epss
2931
- qcom,sm6375-cpufreq-epss
3032
- qcom,sm8250-cpufreq-epss
33+
- qcom,sm8350-cpufreq-epss
34+
- qcom,sm8450-cpufreq-epss
35+
- qcom,sm8550-cpufreq-epss
3136
- const: qcom,cpufreq-epss
3237

3338
reg:

Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-nvmem.yaml

Lines changed: 56 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ description: |
1717
on the CPU OPP in use. The CPUFreq driver sets the CPR power domain level
1818
according to the required OPPs defined in the CPU OPP tables.
1919
20+
For old implementation efuses are parsed to select the correct opp table and
21+
voltage and CPR is not supported/used.
22+
2023
select:
2124
properties:
2225
compatible:
@@ -33,37 +36,65 @@ select:
3336
required:
3437
- compatible
3538

36-
properties:
37-
cpus:
38-
type: object
39-
40-
patternProperties:
41-
'^cpu@[0-9a-f]+$':
42-
type: object
43-
44-
properties:
45-
power-domains:
46-
maxItems: 1
47-
48-
power-domain-names:
49-
items:
50-
- const: cpr
51-
52-
required:
53-
- power-domains
54-
- power-domain-names
55-
5639
patternProperties:
5740
'^opp-table(-[a-z0-9]+)?$':
58-
if:
41+
allOf:
42+
- if:
43+
properties:
44+
compatible:
45+
const: operating-points-v2-kryo-cpu
46+
then:
47+
$ref: /schemas/opp/opp-v2-kryo-cpu.yaml#
48+
49+
- if:
50+
properties:
51+
compatible:
52+
const: operating-points-v2-qcom-level
53+
then:
54+
$ref: /schemas/opp/opp-v2-qcom-level.yaml#
55+
56+
unevaluatedProperties: false
57+
58+
allOf:
59+
- if:
5960
properties:
6061
compatible:
61-
const: operating-points-v2-kryo-cpu
62+
contains:
63+
enum:
64+
- qcom,qcs404
65+
6266
then:
67+
properties:
68+
cpus:
69+
type: object
70+
71+
patternProperties:
72+
'^cpu@[0-9a-f]+$':
73+
type: object
74+
75+
properties:
76+
power-domains:
77+
maxItems: 1
78+
79+
power-domain-names:
80+
items:
81+
- const: cpr
82+
83+
required:
84+
- power-domains
85+
- power-domain-names
86+
6387
patternProperties:
64-
'^opp-?[0-9]+$':
65-
required:
66-
- required-opps
88+
'^opp-table(-[a-z0-9]+)?$':
89+
if:
90+
properties:
91+
compatible:
92+
const: operating-points-v2-kryo-cpu
93+
then:
94+
patternProperties:
95+
'^opp-?[0-9]+$':
96+
required:
97+
- required-opps
6798

6899
additionalProperties: true
69100

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,22 @@ patternProperties:
5050
opp-supported-hw:
5151
description: |
5252
A single 32 bit bitmap value, representing compatible HW.
53-
Bitmap:
53+
Bitmap for MSM8996 format:
5454
0: MSM8996, speedbin 0
5555
1: MSM8996, speedbin 1
5656
2: MSM8996, speedbin 2
57-
3-31: unused
58-
maximum: 0x7
57+
3: MSM8996, speedbin 3
58+
4-31: unused
59+
60+
Bitmap for MSM8996SG format (speedbin shifted of 4 left):
61+
0-3: unused
62+
4: MSM8996SG, speedbin 0
63+
5: MSM8996SG, speedbin 1
64+
6: MSM8996SG, speedbin 2
65+
7-31: unused
66+
enum: [0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7,
67+
0x9, 0xd, 0xe, 0xf,
68+
0x10, 0x20, 0x30, 0x70]
5969

6070
clock-latency-ns: true
6171

@@ -106,6 +116,7 @@ examples:
106116
L2_0: l2-cache {
107117
compatible = "cache";
108118
cache-level = <2>;
119+
cache-unified;
109120
};
110121
};
111122
@@ -140,6 +151,7 @@ examples:
140151
L2_1: l2-cache {
141152
compatible = "cache";
142153
cache-level = <2>;
154+
cache-unified;
143155
};
144156
};
145157

Documentation/devicetree/bindings/opp/opp-v2-qcom-level.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ patternProperties:
3030
this OPP node. Sometimes several corners/levels shares a certain fuse
3131
corner/level. A fuse corner/level contains e.g. ref uV, min uV,
3232
and max uV.
33-
$ref: /schemas/types.yaml#/definitions/uint32
33+
$ref: /schemas/types.yaml#/definitions/uint32-array
34+
minItems: 1
35+
maxItems: 2
3436

3537
required:
3638
- opp-level

Documentation/power/suspend-and-interrupts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ That may involve turning on a special signal handling logic within the platform
6767
during system sleep so as to trigger a system wakeup when needed. For example,
6868
the platform may include a dedicated interrupt controller used specifically for
6969
handling system wakeup events. Then, if a given interrupt line is supposed to
70-
wake up the system from sleep sates, the corresponding input of that interrupt
70+
wake up the system from sleep states, the corresponding input of that interrupt
7171
controller needs to be enabled to receive signals from the line in question.
7272
After wakeup, it generally is better to disable that input to prevent the
7373
dedicated controller from triggering interrupts unnecessarily.

arch/mips/include/asm/mach-loongson32/cpufreq.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

arch/mips/include/asm/mach-loongson32/platform.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <nand.h>
1313

1414
extern struct platform_device ls1x_uart_pdev;
15-
extern struct platform_device ls1x_cpufreq_pdev;
1615
extern struct platform_device ls1x_eth0_pdev;
1716
extern struct platform_device ls1x_eth1_pdev;
1817
extern struct platform_device ls1x_ehci_pdev;

arch/mips/loongson32/common/platform.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include <platform.h>
1717
#include <loongson1.h>
18-
#include <cpufreq.h>
1918
#include <dma.h>
2019
#include <nand.h>
2120

@@ -62,21 +61,6 @@ void __init ls1x_serial_set_uartclk(struct platform_device *pdev)
6261
p->uartclk = clk_get_rate(clk);
6362
}
6463

65-
/* CPUFreq */
66-
static struct plat_ls1x_cpufreq ls1x_cpufreq_pdata = {
67-
.clk_name = "cpu_clk",
68-
.osc_clk_name = "osc_clk",
69-
.max_freq = 266 * 1000,
70-
.min_freq = 33 * 1000,
71-
};
72-
73-
struct platform_device ls1x_cpufreq_pdev = {
74-
.name = "ls1x-cpufreq",
75-
.dev = {
76-
.platform_data = &ls1x_cpufreq_pdata,
77-
},
78-
};
79-
8064
/* Synopsys Ethernet GMAC */
8165
static struct stmmac_mdio_bus_data ls1x_mdio_bus_data = {
8266
.phy_mask = 0,

0 commit comments

Comments
 (0)