Skip to content

Commit 3a56fe6

Browse files
committed
Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'pm-cpufreq-sched'
* pm-cpuidle: cpuidle: Add 'above' and 'below' idle state metrics cpuidle: big.LITTLE: fix refcount leak cpuidle: Add cpuidle.governor= command line parameter cpuidle: poll_state: Disregard disable idle states Documentation: admin-guide: PM: Add cpuidle document * pm-cpufreq: cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver dt-bindings: cpufreq: Introduce QCOM cpufreq firmware bindings cpufreq: nforce2: Remove meaningless return cpufreq: ia64: Remove unused header files cpufreq: imx6q: save one condition block for normal case of nvmem read cpufreq: imx6q: remove unused code cpufreq: pmac64: add of_node_put() cpufreq: powernv: add of_node_put() Documentation: intel_pstate: Clarify coordination of P-State limits cpufreq: intel_pstate: Force HWP min perf before offline cpufreq: s3c24xx: Change to use DEFINE_SHOW_ATTRIBUTE macro * pm-cpufreq-sched: sched/cpufreq: Add the SPDX tags
4 parents 7edcbbf + 04dab58 + 2849dd8 + 108c35a commit 3a56fe6

27 files changed

+1258
-202
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/cpufreq/Kconfig.arm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,17 @@ config ARM_QCOM_CPUFREQ_KRYO
114114

115115
If in doubt, say N.
116116

117+
config ARM_QCOM_CPUFREQ_HW
118+
tristate "QCOM CPUFreq HW driver"
119+
depends on ARCH_QCOM || COMPILE_TEST
120+
help
121+
Support for the CPUFreq HW driver.
122+
Some QCOM chipsets have a HW engine to offload the steps
123+
necessary for changing the frequency of the CPUs. Firmware loaded
124+
in this engine exposes a programming interface to the OS.
125+
The driver implements the cpufreq interface for this HW engine.
126+
Say Y if you want to support CPUFreq HW.
127+
117128
config ARM_S3C_CPUFREQ
118129
bool
119130
help

drivers/cpufreq/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ obj-$(CONFIG_MACH_MVEBU_V7) += mvebu-cpufreq.o
6161
obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o
6262
obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) += pxa2xx-cpufreq.o
6363
obj-$(CONFIG_PXA3xx) += pxa3xx-cpufreq.o
64+
obj-$(CONFIG_ARM_QCOM_CPUFREQ_HW) += qcom-cpufreq-hw.o
6465
obj-$(CONFIG_ARM_QCOM_CPUFREQ_KRYO) += qcom-cpufreq-kryo.o
6566
obj-$(CONFIG_ARM_S3C2410_CPUFREQ) += s3c2410-cpufreq.o
6667
obj-$(CONFIG_ARM_S3C2412_CPUFREQ) += s3c2412-cpufreq.o

drivers/cpufreq/cpufreq-nforce2.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ static void nforce2_write_pll(int pll)
123123
/* Now write the value in all 64 registers */
124124
for (temp = 0; temp <= 0x3f; temp++)
125125
pci_write_config_dword(nforce2_dev, NFORCE2_PLLREG, pll);
126-
127-
return;
128126
}
129127

130128
/**
@@ -438,4 +436,3 @@ static void __exit nforce2_exit(void)
438436

439437
module_init(nforce2_init);
440438
module_exit(nforce2_exit);
441-

0 commit comments

Comments
 (0)