Skip to content

Commit 1e2af25

Browse files
committed
Merge tag 'pm-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki: "These add sysadmin documentation for cpuidle, extend the cpuidle subsystem somewhat, improve the handling of performance states in the generic power domains (genpd) and operating performance points (OPP) frameworks, add a new cpufreq driver for Qualcomm SoCs, update some other cpufreq drivers, switch over the runtime PM framework to using high-res timers for device autosuspend, fix a problem with suspend-to-idle on ACPI-based platforms, add system-wide suspend and resume handling to the devfreq framework, do some janitorial cleanups all over and update some utilities. Specifics: - Add sysadmin documentation for cpuidle (Rafael Wysocki). - Make it possible to specify a cpuidle governor from kernel command line, add new cpuidle state sysfs attributes for governor evaluation, and improve the "polling" idle state handling (Rafael Wysocki). - Fix the handling of the "required-opps" DT property in the operating performance points (OPP) framework, improve the integration of it with the generic power domains (genpd) framework, improve the handling of performance states in them and clean up the idle states vs performance states separation in genpd (Viresh Kumar, Ulf Hansson). - Add a cpufreq driver called "qcom-hw" for Qualcomm SoCs using a hardware engine to control CPU frequency transitions along with DT bindings for it (Taniya Das). - Fix an intel_pstate driver issue related to CPU offline and update the documentation of it (Srinivas Pandruvada). - Clean up the imx6q cpufreq driver (Anson Huang). - Add SPDX license IDs to cpufreq schedutil governor files (Daniel Lezcano). - Switch over the runtime PM framework to using high-res timers for device autosuspend to allow the control of it to be more precise (Vincent Guittot). - Disable non-wakeup ACPI GPEs during suspend-to-idle so that they don't prevent the system from reaching the target low-power state and simplify the suspend-to-idle handling on ACPI platforms without full Low-Power S0 Idle (LPS0) support (Rafael Wysocki). - Add system-wide suspend and resume support to the devfreq framework (Lukasz Luba). - Clean up the SmartReflex adaptive voltage scaling (AVS) driver and add an SPDX license ID to it (Nishanth Menon, Uwe Kleine-König, Thomas Meyer). - Get rid of code duplication by using the DEFINE_SHOW_ATTRIBUTE macro in some places, fix some DT node refcount leaks, and do some other janitorial cleanups (Yangtao Li). - Update the cpupower, intel_pstate_tracer and turbosat utilities (Abhishek Goel, Doug Smythies, Len Brown)" * tag 'pm-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (54 commits) PM / Domains: remove define_genpd_open_function() and define_genpd_debugfs_fops() PM-runtime: Switch autosuspend over to using hrtimers cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver dt-bindings: cpufreq: Introduce QCOM cpufreq firmware bindings ACPI: PM: Loop in full LPS0 mode only ACPI: EC / PM: Disable non-wakeup GPEs for suspend-to-idle tools/power/x86/intel_pstate_tracer: Fix non root execution for post processing a trace file tools/power turbostat: consolidate duplicate model numbers tools/power turbostat: fix goldmont C-state limit decoding PM / Domains: Propagate performance state updates PM / Domains: Factorize dev_pm_genpd_set_performance_state() PM / Domains: Save OPP table pointer in genpd OPP: Don't return 0 on error from of_get_required_opp_performance_state() OPP: Add dev_pm_opp_xlate_performance_state() helper OPP: Improve _find_table_of_opp_np() PM / Domains: Make genpd performance states orthogonal to the idlestates PM / sleep: convert to DEFINE_SHOW_ATTRIBUTE cpuidle: Add 'above' and 'below' idle state metrics PM / AVS: SmartReflex: Switch to SPDX Licence ID PM / AVS: SmartReflex: NULL check before some freeing functions is not needed ...
2 parents b271b21 + a465d38 commit 1e2af25

Some content is hidden

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

49 files changed

+2524
-704
lines changed

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name
145145
/sys/devices/system/cpu/cpuX/cpuidle/stateN/power
146146
/sys/devices/system/cpu/cpuX/cpuidle/stateN/time
147147
/sys/devices/system/cpu/cpuX/cpuidle/stateN/usage
148+
/sys/devices/system/cpu/cpuX/cpuidle/stateN/above
149+
/sys/devices/system/cpu/cpuX/cpuidle/stateN/below
148150
Date: September 2007
149151
KernelVersion: v2.6.24
150152
Contact: Linux power management list <linux-pm@vger.kernel.org>
@@ -166,6 +168,11 @@ Description:
166168

167169
usage: (RO) Number of times this state was entered (a count).
168170

171+
above: (RO) Number of times this state was entered, but the
172+
observed CPU idle duration was too short for it (a count).
173+
174+
below: (RO) Number of times this state was entered, but the
175+
observed CPU idle duration was too long for it (a count).
169176

170177
What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc
171178
Date: February 2008

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,9 @@
674674
cpuidle.off=1 [CPU_IDLE]
675675
disable the cpuidle sub-system
676676

677+
cpuidle.governor=
678+
[CPU_IDLE] Name of the cpuidle governor to use.
679+
677680
cpufreq.off=1 [CPU_FREQ]
678681
disable the cpufreq sub-system
679682

Documentation/admin-guide/pm/cpuidle.rst

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

Documentation/admin-guide/pm/intel_pstate.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,15 @@ on the following rules, regardless of the current operation mode of the driver:
495495

496496
2. Each individual CPU is affected by its own per-policy limits (that is, it
497497
cannot be requested to run faster than its own per-policy maximum and it
498-
cannot be requested to run slower than its own per-policy minimum).
498+
cannot be requested to run slower than its own per-policy minimum). The
499+
effective performance depends on whether the platform supports per core
500+
P-states, hyper-threading is enabled and on current performance requests
501+
from other CPUs. When platform doesn't support per core P-states, the
502+
effective performance can be more than the policy limits set on a CPU, if
503+
other CPUs are requesting higher performance at that moment. Even with per
504+
core P-states support, when hyper-threading is enabled, if the sibling CPU
505+
is requesting higher performance, the other siblings will get higher
506+
performance than their policy limits.
499507

500508
3. The global and per-policy limits can be set independently.
501509

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Working-State Power Management
55
.. toctree::
66
:maxdepth: 2
77

8+
cpuidle
89
cpufreq
910
intel_pstate

Documentation/cpuidle/core.txt

Lines changed: 0 additions & 23 deletions
This file was deleted.

Documentation/cpuidle/sysfs.txt

Lines changed: 0 additions & 98 deletions
This file was deleted.
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
Qualcomm Technologies, Inc. CPUFREQ Bindings
2+
3+
CPUFREQ HW is a hardware engine used by some Qualcomm Technologies, Inc. (QTI)
4+
SoCs to manage frequency in hardware. It is capable of controlling frequency
5+
for multiple clusters.
6+
7+
Properties:
8+
- compatible
9+
Usage: required
10+
Value type: <string>
11+
Definition: must be "qcom,cpufreq-hw".
12+
13+
- clocks
14+
Usage: required
15+
Value type: <phandle> From common clock binding.
16+
Definition: clock handle for XO clock and GPLL0 clock.
17+
18+
- clock-names
19+
Usage: required
20+
Value type: <string> From common clock binding.
21+
Definition: must be "xo", "alternate".
22+
23+
- reg
24+
Usage: required
25+
Value type: <prop-encoded-array>
26+
Definition: Addresses and sizes for the memory of the HW bases in
27+
each frequency domain.
28+
- reg-names
29+
Usage: Optional
30+
Value type: <string>
31+
Definition: Frequency domain name i.e.
32+
"freq-domain0", "freq-domain1".
33+
34+
- #freq-domain-cells:
35+
Usage: required.
36+
Definition: Number of cells in a freqency domain specifier.
37+
38+
* Property qcom,freq-domain
39+
Devices supporting freq-domain must set their "qcom,freq-domain" property with
40+
phandle to a cpufreq_hw followed by the Domain ID(0/1) in the CPU DT node.
41+
42+
43+
Example:
44+
45+
Example 1: Dual-cluster, Quad-core per cluster. CPUs within a cluster switch
46+
DCVS state together.
47+
48+
/ {
49+
cpus {
50+
#address-cells = <2>;
51+
#size-cells = <0>;
52+
53+
CPU0: cpu@0 {
54+
device_type = "cpu";
55+
compatible = "qcom,kryo385";
56+
reg = <0x0 0x0>;
57+
enable-method = "psci";
58+
next-level-cache = <&L2_0>;
59+
qcom,freq-domain = <&cpufreq_hw 0>;
60+
L2_0: l2-cache {
61+
compatible = "cache";
62+
next-level-cache = <&L3_0>;
63+
L3_0: l3-cache {
64+
compatible = "cache";
65+
};
66+
};
67+
};
68+
69+
CPU1: cpu@100 {
70+
device_type = "cpu";
71+
compatible = "qcom,kryo385";
72+
reg = <0x0 0x100>;
73+
enable-method = "psci";
74+
next-level-cache = <&L2_100>;
75+
qcom,freq-domain = <&cpufreq_hw 0>;
76+
L2_100: l2-cache {
77+
compatible = "cache";
78+
next-level-cache = <&L3_0>;
79+
};
80+
};
81+
82+
CPU2: cpu@200 {
83+
device_type = "cpu";
84+
compatible = "qcom,kryo385";
85+
reg = <0x0 0x200>;
86+
enable-method = "psci";
87+
next-level-cache = <&L2_200>;
88+
qcom,freq-domain = <&cpufreq_hw 0>;
89+
L2_200: l2-cache {
90+
compatible = "cache";
91+
next-level-cache = <&L3_0>;
92+
};
93+
};
94+
95+
CPU3: cpu@300 {
96+
device_type = "cpu";
97+
compatible = "qcom,kryo385";
98+
reg = <0x0 0x300>;
99+
enable-method = "psci";
100+
next-level-cache = <&L2_300>;
101+
qcom,freq-domain = <&cpufreq_hw 0>;
102+
L2_300: l2-cache {
103+
compatible = "cache";
104+
next-level-cache = <&L3_0>;
105+
};
106+
};
107+
108+
CPU4: cpu@400 {
109+
device_type = "cpu";
110+
compatible = "qcom,kryo385";
111+
reg = <0x0 0x400>;
112+
enable-method = "psci";
113+
next-level-cache = <&L2_400>;
114+
qcom,freq-domain = <&cpufreq_hw 1>;
115+
L2_400: l2-cache {
116+
compatible = "cache";
117+
next-level-cache = <&L3_0>;
118+
};
119+
};
120+
121+
CPU5: cpu@500 {
122+
device_type = "cpu";
123+
compatible = "qcom,kryo385";
124+
reg = <0x0 0x500>;
125+
enable-method = "psci";
126+
next-level-cache = <&L2_500>;
127+
qcom,freq-domain = <&cpufreq_hw 1>;
128+
L2_500: l2-cache {
129+
compatible = "cache";
130+
next-level-cache = <&L3_0>;
131+
};
132+
};
133+
134+
CPU6: cpu@600 {
135+
device_type = "cpu";
136+
compatible = "qcom,kryo385";
137+
reg = <0x0 0x600>;
138+
enable-method = "psci";
139+
next-level-cache = <&L2_600>;
140+
qcom,freq-domain = <&cpufreq_hw 1>;
141+
L2_600: l2-cache {
142+
compatible = "cache";
143+
next-level-cache = <&L3_0>;
144+
};
145+
};
146+
147+
CPU7: cpu@700 {
148+
device_type = "cpu";
149+
compatible = "qcom,kryo385";
150+
reg = <0x0 0x700>;
151+
enable-method = "psci";
152+
next-level-cache = <&L2_700>;
153+
qcom,freq-domain = <&cpufreq_hw 1>;
154+
L2_700: l2-cache {
155+
compatible = "cache";
156+
next-level-cache = <&L3_0>;
157+
};
158+
};
159+
};
160+
161+
soc {
162+
cpufreq_hw: cpufreq@17d43000 {
163+
compatible = "qcom,cpufreq-hw";
164+
reg = <0x17d43000 0x1400>, <0x17d45800 0x1400>;
165+
reg-names = "freq-domain0", "freq-domain1";
166+
167+
clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GPLL0>;
168+
clock-names = "xo", "alternate";
169+
170+
#freq-domain-cells = <1>;
171+
};
172+
}

drivers/acpi/ec.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,18 @@ void acpi_ec_unblock_transactions(void)
10341034
acpi_ec_start(first_ec, true);
10351035
}
10361036

1037+
void acpi_ec_mark_gpe_for_wake(void)
1038+
{
1039+
if (first_ec && !ec_no_wakeup)
1040+
acpi_mark_gpe_for_wake(NULL, first_ec->gpe);
1041+
}
1042+
1043+
void acpi_ec_set_gpe_wake_mask(u8 action)
1044+
{
1045+
if (first_ec && !ec_no_wakeup)
1046+
acpi_set_gpe_wake_mask(NULL, first_ec->gpe, action);
1047+
}
1048+
10371049
void acpi_ec_dispatch_gpe(void)
10381050
{
10391051
if (first_ec)

drivers/acpi/internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ int acpi_ec_ecdt_probe(void);
188188
int acpi_ec_dsdt_probe(void);
189189
void acpi_ec_block_transactions(void);
190190
void acpi_ec_unblock_transactions(void);
191+
void acpi_ec_mark_gpe_for_wake(void);
192+
void acpi_ec_set_gpe_wake_mask(u8 action);
191193
void acpi_ec_dispatch_gpe(void);
192194
int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
193195
acpi_handle handle, acpi_ec_query_func func,

0 commit comments

Comments
 (0)