projects/linux·commit 53edfece

Merge tag 'pm-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

53edfece · Linus Torvalds <[email protected]> · 2025-07-28 20:13:36 -07:00

Pull power management updates from Rafael Wysocki:
 "As is tradition, cpufreq is the part with the largest number of
  updates that include core fixes and cleanups as well as updates of
  several assorted drivers, but there are also quite a few updates
  related to system sleep, mostly focused on asynchronous suspend and
  resume of devices and on making the integration of system suspend
  and resume with runtime PM easier.

  Runtime PM is also updated to allow some code duplication in drivers
  to be eliminated going forward and to work more consistently overall
  in some cases.

  Apart from that, there are some driver core updates related to PM
  domains that should help to address ordering issues with devm_ cleanup
  routines relying on PM domains, some assorted devfreq updates
  including core fixes and cleanups, tooling updates, and documentation
  and MAINTAINERS updates.

  Specifics:

   - Fix two initialization ordering issues in the cpufreq core and a
     governor initialization error path in it, and clean it up (Lifeng
     Zheng)

   - Add Granite Rapids support in no-HWP mode to the intel_pstate
     cpufreq driver (Li RongQing)

   - Make intel_pstate always use HWP_DESIRED_PERF when operating in the
     passive mode (Rafael Wysocki)

   - Allow building the tegra124 cpufreq driver as a module (Aaron
     Kling)

   - Do minor cleanups for Rust cpufreq and cpumask APIs and fix
     MAINTAINERS entry for cpu.rs (Abhinav Ananthu, Ritvik Gupta, Lukas
     Bulwahn)

   - Clean up assorted cpufreq drivers (Arnd Bergmann, Dan Carpenter,
     Krzysztof Kozlowski, Sven Peter, Svyatoslav Ryhel, Lifeng Zheng)

   - Add the NEED_UPDATE_LIMITS flag to the CPPC cpufreq driver
     (Prashant Malani)

   - Fix minimum performance state label error in the amd-pstate driver
     documentation (Shouye Liu)

   - Add the CPUFREQ_GOV_STRICT_TARGET flag to the userspace cpufreq
     governor and explain HW coordination influence on it in the
     documentation (Shashank Balaji)

   - Fix opencoded for_each_cpu() in idle_state_valid() in the DT
     cpuidle driver (Yury Norov)

   - Remove info about non-existing QoS interfaces from the PM QoS
     documentation (Ulf Hansson)

   - Use c_* types via kernel prelude in Rust for OPP (Abhinav Ananthu)

   - Add HiSilicon uncore frequency scaling driver to devfreq (Jie Zhan)

   - Allow devfreq drivers to add custom sysfs ABIs (Jie Zhan)

   - Simplify the sun8i-a33-mbus devfreq driver by using more devm
     functions (Uwe Kleine-König)

   - Fix an index typo in trans_stat() in devfreq (Chanwoo Choi)

   - Check devfreq governor before using governor->name (Lifeng Zheng)

   - Remove a redundant devfreq_get_freq_range() call from
     devfreq_add_device() (Lifeng Zheng)

   - Limit max_freq with scaling_min_freq in devfreq (Lifeng Zheng)

   - Replace sscanf() with kstrtoul() in set_freq_store() (Lifeng Zheng)

   - Extend the asynchronous suspend and resume of devices to handle
     suppliers like parents and consumers like children (Rafael Wysocki)

   - Make pm_runtime_force_resume() work for drivers that set the
     DPM_FLAG_SMART_SUSPEND flag and allow PCI drivers and drivers that
     collaborate with the general ACPI PM domain to set it (Rafael
     Wysocki)

   - Add kernel parameter to disable asynchronous suspend/resume of
     devices (Tudor Ambarus)

   - Drop redundant might_sleep() calls from some functions in the
     device suspend/resume core code (Zhongqiu Han)

   - Fix the handling of monitors connected right before waking up the
     system from sleep (tuhaowen)

   - Clean up MAINTAINERS entries for suspend and hibernation (Rafael
     Wysocki)

   - Fix error code path in the KEXEC_JUMP flow and drop a redundant
     pm_restore_gfp_mask() call from it (Rafael Wysocki)

   - Rearrange suspend/resume error handling in the core device suspend
     and resume code (Rafael Wysocki)

   - Fix up white space that does not follow coding style in the
     hibernation core code (Darshan Rathod)

   - Document return values of suspend-related API functions in the
     runtime PM framework (Sakari Ailus)

   - Mark last busy stamp in multiple autosuspend-related functions in
     the runtime PM framework and update its documentation (Sakari
     Ailus)

   - Take active children into account in pm_runtime_get_if_in_use() for
     consistency (Rafael Wysocki)

   - Fix NULL pointer dereference in get_pd_power_uw() in the dtpm_cpu
     power capping driver (Sivan Zohar-Kotzer)

   - Add support for the Bartlett Lake platform to the Intel RAPL power
     capping driver (Qiao Wei)

   - Add PL4 support for Panther Lake to the intel_rapl_msr power
     capping driver (Zhang Rui)

   - Update contact information in the PM ABI docs and maintainer
     information in the power domains DT binding (Rafael Wysocki)

   - Update PM header inclusions to follow the IWYU (Include What You
     Use) principle (Andy Shevchenko)

   - Add flags to specify power on attach/detach for PM domains, make
     the driver core detach PM domains in device_unbind_cleanup(), and
     drop the dev_pm_domain_detach() call from the platform bus type
     (Claudiu Beznea)

   - Improve Python binding's Makefile for cpupower (John B. Wyatt IV)

   - Fix printing of CORE, CPU fields in cpupower-monitor (Gautham
     Shenoy)"

* tag 'pm-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (75 commits)
  cpufreq: CPPC: Mark driver with NEED_UPDATE_LIMITS flag
  PM: docs: Use my kernel.org address in ABI docs and DT bindings
  PM: hibernate: Fix up white space that does not follow coding style
  PM: sleep: Rearrange suspend/resume error handling in the core
  Documentation: amd-pstate:fix minimum performance state label error
  PM: runtime: Take active children into account in pm_runtime_get_if_in_use()
  kexec_core: Drop redundant pm_restore_gfp_mask() call
  kexec_core: Fix error code path in the KEXEC_JUMP flow
  PM: sleep: Clean up MAINTAINERS entries for suspend and hibernation
  drivers: cpufreq: add Tegra114 support
  rust: cpumask: Replace `MaybeUninit` and `mem::zeroed` with `Opaque` APIs
  cpufreq: Exit governor when failed to start old governor
  cpufreq: Move the check of cpufreq_driver->get into cpufreq_verify_current_freq()
  cpufreq: Init policy->rwsem before it may be possibly used
  cpufreq: Initialize cpufreq-based frequency-invariance later
  cpufreq: Remove duplicate check in __cpufreq_offline()
  cpufreq: Contain scaling_cur_freq.attr in cpufreq_attrs
  cpufreq: intel_pstate: Add Granite Rapids support in no-HWP mode
  cpufreq: intel_pstate: Always use HWP_DESIRED_PERF in passive mode
  PM / devfreq: Add HiSilicon uncore frequency scaling driver
  ...
Commit
53edfecef66bfa65882ae065ed1a52f466c88979
Parents
ae388edd · 40c28199

Merge commit. Changes below are compared with the first parent: ae388edd.

Changes

64 files changed · +1403 −455

FileStatusAddDelContent
Documentation/ABI/testing/sysfs-class-devfreqmodified+9−0View file
Documentation/ABI/testing/sysfs-devices-powermodified+17−17View file
Documentation/ABI/testing/sysfs-powermodified+13−13View file
Documentation/admin-guide/kernel-parameters.txtmodified+12−0View file
Documentation/admin-guide/pm/amd-pstate.rstmodified+1−1View file
Documentation/admin-guide/pm/cpufreq.rstmodified+3−1View file
Documentation/devicetree/bindings/power/power-domain.yamlmodified+1−1View file
Documentation/power/pm_qos_interface.rstmodified+0−7View file
Documentation/power/runtime_pm.rstmodified+23−27View file
MAINTAINERSmodified+5−5View file
drivers/acpi/device_pm.cmodified+4−0View file
drivers/amba/bus.cmodified+2−2View file
drivers/base/auxiliary.cmodified+1−1View file
drivers/base/dd.cmodified+2−0View file
drivers/base/platform.cmodified+3−6View file
drivers/base/power/common.cmodified+6−3View file
drivers/base/power/main.cmodified+94−61View file
drivers/base/power/runtime.cmodified+106−48View file
drivers/clk/qcom/apcs-sdx55.cmodified+1−1View file
drivers/cpufreq/Kconfig.armmodified+1−2View file
drivers/cpufreq/armada-8k-cpufreq.cmodified+2−3View file
drivers/cpufreq/brcmstb-avs-cpufreq.cmodified+1−1View file
drivers/cpufreq/cppc_cpufreq.cmodified+16−45View file
drivers/cpufreq/cpufreq-dt-platdev.cmodified+1−0View file
drivers/cpufreq/cpufreq-dt.cmodified+11−0View file
drivers/cpufreq/cpufreq-dt.hmodified+2−0View file
drivers/cpufreq/cpufreq.cmodified+28−28View file
drivers/cpufreq/cpufreq_userspace.cmodified+1−0View file
drivers/cpufreq/intel_pstate.cmodified+4−2View file
drivers/cpufreq/tegra124-cpufreq.cmodified+37−12View file
drivers/cpuidle/dt_idle_states.cmodified+5−9View file
drivers/devfreq/Kconfigmodified+11−0View file
drivers/devfreq/Makefilemodified+1−0View file
drivers/devfreq/devfreq.cmodified+7−16View file
drivers/devfreq/governor_userspace.cmodified+5−1View file
drivers/devfreq/hisi_uncore_freq.cadded+658−0View file
drivers/devfreq/sun8i-a33-mbus.cmodified+9−29View file
drivers/gpu/drm/display/drm_dp_aux_bus.cmodified+1−1View file
drivers/i2c/i2c-core-base.cmodified+1−1View file
drivers/mmc/core/sdio_bus.cmodified+1−1View file
drivers/pci/pci-driver.cmodified+4−0View file
drivers/powercap/dtpm_cpu.cmodified+2−0View file
drivers/powercap/intel_rapl_common.cmodified+1−0View file
drivers/powercap/intel_rapl_msr.cmodified+1−0View file
drivers/rpmsg/rpmsg_core.cmodified+1−1View file
drivers/soundwire/bus_type.cmodified+1−1View file
drivers/spi/spi.cmodified+1−1View file
drivers/tty/serdev/core.cmodified+1−1View file
include/acpi/cppc_acpi.hmodified+0−1View file
include/linux/devfreq.hmodified+4−0View file
include/linux/device.hmodified+27−0View file
include/linux/pm.hmodified+8−5View file
include/linux/pm_domain.hmodified+8−2View file
include/linux/pm_runtime.hmodified+175−28View file
kernel/kexec_core.cmodified+1−3View file
kernel/power/console.cmodified+6−1View file
kernel/power/main.cmodified+9−0View file
kernel/power/snapshot.cmodified+6−6View file
rust/kernel/cpufreq.rsmodified+26−34View file
rust/kernel/cpumask.rsmodified+2−11View file
rust/kernel/opp.rsmodified+4−4View file
tools/power/cpupower/bindings/python/Makefilemodified+7−5View file
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.cmodified+0−4View file
tools/power/cpupower/utils/idle_monitor/mperf_monitor.cmodified+2−2View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/ABI/testing/sysfs-class-devfreq

View file
diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq
index 1e7e0bb..df8ba88 100644
--- a/Documentation/ABI/testing/sysfs-class-devfreq
+++ b/Documentation/ABI/testing/sysfs-class-devfreq
@@ -132,3 +132,12 @@ Description:
A list of governors that support the node:
- simple_ondemand
+
+What: /sys/class/devfreq/.../related_cpus
+Date: June 2025
+Contact: Linux power management list <[email protected]>
+Description: The list of CPUs whose performance is closely related to the
+ frequency of this devfreq domain.
+
+ This file is only present if a specific devfreq device is
+ closely associated with a subset of CPUs.

Documentation/ABI/testing/sysfs-devices-power

View file
diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power
index d3da88b..e4ec5de 100644
--- a/Documentation/ABI/testing/sysfs-devices-power
+++ b/Documentation/ABI/testing/sysfs-devices-power
@@ -1,6 +1,6 @@
What: /sys/devices/.../power/
Date: January 2009
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../power directory contains attributes
allowing the user space to check and modify some power
@@ -8,7 +8,7 @@ Description:
What: /sys/devices/.../power/wakeup
Date: January 2009
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../power/wakeup attribute allows the user
space to check if the device is enabled to wake up the system
@@ -34,7 +34,7 @@ Description:
What: /sys/devices/.../power/control
Date: January 2009
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../power/control attribute allows the user
space to control the run-time power management of the device.
@@ -53,7 +53,7 @@ Description:
What: /sys/devices/.../power/async
Date: January 2009
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../async attribute allows the user space to
enable or disable the device's suspend and resume callbacks to
@@ -79,7 +79,7 @@ Description:
What: /sys/devices/.../power/wakeup_count
Date: September 2010
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../wakeup_count attribute contains the number
of signaled wakeup events associated with the device. This
@@ -90,7 +90,7 @@ Description:
What: /sys/devices/.../power/wakeup_active_count
Date: September 2010
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../wakeup_active_count attribute contains the
number of times the processing of wakeup events associated with
@@ -102,7 +102,7 @@ Description:
What: /sys/devices/.../power/wakeup_abort_count
Date: February 2012
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../wakeup_abort_count attribute contains the
number of times the processing of a wakeup event associated with
@@ -114,7 +114,7 @@ Description:
What: /sys/devices/.../power/wakeup_expire_count
Date: February 2012
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../wakeup_expire_count attribute contains the
number of times a wakeup event associated with the device has
@@ -126,7 +126,7 @@ Description:
What: /sys/devices/.../power/wakeup_active
Date: September 2010
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../wakeup_active attribute contains either 1,
or 0, depending on whether or not a wakeup event associated with
@@ -138,7 +138,7 @@ Description:
What: /sys/devices/.../power/wakeup_total_time_ms
Date: September 2010
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../wakeup_total_time_ms attribute contains
the total time of processing wakeup events associated with the
@@ -149,7 +149,7 @@ Description:
What: /sys/devices/.../power/wakeup_max_time_ms
Date: September 2010
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../wakeup_max_time_ms attribute contains
the maximum time of processing a single wakeup event associated
@@ -161,7 +161,7 @@ Description:
What: /sys/devices/.../power/wakeup_last_time_ms
Date: September 2010
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../wakeup_last_time_ms attribute contains
the value of the monotonic clock corresponding to the time of
@@ -173,7 +173,7 @@ Description:
What: /sys/devices/.../power/wakeup_prevent_sleep_time_ms
Date: February 2012
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute
contains the total time the device has been preventing
@@ -203,7 +203,7 @@ Description:
What: /sys/devices/.../power/pm_qos_resume_latency_us
Date: March 2012
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../power/pm_qos_resume_latency_us attribute
contains the PM QoS resume latency limit for the given device,
@@ -223,7 +223,7 @@ Description:
What: /sys/devices/.../power/pm_qos_latency_tolerance_us
Date: January 2014
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../power/pm_qos_latency_tolerance_us attribute
contains the PM QoS active state latency tolerance limit for the
@@ -248,7 +248,7 @@ Description:
What: /sys/devices/.../power/pm_qos_no_power_off
Date: September 2012
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../power/pm_qos_no_power_off attribute
is used for manipulating the PM QoS "no power off" flag. If
@@ -263,7 +263,7 @@ Description:
What: /sys/devices/.../power/runtime_status
Date: April 2010
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../power/runtime_status attribute contains
the current runtime PM status of the device, which may be

Documentation/ABI/testing/sysfs-power

View file
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power
index 2192478..4d8e1ad 100644
--- a/Documentation/ABI/testing/sysfs-power
+++ b/Documentation/ABI/testing/sysfs-power
@@ -1,6 +1,6 @@
What: /sys/power/
Date: August 2006
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power directory will contain files that will
provide a unified interface to the power management
@@ -8,7 +8,7 @@ Description:
What: /sys/power/state
Date: November 2016
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/state file controls system sleep states.
Reading from this file returns the available sleep state
@@ -23,7 +23,7 @@ Description:
What: /sys/power/mem_sleep
Date: November 2016
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/mem_sleep file controls the operating mode of
system suspend. Reading from it returns the available modes
@@ -41,7 +41,7 @@ Description:
What: /sys/power/disk
Date: September 2006
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/disk file controls the operating mode of the
suspend-to-disk mechanism. Reading from this file returns
@@ -90,7 +90,7 @@ Description:
What: /sys/power/image_size
Date: August 2006
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/image_size file controls the size of the image
created by the suspend-to-disk mechanism. It can be written a
@@ -107,7 +107,7 @@ Description:
What: /sys/power/pm_trace
Date: August 2006
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/pm_trace file controls the code which saves the
last PM event point in the RTC across reboots, so that you can
@@ -156,7 +156,7 @@ Description:
What: /sys/power/pm_async
Date: January 2009
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/pm_async file controls the switch allowing the
user space to enable or disable asynchronous suspend and resume
@@ -169,7 +169,7 @@ Description:
What: /sys/power/wakeup_count
Date: July 2010
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/wakeup_count file allows user space to put the
system into a sleep state while taking into account the
@@ -184,7 +184,7 @@ Description:
What: /sys/power/reserved_size
Date: May 2011
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/reserved_size file allows user space to control
the amount of memory reserved for allocations made by device
@@ -198,7 +198,7 @@ Description:
What: /sys/power/autosleep
Date: April 2012
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/autosleep file can be written one of the strings
returned by reads from /sys/power/state. If that happens, a
@@ -215,7 +215,7 @@ Description:
What: /sys/power/wake_lock
Date: February 2012
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/wake_lock file allows user space to create
wakeup source objects and activate them on demand (if one of
@@ -242,7 +242,7 @@ Description:
What: /sys/power/wake_unlock
Date: February 2012
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/wake_unlock file allows user space to deactivate
wakeup sources created with the help of /sys/power/wake_lock.
@@ -283,7 +283,7 @@ Description:
What: /sys/power/pm_debug_messages
Date: July 2017
-Contact: Rafael J. Wysocki <[email protected]>
+Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/power/pm_debug_messages file controls the printing
of debug messages from the system suspend/hiberbation

Documentation/admin-guide/kernel-parameters.txt

View file
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 3433775..c349114 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5000,6 +5000,18 @@
that number, otherwise (e.g., 'pmu_override=on'), MMCR1
remains 0.
+ pm_async= [PM]
+ Format: off
+ This parameter sets the initial value of the
+ /sys/power/pm_async sysfs knob at boot time.
+ If set to "off", disables asynchronous suspend and
+ resume of devices during system-wide power transitions.
+ This can be useful on platforms where device
+ dependencies are not well-defined, or for debugging
+ power management issues. Asynchronous operations are
+ enabled by default.
+
+
pm_debug_messages [SUSPEND,KNL]
Enable suspend/resume debug messages during boot up.

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

View file
diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst
index 412423c..e1771f2 100644
--- a/Documentation/admin-guide/pm/amd-pstate.rst
+++ b/Documentation/admin-guide/pm/amd-pstate.rst
@@ -72,7 +72,7 @@ to manage each performance update behavior. ::
Lowest non- | | | |
linear perf ------>+-----------------------+ +-----------------------+
| | | |
- | | Lowest perf ---->| |
+ | | Min perf ---->| |
| | | |
Lowest perf ------>+-----------------------+ +-----------------------+
| | | |

Documentation/admin-guide/pm/cpufreq.rst

View file
diff --git a/Documentation/admin-guide/pm/cpufreq.rst b/Documentation/admin-guide/pm/cpufreq.rst
index 2d74af7..cacb9f0 100644
--- a/Documentation/admin-guide/pm/cpufreq.rst
+++ b/Documentation/admin-guide/pm/cpufreq.rst
@@ -398,7 +398,9 @@ policy limits change after that.
This governor does not do anything by itself. Instead, it allows user space
to set the CPU frequency for the policy it is attached to by writing to the
-``scaling_setspeed`` attribute of that policy.
+``scaling_setspeed`` attribute of that policy. Though the intention may be to
+set an exact frequency for the policy, the actual frequency may vary depending
+on hardware coordination, thermal and power limits, and other factors.
``schedutil``
-------------

Documentation/devicetree/bindings/power/power-domain.yaml

View file
diff --git a/Documentation/devicetree/bindings/power/power-domain.yaml b/Documentation/devicetree/bindings/power/power-domain.yaml
index 8fdb529..b1147db 100644
--- a/Documentation/devicetree/bindings/power/power-domain.yaml
+++ b/Documentation/devicetree/bindings/power/power-domain.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic PM domains
maintainers:
- - Rafael J. Wysocki <[email protected]>
+ - Rafael J. Wysocki <[email protected]>
- Kevin Hilman <[email protected]>
- Ulf Hansson <[email protected]>

Documentation/power/pm_qos_interface.rst

View file
diff --git a/Documentation/power/pm_qos_interface.rst b/Documentation/power/pm_qos_interface.rst
index 69b0fe3..5019c79 100644
--- a/Documentation/power/pm_qos_interface.rst
+++ b/Documentation/power/pm_qos_interface.rst
@@ -52,13 +52,6 @@ int cpu_latency_qos_request_active(handle):
Returns if the request is still active, i.e. it has not been removed from the
CPU latency QoS list.
-int cpu_latency_qos_add_notifier(notifier):
- Adds a notification callback function to the CPU latency QoS. The callback is
- called when the aggregated value for the CPU latency QoS is changed.
-
-int cpu_latency_qos_remove_notifier(notifier):
- Removes the notification callback function from the CPU latency QoS.
-
From user space:

Documentation/power/runtime_pm.rst

View file
diff --git a/Documentation/power/runtime_pm.rst b/Documentation/power/runtime_pm.rst
index 63344be..c8dbdb8 100644
--- a/Documentation/power/runtime_pm.rst
+++ b/Documentation/power/runtime_pm.rst
@@ -154,11 +154,9 @@ suspending the device are satisfied) and to queue up a suspend request for the
device in that case. If there is no idle callback, or if the callback returns
0, then the PM core will attempt to carry out a runtime suspend of the device,
also respecting devices configured for autosuspend. In essence this means a
-call to pm_runtime_autosuspend() (do note that drivers needs to update the
-device last busy mark, pm_runtime_mark_last_busy(), to control the delay under
-this circumstance). To prevent this (for example, if the callback routine has
-started a delayed suspend), the routine must return a non-zero value. Negative
-error return codes are ignored by the PM core.
+call to pm_runtime_autosuspend(). To prevent this (for example, if the callback
+routine has started a delayed suspend), the routine must return a non-zero
+value. Negative error return codes are ignored by the PM core.
The helper functions provided by the PM core, described in Section 4, guarantee
that the following constraints are met with respect to runtime PM callbacks for
@@ -330,10 +328,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
'power.disable_depth' is different from 0
`int pm_runtime_autosuspend(struct device *dev);`
- - same as pm_runtime_suspend() except that the autosuspend delay is taken
- `into account;` if pm_runtime_autosuspend_expiration() says the delay has
- not yet expired then an autosuspend is scheduled for the appropriate time
- and 0 is returned
+ - same as pm_runtime_suspend() except that a call to
+ pm_runtime_mark_last_busy() is made and an autosuspend is scheduled for
+ the appropriate time and 0 is returned
`int pm_runtime_resume(struct device *dev);`
- execute the subsystem-level resume callback for the device; returns 0 on
@@ -357,9 +354,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
success or error code if the request has not been queued up
`int pm_request_autosuspend(struct device *dev);`
- - schedule the execution of the subsystem-level suspend callback for the
- device when the autosuspend delay has expired; if the delay has already
- expired then the work item is queued up immediately
+ - Call pm_runtime_mark_last_busy() and schedule the execution of the
+ subsystem-level suspend callback for the device when the autosuspend delay
+ expires
`int pm_schedule_suspend(struct device *dev, unsigned int delay);`
- schedule the execution of the subsystem-level suspend callback for the
@@ -411,8 +408,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
pm_request_idle(dev) and return its result
`int pm_runtime_put_autosuspend(struct device *dev);`
- - does the same as __pm_runtime_put_autosuspend() for now, but in the
- future, will also call pm_runtime_mark_last_busy() as well, DO NOT USE!
+ - set the power.last_busy field to the current time and decrement the
+ device's usage counter; if the result is 0 then run
+ pm_request_autosuspend(dev) and return its result
`int __pm_runtime_put_autosuspend(struct device *dev);`
- decrement the device's usage counter; if the result is 0 then run
@@ -427,7 +425,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
pm_runtime_suspend(dev) and return its result
`int pm_runtime_put_sync_autosuspend(struct device *dev);`
- - decrement the device's usage counter; if the result is 0 then run
+ - set the power.last_busy field to the current time and decrement the
+ device's usage counter; if the result is 0 then run
pm_runtime_autosuspend(dev) and return its result
`void pm_runtime_enable(struct device *dev);`
@@ -870,11 +869,9 @@ device is automatically suspended (the subsystem or driver still has to call
the appropriate PM routines); rather it means that runtime suspends will
automatically be delayed until the desired period of inactivity has elapsed.
-Inactivity is determined based on the power.last_busy field. Drivers should
-call pm_runtime_mark_last_busy() to update this field after carrying out I/O,
-typically just before calling __pm_runtime_put_autosuspend(). The desired
-length of the inactivity period is a matter of policy. Subsystems can set this
-length initially by calling pm_runtime_set_autosuspend_delay(), but after device
+Inactivity is determined based on the power.last_busy field. The desired length
+of the inactivity period is a matter of policy. Subsystems can set this length
+initially by calling pm_runtime_set_autosuspend_delay(), but after device
registration the length should be controlled by user space, using the
/sys/devices/.../power/autosuspend_delay_ms attribute.
@@ -885,12 +882,13 @@ instead of the non-autosuspend counterparts::
Instead of: pm_runtime_suspend use: pm_runtime_autosuspend;
Instead of: pm_schedule_suspend use: pm_request_autosuspend;
- Instead of: pm_runtime_put use: __pm_runtime_put_autosuspend;
+ Instead of: pm_runtime_put use: pm_runtime_put_autosuspend;
Instead of: pm_runtime_put_sync use: pm_runtime_put_sync_autosuspend.
Drivers may also continue to use the non-autosuspend helper functions; they
will behave normally, which means sometimes taking the autosuspend delay into
-account (see pm_runtime_idle).
+account (see pm_runtime_idle). The autosuspend variants of the functions also
+call pm_runtime_mark_last_busy().
Under some circumstances a driver or subsystem may want to prevent a device
from autosuspending immediately, even though the usage counter is zero and the
@@ -922,12 +920,10 @@ Here is a schematic pseudo-code example::
foo_io_completion(struct foo_priv *foo, void *req)
{
lock(&foo->private_lock);
- if (--foo->num_pending_requests == 0) {
- pm_runtime_mark_last_busy(&foo->dev);
- __pm_runtime_put_autosuspend(&foo->dev);
- } else {
+ if (--foo->num_pending_requests == 0)
+ pm_runtime_put_autosuspend(&foo->dev);
+ else
foo_process_next_request(foo);
- }
unlock(&foo->private_lock);
/* Send req result back to the user ... */
}

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 3a9fa3b..854d6d2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6257,7 +6257,7 @@ F: include/linux/cpuhotplug.h
F: include/linux/smpboot.h
F: kernel/cpu.c
F: kernel/smpboot.*
-F: rust/helper/cpu.c
+F: rust/helpers/cpu.c
F: rust/kernel/cpu.rs
CPU IDLE TIME MANAGEMENT FRAMEWORK
@@ -9789,7 +9789,7 @@ F: fs/freevxfs/
FREEZER
M: "Rafael J. Wysocki" <[email protected]>
-M: Pavel Machek <[email protected]>
+R: Pavel Machek <[email protected]>
S: Supported
F: Documentation/power/freezing-of-tasks.rst
@@ -10663,7 +10663,7 @@ F: drivers/video/fbdev/hgafb.c
HIBERNATION (aka Software Suspend, aka swsusp)
M: "Rafael J. Wysocki" <[email protected]>
-M: Pavel Machek <[email protected]>
+R: Pavel Machek <[email protected]>
S: Supported
B: https://bugzilla.kernel.org
@@ -23938,8 +23938,8 @@ F: drivers/sh/
SUSPEND TO RAM
M: "Rafael J. Wysocki" <[email protected]>
-M: Len Brown <[email protected]>
-M: Pavel Machek <[email protected]>
+R: Len Brown <[email protected]>
+R: Pavel Machek <[email protected]>
S: Supported
B: https://bugzilla.kernel.org

drivers/acpi/device_pm.c

View file
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index dbd4446..9a4d059 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -1119,6 +1119,8 @@ int acpi_subsys_prepare(struct device *dev)
{
struct acpi_device *adev = ACPI_COMPANION(dev);
+ dev_pm_set_strict_midlayer(dev, true);
+
if (dev->driver && dev->driver->pm && dev->driver->pm->prepare) {
int ret = dev->driver->pm->prepare(dev);
@@ -1147,6 +1149,8 @@ void acpi_subsys_complete(struct device *dev)
*/
if (pm_runtime_suspended(dev) && pm_resume_via_firmware())
pm_request_resume(dev);
+
+ dev_pm_set_strict_midlayer(dev, false);
}
EXPORT_SYMBOL_GPL(acpi_subsys_complete);

drivers/amba/bus.c

View file
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 71482d6..74e34a0 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -138,7 +138,7 @@ static int amba_read_periphid(struct amba_device *dev)
void __iomem *tmp;
int i, ret;
- ret = dev_pm_domain_attach(&dev->dev, true);
+ ret = dev_pm_domain_attach(&dev->dev, PD_FLAG_ATTACH_POWER_ON);
if (ret) {
dev_dbg(&dev->dev, "can't get PM domain: %d\n", ret);
goto err_out;
@@ -291,7 +291,7 @@ static int amba_probe(struct device *dev)
if (ret < 0)
break;
- ret = dev_pm_domain_attach(dev, true);
+ ret = dev_pm_domain_attach(dev, PD_FLAG_ATTACH_POWER_ON);
if (ret)
break;

drivers/base/auxiliary.c

View file
diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c
index dba7c8e..44cd3f8 100644
--- a/drivers/base/auxiliary.c
+++ b/drivers/base/auxiliary.c
@@ -217,7 +217,7 @@ static int auxiliary_bus_probe(struct device *dev)
struct auxiliary_device *auxdev = to_auxiliary_dev(dev);
int ret;
- ret = dev_pm_domain_attach(dev, true);
+ ret = dev_pm_domain_attach(dev, PD_FLAG_ATTACH_POWER_ON);
if (ret) {
dev_warn(dev, "Failed to attach to PM Domain : %d\n", ret);
return ret;

drivers/base/dd.c

View file
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index b526e0e..13ab98e 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -25,6 +25,7 @@
#include <linux/kthread.h>
#include <linux/wait.h>
#include <linux/async.h>
+#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/pinctrl/devinfo.h>

This diff is incomplete. Download the complete patch.

drivers/base/platform.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/power/common.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/power/main.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/power/runtime.c

View file

This diff is incomplete. Download the complete patch.

drivers/clk/qcom/apcs-sdx55.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/Kconfig.arm

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/armada-8k-cpufreq.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/brcmstb-avs-cpufreq.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/cppc_cpufreq.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/cpufreq-dt-platdev.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/cpufreq-dt.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/cpufreq-dt.h

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/cpufreq.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/cpufreq_userspace.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/intel_pstate.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/tegra124-cpufreq.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpuidle/dt_idle_states.c

View file

This diff is incomplete. Download the complete patch.

drivers/devfreq/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/devfreq/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/devfreq/devfreq.c

View file

This diff is incomplete. Download the complete patch.

drivers/devfreq/governor_userspace.c

View file

This diff is incomplete. Download the complete patch.

drivers/devfreq/hisi_uncore_freq.c

View file

This diff is incomplete. Download the complete patch.

drivers/devfreq/sun8i-a33-mbus.c

View file

This diff is incomplete. Download the complete patch.

drivers/gpu/drm/display/drm_dp_aux_bus.c

View file

This diff is incomplete. Download the complete patch.

drivers/i2c/i2c-core-base.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/sdio_bus.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci-driver.c

View file

This diff is incomplete. Download the complete patch.

drivers/powercap/dtpm_cpu.c

View file

This diff is incomplete. Download the complete patch.

drivers/powercap/intel_rapl_common.c

View file

This diff is incomplete. Download the complete patch.

drivers/powercap/intel_rapl_msr.c

View file

This diff is incomplete. Download the complete patch.

drivers/rpmsg/rpmsg_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/soundwire/bus_type.c

View file

This diff is incomplete. Download the complete patch.

drivers/spi/spi.c

View file

This diff is incomplete. Download the complete patch.

drivers/tty/serdev/core.c

View file

This diff is incomplete. Download the complete patch.

include/acpi/cppc_acpi.h

View file

This diff is incomplete. Download the complete patch.

include/linux/devfreq.h

View file

This diff is incomplete. Download the complete patch.

include/linux/device.h

View file

This diff is incomplete. Download the complete patch.

include/linux/pm.h

View file

This diff is incomplete. Download the complete patch.

include/linux/pm_domain.h

View file

This diff is incomplete. Download the complete patch.

include/linux/pm_runtime.h

View file

This diff is incomplete. Download the complete patch.

kernel/kexec_core.c

View file

This diff is incomplete. Download the complete patch.

kernel/power/console.c

View file

This diff is incomplete. Download the complete patch.

kernel/power/main.c

View file

This diff is incomplete. Download the complete patch.

kernel/power/snapshot.c

View file

This diff is incomplete. Download the complete patch.

rust/kernel/cpufreq.rs

View file

This diff is incomplete. Download the complete patch.

rust/kernel/cpumask.rs

View file

This diff is incomplete. Download the complete patch.

rust/kernel/opp.rs

View file

This diff is incomplete. Download the complete patch.

tools/power/cpupower/bindings/python/Makefile

View file

This diff is incomplete. Download the complete patch.

tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c

View file

This diff is incomplete. Download the complete patch.

tools/power/cpupower/utils/idle_monitor/mperf_monitor.c

View file

This diff is incomplete. Download the complete patch.