Skip to content

Commit 0cfd870

Browse files
committed
Merge tag 'pm-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki: "These update several cpufreq drivers and the cpufreq core, add sysfs interface for exposing the time really spent in the platform low-power state during suspend-to-idle, update devfreq (core and drivers) and the pm-graph suite of tools and clean up code. Specifics: - Fix the frequency unit in cpufreq_verify_current_freq checks() Sanjay Chandrashekara) - Make mode_state_machine in amd-pstate static (Tom Rix) - Make the cpufreq core require drivers with target_index() to set freq_table (Viresh Kumar) - Fix typo in the ARM_BRCMSTB_AVS_CPUFREQ Kconfig entry (Jingyu Wang) - Use of_property_read_bool() for boolean properties in the pmac32 cpufreq driver (Rob Herring) - Make the cpufreq sysfs interface return proper error codes on obviously invalid input (qinyu) - Add guided autonomous mode support to the AMD P-state driver (Wyes Karny) - Make the Intel P-state driver enable HWP IO boost on all server platforms (Srinivas Pandruvada) - Add opp and bandwidth support to tegra194 cpufreq driver (Sumit Gupta) - Use of_property_present() for testing DT property presence (Rob Herring) - Remove MODULE_LICENSE in non-modules (Nick Alcock) - Add SM7225 to cpufreq-dt-platdev blocklist (Luca Weiss) - Optimizations and fixes for qcom-cpufreq-hw driver (Krzysztof Kozlowski, Konrad Dybcio, and Bjorn Andersson) - DT binding updates for qcom-cpufreq-hw driver (Konrad Dybcio and Bartosz Golaszewski) - Updates and fixes for mediatek driver (Jia-Wei Chang and AngeloGioacchino Del Regno) - Use of_property_present() for testing DT property presence in the cpuidle code (Rob Herring) - Drop unnecessary (void *) conversions from the PM core (Li zeming) - Add sysfs files to represent time spent in a platform sleep state during suspend-to-idle and make AMD and Intel PMC drivers use them Mario Limonciello) - Use of_property_present() for testing DT property presence (Rob Herring) - Add set_required_opps() callback to the 'struct opp_table', to make the code paths cleaner (Viresh Kumar) - Update the pm-graph siute of utilities to v5.11 with the following changes: * New script which allows users to install the latest pm-graph from the upstream github repo. * Update all the dmesg suspend/resume PM print formats to be able to process recent timelines using dmesg only. * Add ethtool output to the log for the system's ethernet device if ethtool exists. * Make the tool more robustly handle events where mangled dmesg or ftrace outputs do not include all the requisite data. - Make the sleepgraph utility recognize "CPU killed" messages (Xueqin Luo) - Remove unneeded SRCU selection in Kconfig because it's always set from devfreq core (Paul E. McKenney) - Drop of_match_ptr() macro from exynos-bus.c because this driver is always using the DT table for driver probe (Krzysztof Kozlowski) - Use the preferred of_property_present() instead of the low-level of_get_property() on exynos-bus.c (Rob Herring) - Use devm_platform_get_and_ioream_resource() in exyno-ppmu.c (Yang Li)" * tag 'pm-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (44 commits) platform/x86/intel/pmc: core: Report duration of time in HW sleep state platform/x86/intel/pmc: core: Always capture counters on suspend platform/x86/amd: pmc: Report duration of time in hw sleep state PM: Add sysfs files to represent time spent in hardware sleep state cpufreq: use correct unit when verify cur freq cpufreq: tegra194: add OPP support and set bandwidth cpufreq: amd-pstate: Make varaiable mode_state_machine static PM: core: Remove unnecessary (void *) conversions cpufreq: drivers with target_index() must set freq_table PM / devfreq: exynos-ppmu: Use devm_platform_get_and_ioremap_resource() OPP: Move required opps configuration to specialized callback OPP: Handle all genpd cases together in _set_required_opps() cpufreq: qcom-cpufreq-hw: Revert adding cpufreq qos dt-bindings: cpufreq: cpufreq-qcom-hw: Add QCM2290 dt-bindings: cpufreq: cpufreq-qcom-hw: Sanitize data per compatible dt-bindings: cpufreq: cpufreq-qcom-hw: Allow just 1 frequency domain cpufreq: Add SM7225 to cpufreq-dt-platdev blocklist cpufreq: qcom-cpufreq-hw: fix double IO unmap and resource release on exit cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623 cpufreq: mediatek: raise proc/sram max voltage for MT8516 ...
2 parents 793582f + d3f2c40 commit 0cfd870

40 files changed

+895
-302
lines changed

Documentation/ABI/testing/sysfs-power

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,35 @@ Description:
413413
The /sys/power/suspend_stats/last_failed_step file contains
414414
the last failed step in the suspend/resume path.
415415

416+
What: /sys/power/suspend_stats/last_hw_sleep
417+
Date: June 2023
418+
Contact: Mario Limonciello <[email protected]>
419+
Description:
420+
The /sys/power/suspend_stats/last_hw_sleep file
421+
contains the duration of time spent in a hardware sleep
422+
state in the most recent system suspend-resume cycle.
423+
This number is measured in microseconds.
424+
425+
What: /sys/power/suspend_stats/total_hw_sleep
426+
Date: June 2023
427+
Contact: Mario Limonciello <[email protected]>
428+
Description:
429+
The /sys/power/suspend_stats/total_hw_sleep file
430+
contains the aggregate of time spent in a hardware sleep
431+
state since the kernel was booted. This number
432+
is measured in microseconds.
433+
434+
What: /sys/power/suspend_stats/max_hw_sleep
435+
Date: June 2023
436+
Contact: Mario Limonciello <[email protected]>
437+
Description:
438+
The /sys/power/suspend_stats/max_hw_sleep file
439+
contains the maximum amount of time that the hardware can
440+
report for time spent in a hardware sleep state. When sleep
441+
cycles are longer than this time, the values for
442+
'total_hw_sleep' and 'last_hw_sleep' may not be accurate.
443+
This number is measured in microseconds.
444+
416445
What: /sys/power/sync_on_suspend
417446
Date: October 2019
418447
Contact: Jonas Meurer <[email protected]>

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,29 @@
339339
This mode requires kvm-amd.avic=1.
340340
(Default when IOMMU HW support is present.)
341341

342+
amd_pstate= [X86]
343+
disable
344+
Do not enable amd_pstate as the default
345+
scaling driver for the supported processors
346+
passive
347+
Use amd_pstate with passive mode as a scaling driver.
348+
In this mode autonomous selection is disabled.
349+
Driver requests a desired performance level and platform
350+
tries to match the same performance level if it is
351+
satisfied by guaranteed performance level.
352+
active
353+
Use amd_pstate_epp driver instance as the scaling driver,
354+
driver provides a hint to the hardware if software wants
355+
to bias toward performance (0x0) or energy efficiency (0xff)
356+
to the CPPC firmware. then CPPC power algorithm will
357+
calculate the runtime workload and adjust the realtime cores
358+
frequency.
359+
guided
360+
Activate guided autonomous mode. Driver requests minimum and
361+
maximum performance level and the platform autonomously
362+
selects a performance level in this range and appropriate
363+
to the current workload.
364+
342365
amijoy.map= [HW,JOY] Amiga joystick support
343366
Map of devices attached to JOY0DAT and JOY1DAT
344367
Format: <a>,<b>
@@ -7062,20 +7085,3 @@
70627085
xmon commands.
70637086
off xmon is disabled.
70647087

7065-
amd_pstate= [X86]
7066-
disable
7067-
Do not enable amd_pstate as the default
7068-
scaling driver for the supported processors
7069-
passive
7070-
Use amd_pstate as a scaling driver, driver requests a
7071-
desired performance on this abstract scale and the power
7072-
management firmware translates the requests into actual
7073-
hardware states (core frequency, data fabric and memory
7074-
clocks etc.)
7075-
active
7076-
Use amd_pstate_epp driver instance as the scaling driver,
7077-
driver provides a hint to the hardware if software wants
7078-
to bias toward performance (0x0) or energy efficiency (0xff)
7079-
to the CPPC firmware. then CPPC power algorithm will
7080-
calculate the runtime workload and adjust the realtime cores
7081-
frequency.

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

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,18 @@ efficiency frequency management method on AMD processors.
303303
AMD Pstate Driver Operation Modes
304304
=================================
305305

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.
306+
``amd_pstate`` CPPC has 3 operation modes: autonomous (active) mode,
307+
non-autonomous (passive) mode and guided autonomous (guided) mode.
308+
Active/passive/guided mode can be chosen by different kernel parameters.
309+
310+
- In autonomous mode, platform ignores the desired performance level request
311+
and takes into account only the values set to the minimum, maximum and energy
312+
performance preference registers.
313+
- In non-autonomous mode, platform gets desired performance level
314+
from OS directly through Desired Performance Register.
315+
- In guided-autonomous mode, platform sets operating performance level
316+
autonomously according to the current workload and within the limits set by
317+
OS through min and max performance registers.
313318

314319
Active Mode
315320
------------
@@ -338,6 +343,15 @@ to the Performance Reduction Tolerance register. Above the nominal performance l
338343
processor must provide at least nominal performance requested and go higher if current
339344
operating conditions allow.
340345

346+
Guided Mode
347+
-----------
348+
349+
``amd_pstate=guided``
350+
351+
If ``amd_pstate=guided`` is passed to kernel command line option then this mode
352+
is activated. In this mode, driver requests minimum and maximum performance
353+
level and the platform autonomously selects a performance level in this range
354+
and appropriate to the current workload.
341355

342356
User Space Interface in ``sysfs`` - General
343357
===========================================
@@ -358,6 +372,9 @@ control its functionality at the system level. They are located in the
358372
"passive"
359373
The driver is functional and in the ``passive mode``
360374

375+
"guided"
376+
The driver is functional and in the ``guided mode``
377+
361378
"disable"
362379
The driver is unregistered and not functional now.
363380

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

Lines changed: 116 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,20 @@ properties:
2020
oneOf:
2121
- description: v1 of CPUFREQ HW
2222
items:
23+
- enum:
24+
- qcom,qcm2290-cpufreq-hw
25+
- qcom,sc7180-cpufreq-hw
26+
- qcom,sdm845-cpufreq-hw
27+
- qcom,sm6115-cpufreq-hw
28+
- qcom,sm6350-cpufreq-hw
29+
- qcom,sm8150-cpufreq-hw
2330
- const: qcom,cpufreq-hw
2431

2532
- description: v2 of CPUFREQ HW (EPSS)
2633
items:
2734
- enum:
2835
- qcom,qdu1000-cpufreq-epss
36+
- qcom,sa8775p-cpufreq-epss
2937
- qcom,sc7280-cpufreq-epss
3038
- qcom,sc8280xp-cpufreq-epss
3139
- qcom,sm6375-cpufreq-epss
@@ -36,14 +44,14 @@ properties:
3644
- const: qcom,cpufreq-epss
3745

3846
reg:
39-
minItems: 2
47+
minItems: 1
4048
items:
4149
- description: Frequency domain 0 register region
4250
- description: Frequency domain 1 register region
4351
- description: Frequency domain 2 register region
4452

4553
reg-names:
46-
minItems: 2
54+
minItems: 1
4755
items:
4856
- const: freq-domain0
4957
- const: freq-domain1
@@ -85,6 +93,111 @@ required:
8593

8694
additionalProperties: false
8795

96+
allOf:
97+
- if:
98+
properties:
99+
compatible:
100+
contains:
101+
enum:
102+
- qcom,qcm2290-cpufreq-hw
103+
then:
104+
properties:
105+
reg:
106+
minItems: 1
107+
maxItems: 1
108+
109+
reg-names:
110+
minItems: 1
111+
maxItems: 1
112+
113+
interrupts:
114+
minItems: 1
115+
maxItems: 1
116+
117+
interrupt-names:
118+
minItems: 1
119+
120+
- if:
121+
properties:
122+
compatible:
123+
contains:
124+
enum:
125+
- qcom,qdu1000-cpufreq-epss
126+
- qcom,sc7180-cpufreq-hw
127+
- qcom,sc8280xp-cpufreq-epss
128+
- qcom,sdm845-cpufreq-hw
129+
- qcom,sm6115-cpufreq-hw
130+
- qcom,sm6350-cpufreq-hw
131+
- qcom,sm6375-cpufreq-epss
132+
then:
133+
properties:
134+
reg:
135+
minItems: 2
136+
maxItems: 2
137+
138+
reg-names:
139+
minItems: 2
140+
maxItems: 2
141+
142+
interrupts:
143+
minItems: 2
144+
maxItems: 2
145+
146+
interrupt-names:
147+
minItems: 2
148+
149+
- if:
150+
properties:
151+
compatible:
152+
contains:
153+
enum:
154+
- qcom,sc7280-cpufreq-epss
155+
- qcom,sm8250-cpufreq-epss
156+
- qcom,sm8350-cpufreq-epss
157+
- qcom,sm8450-cpufreq-epss
158+
- qcom,sm8550-cpufreq-epss
159+
then:
160+
properties:
161+
reg:
162+
minItems: 3
163+
maxItems: 3
164+
165+
reg-names:
166+
minItems: 3
167+
maxItems: 3
168+
169+
interrupts:
170+
minItems: 3
171+
maxItems: 3
172+
173+
interrupt-names:
174+
minItems: 3
175+
176+
- if:
177+
properties:
178+
compatible:
179+
contains:
180+
enum:
181+
- qcom,sm8150-cpufreq-hw
182+
then:
183+
properties:
184+
reg:
185+
minItems: 3
186+
maxItems: 3
187+
188+
reg-names:
189+
minItems: 3
190+
maxItems: 3
191+
192+
# On some SoCs the Prime core shares the LMH irq with Big cores
193+
interrupts:
194+
minItems: 2
195+
maxItems: 2
196+
197+
interrupt-names:
198+
minItems: 2
199+
200+
88201
examples:
89202
- |
90203
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
@@ -235,7 +348,7 @@ examples:
235348
#size-cells = <1>;
236349
237350
cpufreq@17d43000 {
238-
compatible = "qcom,cpufreq-hw";
351+
compatible = "qcom,sdm845-cpufreq-hw", "qcom,cpufreq-hw";
239352
reg = <0x17d43000 0x1400>, <0x17d45800 0x1400>;
240353
reg-names = "freq-domain0", "freq-domain1";
241354

0 commit comments

Comments
 (0)