Commit 53edfece authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents ae388edd 40c28199
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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 <linux-pm@vger.kernel.org>
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.
+17 −17
Original line number Diff line number Diff line
What:		/sys/devices/.../power/
Date:		January 2009
Contact:	Rafael J. Wysocki <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
Description:
		The /sys/devices/.../power/runtime_status attribute contains
		the current runtime PM status of the device, which may be
+13 −13
Original line number Diff line number Diff line
What:		/sys/power/
Date:		August 2006
Contact:	Rafael J. Wysocki <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
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 <rjw@rjwysocki.net>
Contact:	Rafael J. Wysocki <rafael@kernel.org>
Description:
		The /sys/power/pm_debug_messages file controls the printing
		of debug messages from the system suspend/hiberbation
+12 −0
Original line number Diff line number Diff line
@@ -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.

+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ to manage each performance update behavior. ::
  Lowest non-        |                       |                         |                       |
  linear perf ------>+-----------------------+                         +-----------------------+
                     |                       |                         |                       |
                     |                       |       Lowest perf  ---->|                       |
                     |                       |          Min perf  ---->|                       |
                     |                       |                         |                       |
  Lowest perf ------>+-----------------------+                         +-----------------------+
                     |                       |                         |                       |
Loading