Skip to content

Commit b35b6d4

Browse files
committed
Merge tag 'pm-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki: "The most signigicant change here is the addition of a new cpufreq 'P-state' driver for AMD processors as a better replacement for the venerable acpi-cpufreq driver. There are also other cpufreq updates (in the core, intel_pstate, ARM drivers), PM core updates (mostly related to adding new macros for declaring PM operations which should make the lives of driver developers somewhat easier), and a bunch of assorted fixes and cleanups. Summary: - Add new P-state driver for AMD processors (Huang Rui). - Fix initialization of min and max frequency QoS requests in the cpufreq core (Rafael Wysocki). - Fix EPP handling on Alder Lake in intel_pstate (Srinivas Pandruvada). - Make intel_pstate update cpuinfo.max_freq when notified of HWP capabilities changes and drop a redundant function call from that driver (Rafael Wysocki). - Improve IRQ support in the Qcom cpufreq driver (Ard Biesheuvel, Stephen Boyd, Vladimir Zapolskiy). - Fix double devm_remap() in the Mediatek cpufreq driver (Hector Yuan). - Introduce thermal pressure helpers for cpufreq CPU cooling (Lukasz Luba). - Make cpufreq use default_groups in kobj_type (Greg Kroah-Hartman). - Make cpuidle use default_groups in kobj_type (Greg Kroah-Hartman). - Fix two comments in cpuidle code (Jason Wang, Yang Li). - Allow model-specific normal EPB value to be used in the intel_epb sysfs attribute handling code (Srinivas Pandruvada). - Simplify locking in pm_runtime_put_suppliers() (Rafael Wysocki). - Add safety net to supplier device release in the runtime PM core code (Rafael Wysocki). - Capture device status before disabling runtime PM for it (Rafael Wysocki). - Add new macros for declaring PM operations to allow drivers to avoid guarding them with CONFIG_PM #ifdefs or __maybe_unused and update some drivers to use these macros (Paul Cercueil). - Allow ACPI hardware signature to be honoured during restore from hibernation (David Woodhouse). - Update outdated operating performance points (OPP) documentation (Tang Yizhou). - Reduce log severity for informative message regarding frequency transition failures in devfreq (Tzung-Bi Shih). - Add DRAM frequency controller devfreq driver for Allwinner sunXi SoCs (Samuel Holland). - Add missing COMMON_CLK dependency to sun8i devfreq driver (Arnd Bergmann). - Add support for new layout of Psys PowerLimit Register on SPR to the Intel RAPL power capping driver (Zhang Rui). - Fix typo in a comment in idle_inject.c (Jason Wang). - Remove unused function definition from the DTPM (Dynamit Thermal Power Management) power capping framework (Daniel Lezcano). - Reduce DTPM trace verbosity (Daniel Lezcano)" * tag 'pm-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (53 commits) x86, sched: Fix undefined reference to init_freq_invariance_cppc() build error cpufreq: amd-pstate: Fix Kconfig dependencies for AMD P-State cpufreq: amd-pstate: Fix struct amd_cpudata kernel-doc comment cpuidle: use default_groups in kobj_type x86: intel_epb: Allow model specific normal EPB value MAINTAINERS: Add AMD P-State driver maintainer entry Documentation: amd-pstate: Add AMD P-State driver introduction cpufreq: amd-pstate: Add AMD P-State performance attributes cpufreq: amd-pstate: Add AMD P-State frequencies attributes cpufreq: amd-pstate: Add boost mode support for AMD P-State cpufreq: amd-pstate: Add trace for AMD P-State module cpufreq: amd-pstate: Introduce the support for the processors with shared memory solution cpufreq: amd-pstate: Add fast switch function for AMD P-State cpufreq: amd-pstate: Introduce a new AMD P-State driver to support future processors ACPI: CPPC: Add CPPC enable register function ACPI: CPPC: Check present CPUs for determining _CPC is valid ACPI: CPPC: Implement support for SystemIO registers x86/msr: Add AMD CPPC MSR definitions x86/cpufeatures: Add AMD Collaborative Processor Performance Control feature flag cpufreq: use default_groups in kobj_type ...
2 parents bca2175 + 78e6e4d commit b35b6d4

Some content is hidden

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

55 files changed

+2274
-218
lines changed

Documentation/admin-guide/acpi/cppc_sysfs.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Collaborative Processor Performance Control (CPPC)
55
==================================================
66

7+
.. _cppc_sysfs:
8+
79
CPPC
810
====
911

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,23 @@
225225
For broken nForce2 BIOS resulting in XT-PIC timer.
226226

227227
acpi_sleep= [HW,ACPI] Sleep options
228-
Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
229-
old_ordering, nonvs, sci_force_enable, nobl }
228+
Format: { s3_bios, s3_mode, s3_beep, s4_hwsig,
229+
s4_nohwsig, old_ordering, nonvs,
230+
sci_force_enable, nobl }
230231
See Documentation/power/video.rst for information on
231232
s3_bios and s3_mode.
232233
s3_beep is for debugging; it makes the PC's speaker beep
233234
as soon as the kernel's real-mode entry point is called.
235+
s4_hwsig causes the kernel to check the ACPI hardware
236+
signature during resume from hibernation, and gracefully
237+
refuse to resume if it has changed. This complies with
238+
the ACPI specification but not with reality, since
239+
Windows does not do this and many laptops do change it
240+
on docking. So the default behaviour is to allow resume
241+
and simply warn when the signature changes, unless the
242+
s4_hwsig option is enabled.
234243
s4_nohwsig prevents ACPI hardware signature from being
235-
used during resume from hibernation.
244+
used (or even warned about) during resume.
236245
old_ordering causes the ACPI 1.0 ordering of the _PTS
237246
control method, with respect to putting devices into
238247
low power states, to be enforced (the ACPI 2.0 ordering

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

Lines changed: 382 additions & 0 deletions
Large diffs are not rendered by default.

Documentation/admin-guide/pm/working-state.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Working-State Power Management
1111
intel_idle
1212
cpufreq
1313
intel_pstate
14+
amd-pstate
1415
cpufreq_drivers
1516
intel_epb
1617
intel-speed-select

Documentation/power/opp.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ We can represent these as three OPPs as the following {Hz, uV} tuples:
4848
OPP library provides a set of helper functions to organize and query the OPP
4949
information. The library is located in drivers/opp/ directory and the header
5050
is located in include/linux/pm_opp.h. OPP library can be enabled by enabling
51-
CONFIG_PM_OPP from power management menuconfig menu. OPP library depends on
52-
CONFIG_PM as certain SoCs such as Texas Instrument's OMAP framework allows to
53-
optionally boot at a certain OPP without needing cpufreq.
51+
CONFIG_PM_OPP from power management menuconfig menu. Certain SoCs such as Texas
52+
Instrument's OMAP framework allows to optionally boot at a certain OPP without
53+
needing cpufreq.
5454

5555
Typical usage of the OPP library is as follows::
5656

@@ -75,8 +75,8 @@ operations until that OPP could be re-enabled if possible.
7575

7676
OPP library facilitates this concept in its implementation. The following
7777
operational functions operate only on available opps:
78-
opp_find_freq_{ceil, floor}, dev_pm_opp_get_voltage, dev_pm_opp_get_freq,
79-
dev_pm_opp_get_opp_count
78+
dev_pm_opp_find_freq_{ceil, floor}, dev_pm_opp_get_voltage, dev_pm_opp_get_freq,
79+
dev_pm_opp_get_opp_count.
8080

8181
dev_pm_opp_find_freq_exact is meant to be used to find the opp pointer
8282
which can then be used for dev_pm_opp_enable/disable functions to make an
@@ -103,7 +103,7 @@ dev_pm_opp_add
103103
The OPP is defined using the frequency and voltage. Once added, the OPP
104104
is assumed to be available and control of its availability can be done
105105
with the dev_pm_opp_enable/disable functions. OPP library
106-
internally stores and manages this information in the opp struct.
106+
internally stores and manages this information in the dev_pm_opp struct.
107107
This function may be used by SoC framework to define a optimal list
108108
as per the demands of SoC usage environment.
109109

@@ -247,7 +247,7 @@ dev_pm_opp_disable
247247
5. OPP Data Retrieval Functions
248248
===============================
249249
Since OPP library abstracts away the OPP information, a set of functions to pull
250-
information from the OPP structure is necessary. Once an OPP pointer is
250+
information from the dev_pm_opp structure is necessary. Once an OPP pointer is
251251
retrieved using the search functions, the following functions can be used by SoC
252252
framework to retrieve the information represented inside the OPP layer.
253253

Documentation/power/runtime_pm.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ defined in include/linux/pm.h:
265265
RPM_SUSPENDED, which means that each device is initially regarded by the
266266
PM core as 'suspended', regardless of its real hardware status
267267

268+
`enum rpm_status last_status;`
269+
- the last runtime PM status of the device captured before disabling runtime
270+
PM for it (invalid initially and when disable_depth is 0)
271+
268272
`unsigned int runtime_auto;`
269273
- if set, indicates that the user space has allowed the device driver to
270274
power manage the device at run time via the /sys/devices/.../power/control
@@ -333,10 +337,12 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
333337

334338
`int pm_runtime_resume(struct device *dev);`
335339
- execute the subsystem-level resume callback for the device; returns 0 on
336-
success, 1 if the device's runtime PM status was already 'active' or
337-
error code on failure, where -EAGAIN means it may be safe to attempt to
338-
resume the device again in future, but 'power.runtime_error' should be
339-
checked additionally, and -EACCES means that 'power.disable_depth' is
340+
success, 1 if the device's runtime PM status is already 'active' (also if
341+
'power.disable_depth' is nonzero, but the status was 'active' when it was
342+
changing from 0 to 1) or error code on failure, where -EAGAIN means it may
343+
be safe to attempt to resume the device again in future, but
344+
'power.runtime_error' should be checked additionally, and -EACCES means
345+
that the callback could not be run, because 'power.disable_depth' was
340346
different from 0
341347

342348
`int pm_runtime_resume_and_get(struct device *dev);`

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,13 @@ S: Supported
994994
T: git https://gitlab.freedesktop.org/agd5f/linux.git
995995
F: drivers/gpu/drm/amd/pm/
996996

997+
AMD PSTATE DRIVER
998+
M: Huang Rui <ray.huang@amd.com>
999+
L: linux-pm@vger.kernel.org
1000+
S: Supported
1001+
F: Documentation/admin-guide/pm/amd-pstate.rst
1002+
F: drivers/cpufreq/amd-pstate*
1003+
9971004
AMD PTDMA DRIVER
9981005
M: Sanjay R Mehta <sanju.mehta@amd.com>
9991006
L: dmaengine@vger.kernel.org

arch/arm/include/asm/topology.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/* Replace task scheduler's default thermal pressure API */
2525
#define arch_scale_thermal_pressure topology_get_thermal_pressure
26-
#define arch_set_thermal_pressure topology_set_thermal_pressure
26+
#define arch_update_thermal_pressure topology_update_thermal_pressure
2727

2828
#else
2929

arch/arm64/include/asm/topology.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void update_freq_counters_refs(void);
3232

3333
/* Replace task scheduler's default thermal pressure API */
3434
#define arch_scale_thermal_pressure topology_get_thermal_pressure
35-
#define arch_set_thermal_pressure topology_set_thermal_pressure
35+
#define arch_update_thermal_pressure topology_update_thermal_pressure
3636

3737
#include <asm-generic/topology.h>
3838

arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@
315315
#define X86_FEATURE_AMD_SSBD (13*32+24) /* "" Speculative Store Bypass Disable */
316316
#define X86_FEATURE_VIRT_SSBD (13*32+25) /* Virtualized Speculative Store Bypass Disable */
317317
#define X86_FEATURE_AMD_SSB_NO (13*32+26) /* "" Speculative Store Bypass is fixed in hardware. */
318+
#define X86_FEATURE_CPPC (13*32+27) /* Collaborative Processor Performance Control */
318319

319320
/* Thermal and Power Management Leaf, CPUID level 0x00000006 (EAX), word 14 */
320321
#define X86_FEATURE_DTHERM (14*32+ 0) /* Digital Thermal Sensor */

0 commit comments

Comments
 (0)