Commit 0b8417c1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power management updates from Rafael Wysocki:
 "These rework the collection of cpufreq statistics to allow it to take
  place if fast frequency switching is enabled in the governor, rework
  the frequency invariance handling in the cpufreq core and drivers, add
  new hardware support to a couple of cpufreq drivers, fix a number of
  assorted issues and clean up the code all over.

  Specifics:

   - Rework cpufreq statistics collection to allow it to take place when
     fast frequency switching is enabled in the governor (Viresh Kumar).

   - Make the cpufreq core set the frequency scale on behalf of the
     driver and update several cpufreq drivers accordingly (Ionela
     Voinescu, Valentin Schneider).

   - Add new hardware support to the STI and qcom cpufreq drivers and
     improve them (Alain Volmat, Manivannan Sadhasivam).

   - Fix multiple assorted issues in cpufreq drivers (Jon Hunter,
     Krzysztof Kozlowski, Matthias Kaehlcke, Pali Rohár, Stephan
     Gerhold, Viresh Kumar).

   - Fix several assorted issues in the operating performance points
     (OPP) framework (Stephan Gerhold, Viresh Kumar).

   - Allow devfreq drivers to fetch devfreq instances by DT enumeration
     instead of using explicit phandles and modify the devfreq core code
     to support driver-specific devfreq DT bindings (Leonard Crestez,
     Chanwoo Choi).

   - Improve initial hardware resetting in the tegra30 devfreq driver
     and clean up the tegra cpuidle driver (Dmitry Osipenko).

   - Update the cpuidle core to collect state entry rejection statistics
     and expose them via sysfs (Lina Iyer).

   - Improve the ACPI _CST code handling diagnostics (Chen Yu).

   - Update the PSCI cpuidle driver to allow the PM domain
     initialization to occur in the OSI mode as well as in the PC mode
     (Ulf Hansson).

   - Rework the generic power domains (genpd) core code to allow domain
     power off transition to be aborted in the absence of the "power
     off" domain callback (Ulf Hansson).

   - Fix two suspend-to-idle issues in the ACPI EC driver (Rafael
     Wysocki).

   - Fix the handling of timer_expires in the PM-runtime framework on
     32-bit systems and the handling of device links in it (Grygorii
     Strashko, Xiang Chen).

   - Add IO requests batching support to the hibernate image saving and
     reading code and drop a bogus get_gendisk() from there (Xiaoyi
     Chen, Christoph Hellwig).

   - Allow PCIe ports to be put into the D3cold power state if they are
     power-manageable via ACPI (Lukas Wunner).

   - Add missing header file include to a power capping driver (Pujin
     Shi).

   - Clean up the qcom-cpr AVS driver a bit (Liu Shixin).

   - Kevin Hilman steps down as designated reviwer of adaptive voltage
     scaling (AVS) drivers (Kevin Hilman)"

* tag 'pm-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (65 commits)
  cpufreq: stats: Fix string format specifier mismatch
  arm: disable frequency invariance for CONFIG_BL_SWITCHER
  cpufreq,arm,arm64: restructure definitions of arch_set_freq_scale()
  cpufreq: stats: Add memory barrier to store_reset()
  cpufreq: schedutil: Simplify sugov_fast_switch()
  ACPI: EC: PM: Drop ec_no_wakeup check from acpi_ec_dispatch_gpe()
  ACPI: EC: PM: Flush EC work unconditionally after wakeup
  PCI/ACPI: Whitelist hotplug ports for D3 if power managed by ACPI
  PM: hibernate: remove the bogus call to get_gendisk() in software_resume()
  cpufreq: Move traces and update to policy->cur to cpufreq core
  cpufreq: stats: Enable stats for fast-switch as well
  cpufreq: stats: Mark few conditionals with unlikely()
  cpufreq: stats: Remove locking
  cpufreq: stats: Defer stats update to cpufreq_stats_record_transition()
  PM: domains: Allow to abort power off when no ->power_off() callback
  PM: domains: Rename power state enums for genpd
  PM / devfreq: tegra30: Improve initial hardware resetting
  PM / devfreq: event: Change prototype of devfreq_event_get_edev_by_phandle function
  PM / devfreq: Change prototype of devfreq_get_devfreq_by_phandle function
  PM / devfreq: Add devfreq_get_devfreq_by_node function
  ...
parents 15cb5469 16641d81
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -528,6 +528,10 @@ object corresponding to it, as follows:
	Total number of times the hardware has been asked by the given CPU to
	enter this idle state.

``rejected``
	Total number of times a request to enter this idle state on the given
	CPU was rejected.

The :file:`desc` and :file:`name` files both contain strings.  The difference
between them is that the name is expected to be more concise, while the
description may be longer and it may contain white space or special characters.
@@ -572,6 +576,11 @@ particular case. For these reasons, the only reliable way to find out how
much time has been spent by the hardware in different idle states supported by
it is to use idle state residency counters in the hardware, if available.

Generally, an interrupt received when trying to enter an idle state causes the
idle state entry request to be rejected, in which case the ``CPUIdle`` driver
may return an error code to indicate that this was the case. The :file:`usage`
and :file:`rejected` files report the number of times the given idle state
was entered successfully or rejected, respectively.

.. _cpu-pm-qos:

+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ Properties:
- compatible
	Usage:		required
	Value type:	<string>
	Definition:	must be "qcom,cpufreq-hw".
	Definition:	must be "qcom,cpufreq-hw" or "qcom,cpufreq-epss".

- clocks
	Usage:		required
+32 −21
Original line number Diff line number Diff line
@@ -154,25 +154,27 @@ Optional properties:
- opp-suspend: Marks the OPP to be used during device suspend. If multiple OPPs
  in the table have this, the OPP with highest opp-hz will be used.

- opp-supported-hw: This enables us to select only a subset of OPPs from the
  larger OPP table, based on what version of the hardware we are running on. We
  still can't have multiple nodes with the same opp-hz value in OPP table.

  It's a user defined array containing a hierarchy of hardware version numbers,
  supported by the OPP. For example: a platform with hierarchy of three levels
  of versions (A, B and C), this field should be like <X Y Z>, where X
  corresponds to Version hierarchy A, Y corresponds to version hierarchy B and Z
  corresponds to version hierarchy C.

  Each level of hierarchy is represented by a 32 bit value, and so there can be
  only 32 different supported version per hierarchy. i.e. 1 bit per version. A
  value of 0xFFFFFFFF will enable the OPP for all versions for that hierarchy
  level. And a value of 0x00000000 will disable the OPP completely, and so we
  never want that to happen.

  If 32 values aren't sufficient for a version hierarchy, than that version
  hierarchy can be contained in multiple 32 bit values. i.e. <X Y Z1 Z2> in the
  above example, Z1 & Z2 refer to the version hierarchy Z.
- opp-supported-hw: This property allows a platform to enable only a subset of
  the OPPs from the larger set present in the OPP table, based on the current
  version of the hardware (already known to the operating system).

  Each block present in the array of blocks in this property, represents a
  sub-group of hardware versions supported by the OPP. i.e. <sub-group A>,
  <sub-group B>, etc. The OPP will be enabled if _any_ of these sub-groups match
  the hardware's version.

  Each sub-group is a platform defined array representing the hierarchy of
  hardware versions supported by the platform. For a platform with three
  hierarchical levels of version (X.Y.Z), this field shall look like

  opp-supported-hw = <X1 Y1 Z1>, <X2 Y2 Z2>, <X3 Y3 Z3>.

  Each level (eg. X1) in version hierarchy is represented by a 32 bit value, one
  bit per version and so there can be maximum 32 versions per level. Logical AND
  (&) operation is performed for each level with the hardware's level version
  and a non-zero output for _all_ the levels in a sub-group means the OPP is
  supported by hardware. A value of 0xFFFFFFFF for each level in the sub-group
  will enable the OPP for all versions for the hardware.

- status: Marks the node enabled/disabled.

@@ -503,7 +505,6 @@ Example 5: opp-supported-hw
			 */
			opp-supported-hw = <0xF 0xFFFFFFFF 0xFFFFFFFF>
			opp-hz = /bits/ 64 <600000000>;
			opp-microvolt = <915000 900000 925000>;
			...
		};

@@ -516,7 +517,17 @@ Example 5: opp-supported-hw
			 */
			opp-supported-hw = <0x20 0xff0000ff 0x0000f4f0>
			opp-hz = /bits/ 64 <800000000>;
			opp-microvolt = <915000 900000 925000>;
			...
		};

		opp-900000000 {
			/*
			 * Supports:
			 * - All cuts and substrate where process version is 0x2.
			 * - All cuts and process where substrate version is 0x2.
			 */
			opp-supported-hw = <0xFFFFFFFF 0xFFFFFFFF 0x02>, <0xFFFFFFFF 0x01 0xFFFFFFFF>
			opp-hz = /bits/ 64 <900000000>;
			...
		};
	};
+0 −1
Original line number Diff line number Diff line
@@ -5388,7 +5388,6 @@ F: include/linux/kobj*
F:	lib/kobj*
DRIVERS FOR ADAPTIVE VOLTAGE SCALING (AVS)
M:	Kevin Hilman <khilman@kernel.org>
M:	Nishanth Menon <nm@ti.com>
L:	linux-pm@vger.kernel.org
S:	Maintained
+0 −36
Original line number Diff line number Diff line
@@ -26,14 +26,6 @@
			opp-microvolt = <800000 800000 1125000>;
		};

		opp@456000000,800,2,2 {
			opp-microvolt = <800000 800000 1125000>;
		};

		opp@456000000,800,3,2 {
			opp-microvolt = <800000 800000 1125000>;
		};

		opp@456000000,825 {
			opp-microvolt = <825000 825000 1125000>;
		};
@@ -46,10 +38,6 @@
			opp-microvolt = <800000 800000 1125000>;
		};

		opp@608000000,800,3,2 {
			opp-microvolt = <800000 800000 1125000>;
		};

		opp@608000000,825 {
			opp-microvolt = <825000 825000 1125000>;
		};
@@ -78,18 +66,6 @@
			opp-microvolt = <875000 875000 1125000>;
		};

		opp@760000000,875,1,1 {
			opp-microvolt = <875000 875000 1125000>;
		};

		opp@760000000,875,0,2 {
			opp-microvolt = <875000 875000 1125000>;
		};

		opp@760000000,875,1,2 {
			opp-microvolt = <875000 875000 1125000>;
		};

		opp@760000000,900 {
			opp-microvolt = <900000 900000 1125000>;
		};
@@ -134,14 +110,6 @@
			opp-microvolt = <950000 950000 1125000>;
		};

		opp@912000000,950,0,2 {
			opp-microvolt = <950000 950000 1125000>;
		};

		opp@912000000,950,2,2 {
			opp-microvolt = <950000 950000 1125000>;
		};

		opp@912000000,1000 {
			opp-microvolt = <1000000 1000000 1125000>;
		};
@@ -170,10 +138,6 @@
			opp-microvolt = <1000000 1000000 1125000>;
		};

		opp@1000000000,1000,0,2 {
			opp-microvolt = <1000000 1000000 1125000>;
		};

		opp@1000000000,1025 {
			opp-microvolt = <1025000 1025000 1125000>;
		};
Loading