Commit 5469f160 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power management updates from Rafael Wysocki:
 "These add some new hardware support (for example, IceLake-D idle
  states in intel_idle), fix some issues (for example, the handling of
  negative "sleep length" values in cpuidle governors), add new
  functionality to the existing drivers (for example, scale-invariance
  support in the ACPI CPPC cpufreq driver) and clean up code all over.

  Specifics:

   - Add idle states table for IceLake-D to the intel_idle driver and
     update IceLake-X C6 data in it (Artem Bityutskiy).

   - Fix the C7 idle state on Tegra114 in the tegra cpuidle driver and
     drop the unused do_idle() firmware call from it (Dmitry Osipenko).

   - Fix cpuidle-qcom-spm Kconfig entry (He Ying).

   - Fix handling of possible negative tick_nohz_get_next_hrtimer()
     return values of in cpuidle governors (Rafael Wysocki).

   - Add support for frequency-invariance to the ACPI CPPC cpufreq
     driver and update the frequency-invariance engine (FIE) to use it
     as needed (Viresh Kumar).

   - Simplify the default delay_us setting in the ACPI CPPC cpufreq
     driver (Tom Saeger).

   - Clean up frequency-related computations in the intel_pstate cpufreq
     driver (Rafael Wysocki).

   - Fix TBG parent setting for load levels in the armada-37xx cpufreq
     driver and drop the CPU PM clock .set_parent method for armada-37xx
     (Marek Behún).

   - Fix multiple issues in the armada-37xx cpufreq driver (Pali Rohár).

   - Fix handling of dev_pm_opp_of_cpumask_add_table() return values in
     cpufreq-dt to take the -EPROBE_DEFER one into acconut as
     appropriate (Quanyang Wang).

   - Fix format string in ia64-acpi-cpufreq (Sergei Trofimovich).

   - Drop the unused for_each_policy() macro from cpufreq (Shaokun
     Zhang).

   - Simplify computations in the schedutil cpufreq governor to avoid
     unnecessary overhead (Yue Hu).

   - Fix typos in the s5pv210 cpufreq driver (Bhaskar Chowdhury).

   - Fix cpufreq documentation links in Kconfig (Alexander Monakov).

   - Fix PCI device power state handling in pci_enable_device_flags() to
     avoid issuse in some cases when the device depends on an ACPI power
     resource (Rafael Wysocki).

   - Add missing documentation of pm_runtime_resume_and_get() (Alan
     Stern).

   - Add missing static inline stub for pm_runtime_has_no_callbacks() to
     pm_runtime.h and drop the unused try_to_freeze_nowarn() definition
     (YueHaibing).

   - Drop duplicate struct device declaration from pm.h and fix a
     structure type declaration in intel_rapl.h (Wan Jiabing).

   - Use dev_set_name() instead of an open-coded equivalent of it in the
     wakeup sources code and drop a redundant local variable
     initialization from it (Andy Shevchenko, Colin Ian King).

   - Use crc32 instead of md5 for e820 memory map integrity check during
     resume from hibernation on x86 (Chris von Recklinghausen).

   - Fix typos in comments in the system-wide and hibernation support
     code (Lu Jialin).

   - Modify the generic power domains (genpd) code to avoid resuming
     devices in the "prepare" phase of system-wide suspend and
     hibernation (Ulf Hansson).

   - Add Hygon Fam18h RAPL support to the intel_rapl power capping
     driver (Pu Wen).

   - Add MAINTAINERS entry for the dynamic thermal power management
     (DTPM) code (Daniel Lezcano).

   - Add devm variants of operating performance points (OPP) API
     functions and switch over some users of the OPP framework to the
     new resource-managed API (Yangtao Li and Dmitry Osipenko).

   - Update devfreq core:

      * Register devfreq devices as cooling devices on demand (Daniel
        Lezcano).

      * Add missing unlock opeation in devfreq_add_device() (Lukasz
        Luba).

      * Use the next frequency as resume_freq instead of the previous
        frequency when using the opp-suspend property (Dong Aisheng).

      * Check get_dev_status in devfreq_update_stats() (Dong Aisheng).

      * Fix set_freq path for the userspace governor in Kconfig (Dong
        Aisheng).

      * Remove invalid description of get_target_freq() (Dong Aisheng).

   - Update devfreq drivers:

      * imx8m-ddrc: Remove imx8m_ddrc_get_dev_status() and unneeded
        of_match_ptr() (Dong Aisheng, Fabio Estevam).

      * rk3399_dmc: dt-bindings: Add rockchip,pmu phandle and drop
        references to undefined symbols (Enric Balletbo i Serra, Gaël
        PORTAY).

      * rk3399_dmc: Use dev_err_probe() to simplify the code (Krzysztof
        Kozlowski).

      * imx-bus: Remove unneeded of_match_ptr() (Fabio Estevam).

   - Fix kernel-doc warnings in three places (Pierre-Louis Bossart).

   - Fix typo in the pm-graph utility code (Ricardo Ribalda)"

* tag 'pm-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (74 commits)
  PM: wakeup: remove redundant assignment to variable retval
  PM: hibernate: x86: Use crc32 instead of md5 for hibernation e820 integrity check
  cpufreq: Kconfig: fix documentation links
  PM: wakeup: use dev_set_name() directly
  PM: runtime: Add documentation for pm_runtime_resume_and_get()
  cpufreq: intel_pstate: Simplify intel_pstate_update_perf_limits()
  cpufreq: armada-37xx: Fix module unloading
  cpufreq: armada-37xx: Remove cur_frequency variable
  cpufreq: armada-37xx: Fix determining base CPU frequency
  cpufreq: armada-37xx: Fix driver cleanup when registration failed
  clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0
  clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz
  cpufreq: armada-37xx: Fix the AVS value for load L1
  clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock
  cpufreq: armada-37xx: Fix setting TBG parent for load levels
  cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration
  cpuidle: tegra: Remove do_idle firmware call
  cpuidle: tegra: Fix C7 idling state on Tegra114
  PM: sleep: fix typos in comments
  cpufreq: Remove unused for_each_policy macro
  ...
parents d8f9176b 59e2c959
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -97,10 +97,7 @@ Description:
		object. The values are represented in ms. If the value is
		less than 1 jiffy, it is considered to be 0, which means
		no polling. This value is meaningless if the governor is
		not polling; thus. If the governor is not using
		devfreq-provided central polling
		(/sys/class/devfreq/.../central_polling is 0), this value
		may be useless.
		not polling.

		A list of governors that support the node:
		- simple_ondmenad
+36 −39
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ Required properties:
			 for details.
- center-supply:	 DMC supply node.
- status:		 Marks the node enabled/disabled.
- rockchip,pmu:		 Phandle to the syscon managing the "PMU general register
			 files".

Optional properties:
- interrupts:		 The CPU interrupt number. The interrupt specifier
@@ -77,24 +79,23 @@ Following properties relate to DDR timing:

- rockchip,ddr3_drv :		  When the DRAM type is DDR3, this parameter defines
				  the DRAM side driver strength in ohms. Default
				  value is DDR3_DS_40ohm.
				  value is 40.

- rockchip,ddr3_odt :		  When the DRAM type is DDR3, this parameter defines
				  the DRAM side ODT strength in ohms. Default value
				  is DDR3_ODT_120ohm.
				  is 120.

- rockchip,phy_ddr3_ca_drv :	  When the DRAM type is DDR3, this parameter defines
				  the phy side CA line (incluing command line,
				  address line and clock line) driver strength.
				  Default value is PHY_DRV_ODT_40.
				  Default value is 40.

- rockchip,phy_ddr3_dq_drv :	  When the DRAM type is DDR3, this parameter defines
				  the PHY side DQ line (including DQS/DQ/DM line)
				  driver strength. Default value is PHY_DRV_ODT_40.
				  driver strength. Default value is 40.

- rockchip,phy_ddr3_odt : 	  When the DRAM type is DDR3, this parameter defines
				  the PHY side ODT strength. Default value is
				  PHY_DRV_ODT_240.
				  the PHY side ODT strength. Default value is 240.

- rockchip,lpddr3_odt_dis_freq : When the DRAM type is LPDDR3, this parameter defines
				  then ODT disable frequency in MHz (Mega Hz).
@@ -104,25 +105,23 @@ Following properties relate to DDR timing:

- rockchip,lpddr3_drv :		  When the DRAM type is LPDDR3, this parameter defines
				  the DRAM side driver strength in ohms. Default
				  value is LP3_DS_34ohm.
				  value is 34.

- rockchip,lpddr3_odt :		  When the DRAM type is LPDDR3, this parameter defines
				  the DRAM side ODT strength in ohms. Default value
				  is LP3_ODT_240ohm.
				  is 240.

- rockchip,phy_lpddr3_ca_drv :	  When the DRAM type is LPDDR3, this parameter defines
				  the PHY side CA line (including command line,
				  address line and clock line) driver strength.
				  Default value is PHY_DRV_ODT_40.
				  Default value is 40.

- rockchip,phy_lpddr3_dq_drv :	  When the DRAM type is LPDDR3, this parameter defines
				  the PHY side DQ line (including DQS/DQ/DM line)
				  driver strength. Default value is
				  PHY_DRV_ODT_40.
				  driver strength. Default value is 40.

- rockchip,phy_lpddr3_odt : 	  When dram type is LPDDR3, this parameter define
				  the phy side odt strength, default value is
				  PHY_DRV_ODT_240.
				  the phy side odt strength, default value is 240.

- rockchip,lpddr4_odt_dis_freq : When the DRAM type is LPDDR4, this parameter
				  defines the ODT disable frequency in
@@ -132,32 +131,30 @@ Following properties relate to DDR timing:

- rockchip,lpddr4_drv :		  When the DRAM type is LPDDR4, this parameter defines
				  the DRAM side driver strength in ohms. Default
				  value is LP4_PDDS_60ohm.
				  value is 60.

- rockchip,lpddr4_dq_odt : 	  When the DRAM type is LPDDR4, this parameter defines
				  the DRAM side ODT on DQS/DQ line strength in ohms.
				  Default value is LP4_DQ_ODT_40ohm.
				  Default value is 40.

- rockchip,lpddr4_ca_odt :	  When the DRAM type is LPDDR4, this parameter defines
				  the DRAM side ODT on CA line strength in ohms.
				  Default value is LP4_CA_ODT_40ohm.
				  Default value is 40.

- rockchip,phy_lpddr4_ca_drv :	  When the DRAM type is LPDDR4, this parameter defines
				  the PHY side CA line (including command address
				  line) driver strength. Default value is
				  PHY_DRV_ODT_40.
				  line) driver strength. Default value is 40.

- rockchip,phy_lpddr4_ck_cs_drv : When the DRAM type is LPDDR4, this parameter defines
				  the PHY side clock line and CS line driver
				  strength. Default value is PHY_DRV_ODT_80.
				  strength. Default value is 80.

- rockchip,phy_lpddr4_dq_drv :	  When the DRAM type is LPDDR4, this parameter defines
				  the PHY side DQ line (including DQS/DQ/DM line)
				  driver strength. Default value is PHY_DRV_ODT_80.
				  driver strength. Default value is 80.

- rockchip,phy_lpddr4_odt :	  When the DRAM type is LPDDR4, this parameter defines
				  the PHY side ODT strength. Default value is
				  PHY_DRV_ODT_60.
				  the PHY side ODT strength. Default value is 60.

Example:
	dmc_opp_table: dmc_opp_table {
@@ -193,23 +190,23 @@ Example:
		rockchip,phy_dll_dis_freq = <125>;
		rockchip,auto_pd_dis_freq = <666>;
		rockchip,ddr3_odt_dis_freq = <333>;
		rockchip,ddr3_drv = <DDR3_DS_40ohm>;
		rockchip,ddr3_odt = <DDR3_ODT_120ohm>;
		rockchip,phy_ddr3_ca_drv = <PHY_DRV_ODT_40>;
		rockchip,phy_ddr3_dq_drv = <PHY_DRV_ODT_40>;
		rockchip,phy_ddr3_odt = <PHY_DRV_ODT_240>;
		rockchip,ddr3_drv = <40>;
		rockchip,ddr3_odt = <120>;
		rockchip,phy_ddr3_ca_drv = <40>;
		rockchip,phy_ddr3_dq_drv = <40>;
		rockchip,phy_ddr3_odt = <240>;
		rockchip,lpddr3_odt_dis_freq = <333>;
		rockchip,lpddr3_drv = <LP3_DS_34ohm>;
		rockchip,lpddr3_odt = <LP3_ODT_240ohm>;
		rockchip,phy_lpddr3_ca_drv = <PHY_DRV_ODT_40>;
		rockchip,phy_lpddr3_dq_drv = <PHY_DRV_ODT_40>;
		rockchip,phy_lpddr3_odt = <PHY_DRV_ODT_240>;
		rockchip,lpddr3_drv = <34>;
		rockchip,lpddr3_odt = <240>;
		rockchip,phy_lpddr3_ca_drv = <40>;
		rockchip,phy_lpddr3_dq_drv = <40>;
		rockchip,phy_lpddr3_odt = <240>;
		rockchip,lpddr4_odt_dis_freq = <333>;
		rockchip,lpddr4_drv = <LP4_PDDS_60ohm>;
		rockchip,lpddr4_dq_odt = <LP4_DQ_ODT_40ohm>;
		rockchip,lpddr4_ca_odt = <LP4_CA_ODT_40ohm>;
		rockchip,phy_lpddr4_ca_drv = <PHY_DRV_ODT_40>;
		rockchip,phy_lpddr4_ck_cs_drv = <PHY_DRV_ODT_80>;
		rockchip,phy_lpddr4_dq_drv = <PHY_DRV_ODT_80>;
		rockchip,phy_lpddr4_odt = <PHY_DRV_ODT_60>;
		rockchip,lpddr4_drv = <60>;
		rockchip,lpddr4_dq_odt = <40>;
		rockchip,lpddr4_ca_odt = <40>;
		rockchip,phy_lpddr4_ca_drv = <40>;
		rockchip,phy_lpddr4_ck_cs_drv = <80>;
		rockchip,phy_lpddr4_dq_drv = <80>;
		rockchip,phy_lpddr4_odt = <60>;
	};
+4 −0
Original line number Diff line number Diff line
@@ -339,6 +339,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
      checked additionally, and -EACCES means that 'power.disable_depth' is
      different from 0

  `int pm_runtime_resume_and_get(struct device *dev);`
    - run pm_runtime_resume(dev) and if successful, increment the device's
      usage counter; return the result of pm_runtime_resume

  `int pm_request_idle(struct device *dev);`
    - submit a request to execute the subsystem-level idle callback for the
      device (the request is represented by a work item in pm_wq); returns 0 on
+9 −0
Original line number Diff line number Diff line
@@ -14439,6 +14439,15 @@ F: include/linux/pm_*
F:	include/linux/powercap.h
F:	kernel/configs/nopm.config
DYNAMIC THERMAL POWER MANAGEMENT (DTPM)
M:	Daniel Lezcano <daniel.lezcano@kernel.org>
L:	linux-pm@vger.kernel.org
S:	Supported
B:	https://bugzilla.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
F:	drivers/powercap/dtpm*
F:	include/linux/dtpm.h
POWER STATE COORDINATION INTERFACE (PSCI)
M:	Mark Rutland <mark.rutland@arm.com>
M:	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
+1 −9
Original line number Diff line number Diff line
@@ -17,17 +17,9 @@ int pcibus_to_node(struct pci_bus *bus);
#include <linux/arch_topology.h>

void update_freq_counters_refs(void);
void topology_scale_freq_tick(void);

#ifdef CONFIG_ARM64_AMU_EXTN
/*
 * Replace task scheduler's default counter-based
 * frequency-invariance scale factor setting.
 */
#define arch_scale_freq_tick topology_scale_freq_tick
#endif /* CONFIG_ARM64_AMU_EXTN */

/* Replace task scheduler's default frequency-invariant accounting */
#define arch_scale_freq_tick topology_scale_freq_tick
#define arch_set_freq_scale topology_set_freq_scale
#define arch_scale_freq_capacity topology_get_freq_scale
#define arch_scale_freq_invariant topology_scale_freq_invariant
Loading