Skip to content

Commit ae98207

Browse files
committed
Merge tag 'pm+acpi-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management and ACPI updates from Rafael Wysocki: "From the number of commits perspective, the biggest items are ACPICA and cpufreq changes with the latter taking the lead (over 50 commits). On the cpufreq front, there are many cleanups and minor fixes in the core and governors, driver updates etc. We also have a new cpufreq driver for Mediatek MT8173 chips. ACPICA mostly updates its debug infrastructure and adds a number of fixes and cleanups for a good measure. The Operating Performance Points (OPP) framework is updated with new DT bindings and support for them among other things. We have a few updates of the generic power domains framework and a reorganization of the ACPI device enumeration code and bus type operations. And a lot of fixes and cleanups all over. Included is one branch from the MFD tree as it contains some PM-related driver core and ACPI PM changes a few other commits are based on. Specifics: - ACPICA update to upstream revision 20150818 including method tracing extensions to allow more in-depth AML debugging in the kernel and a number of assorted fixes and cleanups (Bob Moore, Lv Zheng, Markus Elfring). - ACPI sysfs code updates and a documentation update related to AML method tracing (Lv Zheng). - ACPI EC driver fix related to serialized evaluations of _Qxx methods and ACPI tools updates allowing the EC userspace tool to be built from the kernel source (Lv Zheng). - ACPI processor driver updates preparing it for future introduction of CPPC support and ACPI PCC mailbox driver updates (Ashwin Chaugule). - ACPI interrupts enumeration fix for a regression related to the handling of IRQ attribute conflicts between MADT and the ACPI namespace (Jiang Liu). - Fixes related to ACPI device PM (Mika Westerberg, Srinidhi Kasagar). - ACPI device registration code reorganization to separate the sysfs-related code and bus type operations from the rest (Rafael J Wysocki). - Assorted cleanups in the ACPI core (Jarkko Nikula, Mathias Krause, Andy Shevchenko, Rafael J Wysocki, Nicolas Iooss). - ACPI cpufreq driver and ia64 cpufreq driver fixes and cleanups (Pan Xinhui, Rafael J Wysocki). - cpufreq core cleanups on top of the previous changes allowing it to preseve its sysfs directories over system suspend/resume (Viresh Kumar, Rafael J Wysocki, Sebastian Andrzej Siewior). - cpufreq fixes and cleanups related to governors (Viresh Kumar). - cpufreq updates (core and the cpufreq-dt driver) related to the turbo/boost mode support (Viresh Kumar, Bartlomiej Zolnierkiewicz). - New DT bindings for Operating Performance Points (OPP), support for them in the OPP framework and in the cpufreq-dt driver plus related OPP framework fixes and cleanups (Viresh Kumar). - cpufreq powernv driver updates (Shilpasri G Bhat). - New cpufreq driver for Mediatek MT8173 (Pi-Cheng Chen). - Assorted cpufreq driver (speedstep-lib, sfi, integrator) cleanups and fixes (Abhilash Jindal, Andrzej Hajda, Cristian Ardelean). - intel_pstate driver updates including Skylake-S support, support for enabling HW P-states per CPU and an additional vendor bypass list entry (Kristen Carlson Accardi, Chen Yu, Ethan Zhao). - cpuidle core fixes related to the handling of coupled idle states (Xunlei Pang). - intel_idle driver updates including Skylake Client support and support for freeze-mode-specific idle states (Len Brown). - Driver core updates related to power management (Andy Shevchenko, Rafael J Wysocki). - Generic power domains framework fixes and cleanups (Jon Hunter, Geert Uytterhoeven, Rajendra Nayak, Ulf Hansson). - Device PM QoS framework update to allow the latency tolerance setting to be exposed to user space via sysfs (Mika Westerberg). - devfreq support for PPMUv2 in Exynos5433 and a fix for an incorrect exynos-ppmu DT binding (Chanwoo Choi, Javier Martinez Canillas). - System sleep support updates (Alan Stern, Len Brown, SungEun Kim). - rockchip-io AVS support updates (Heiko Stuebner). - PM core clocks support fixup (Colin Ian King). - Power capping RAPL driver update including support for Skylake H/S and Broadwell-H (Radivoje Jovanovic, Seiichi Ikarashi). - Generic device properties framework fixes related to the handling of static (driver-provided) property sets (Andy Shevchenko). - turbostat and cpupower updates (Len Brown, Shilpasri G Bhat, Shreyas B Prabhu)" * tag 'pm+acpi-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (180 commits) cpufreq: speedstep-lib: Use monotonic clock cpufreq: powernv: Increase the verbosity of OCC console messages cpufreq: sfi: use kmemdup rather than duplicating its implementation cpufreq: drop !cpufreq_driver check from cpufreq_parse_governor() cpufreq: rename cpufreq_real_policy as cpufreq_user_policy cpufreq: remove redundant 'policy' field from user_policy cpufreq: remove redundant 'governor' field from user_policy cpufreq: update user_policy.* on success cpufreq: use memcpy() to copy policy cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event cpufreq: mediatek: Add MT8173 cpufreq driver dt-bindings: mediatek: Add MT8173 CPU DVFS clock bindings PM / Domains: Fix typo in description of genpd_dev_pm_detach() PM / Domains: Remove unusable governor dummies PM / Domains: Make pm_genpd_init() available to modules PM / domains: Align column headers and data in pm_genpd_summary output powercap / RAPL: disable the 2nd power limit properly tools: cpupower: Fix error when running cpupower monitor PM / OPP: Drop unlikely before IS_ERR(_OR_NULL) PM / OPP: Fix static checker warning (broken 64bit big endian systems) ...
2 parents f1a3c0b + e625cce commit ae98207

File tree

212 files changed

+8448
-3381
lines changed

Some content is hidden

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

212 files changed

+8448
-3381
lines changed
Lines changed: 185 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,192 @@
1-
/sys/module/acpi/parameters/:
1+
ACPICA Trace Facility
22

3-
trace_method_name
4-
The AML method name that the user wants to trace
3+
Copyright (C) 2015, Intel Corporation
4+
Author: Lv Zheng <lv.zheng@intel.com>
55

6-
trace_debug_layer
7-
The temporary debug_layer used when tracing the method.
8-
Using 0xffffffff by default if it is 0.
96

10-
trace_debug_level
11-
The temporary debug_level used when tracing the method.
12-
Using 0x00ffffff by default if it is 0.
7+
Abstract:
138

14-
trace_state
15-
The status of the tracing feature.
9+
This document describes the functions and the interfaces of the method
10+
tracing facility.
11+
12+
1. Functionalities and usage examples:
13+
14+
ACPICA provides method tracing capability. And two functions are
15+
currently implemented using this capability.
16+
17+
A. Log reducer
18+
ACPICA subsystem provides debugging outputs when CONFIG_ACPI_DEBUG is
19+
enabled. The debugging messages which are deployed via
20+
ACPI_DEBUG_PRINT() macro can be reduced at 2 levels - per-component
21+
level (known as debug layer, configured via
22+
/sys/module/acpi/parameters/debug_layer) and per-type level (known as
23+
debug level, configured via /sys/module/acpi/parameters/debug_level).
24+
25+
But when the particular layer/level is applied to the control method
26+
evaluations, the quantity of the debugging outputs may still be too
27+
large to be put into the kernel log buffer. The idea thus is worked out
28+
to only enable the particular debug layer/level (normally more detailed)
29+
logs when the control method evaluation is started, and disable the
30+
detailed logging when the control method evaluation is stopped.
31+
32+
The following command examples illustrate the usage of the "log reducer"
33+
functionality:
34+
a. Filter out the debug layer/level matched logs when control methods
35+
are being evaluated:
36+
# cd /sys/module/acpi/parameters
37+
# echo "0xXXXXXXXX" > trace_debug_layer
38+
# echo "0xYYYYYYYY" > trace_debug_level
39+
# echo "enable" > trace_state
40+
b. Filter out the debug layer/level matched logs when the specified
41+
control method is being evaluated:
42+
# cd /sys/module/acpi/parameters
43+
# echo "0xXXXXXXXX" > trace_debug_layer
44+
# echo "0xYYYYYYYY" > trace_debug_level
45+
# echo "\PPPP.AAAA.TTTT.HHHH" > trace_method_name
46+
# echo "method" > /sys/module/acpi/parameters/trace_state
47+
c. Filter out the debug layer/level matched logs when the specified
48+
control method is being evaluated for the first time:
49+
# cd /sys/module/acpi/parameters
50+
# echo "0xXXXXXXXX" > trace_debug_layer
51+
# echo "0xYYYYYYYY" > trace_debug_level
52+
# echo "\PPPP.AAAA.TTTT.HHHH" > trace_method_name
53+
# echo "method-once" > /sys/module/acpi/parameters/trace_state
54+
Where:
55+
0xXXXXXXXX/0xYYYYYYYY: Refer to Documentation/acpi/debug.txt for
56+
possible debug layer/level masking values.
57+
\PPPP.AAAA.TTTT.HHHH: Full path of a control method that can be found
58+
in the ACPI namespace. It needn't be an entry
59+
of a control method evaluation.
60+
61+
B. AML tracer
62+
63+
There are special log entries added by the method tracing facility at
64+
the "trace points" the AML interpreter starts/stops to execute a control
65+
method, or an AML opcode. Note that the format of the log entries are
66+
subject to change:
67+
[ 0.186427] exdebug-0398 ex_trace_point : Method Begin [0xf58394d8:\_SB.PCI0.LPCB.ECOK] execution.
68+
[ 0.186630] exdebug-0398 ex_trace_point : Opcode Begin [0xf5905c88:If] execution.
69+
[ 0.186820] exdebug-0398 ex_trace_point : Opcode Begin [0xf5905cc0:LEqual] execution.
70+
[ 0.187010] exdebug-0398 ex_trace_point : Opcode Begin [0xf5905a20:-NamePath-] execution.
71+
[ 0.187214] exdebug-0398 ex_trace_point : Opcode End [0xf5905a20:-NamePath-] execution.
72+
[ 0.187407] exdebug-0398 ex_trace_point : Opcode Begin [0xf5905f60:One] execution.
73+
[ 0.187594] exdebug-0398 ex_trace_point : Opcode End [0xf5905f60:One] execution.
74+
[ 0.187789] exdebug-0398 ex_trace_point : Opcode End [0xf5905cc0:LEqual] execution.
75+
[ 0.187980] exdebug-0398 ex_trace_point : Opcode Begin [0xf5905cc0:Return] execution.
76+
[ 0.188146] exdebug-0398 ex_trace_point : Opcode Begin [0xf5905f60:One] execution.
77+
[ 0.188334] exdebug-0398 ex_trace_point : Opcode End [0xf5905f60:One] execution.
78+
[ 0.188524] exdebug-0398 ex_trace_point : Opcode End [0xf5905cc0:Return] execution.
79+
[ 0.188712] exdebug-0398 ex_trace_point : Opcode End [0xf5905c88:If] execution.
80+
[ 0.188903] exdebug-0398 ex_trace_point : Method End [0xf58394d8:\_SB.PCI0.LPCB.ECOK] execution.
1681

17-
"enabled" means this feature is enabled
18-
and the AML method is traced every time it's executed.
82+
Developers can utilize these special log entries to track the AML
83+
interpretion, thus can aid issue debugging and performance tuning. Note
84+
that, as the "AML tracer" logs are implemented via ACPI_DEBUG_PRINT()
85+
macro, CONFIG_ACPI_DEBUG is also required to be enabled for enabling
86+
"AML tracer" logs.
1987

20-
"1" means this feature is enabled and the AML method
21-
will only be traced during the next execution.
88+
The following command examples illustrate the usage of the "AML tracer"
89+
functionality:
90+
a. Filter out the method start/stop "AML tracer" logs when control
91+
methods are being evaluated:
92+
# cd /sys/module/acpi/parameters
93+
# echo "0x80" > trace_debug_layer
94+
# echo "0x10" > trace_debug_level
95+
# echo "enable" > trace_state
96+
b. Filter out the method start/stop "AML tracer" when the specified
97+
control method is being evaluated:
98+
# cd /sys/module/acpi/parameters
99+
# echo "0x80" > trace_debug_layer
100+
# echo "0x10" > trace_debug_level
101+
# echo "\PPPP.AAAA.TTTT.HHHH" > trace_method_name
102+
# echo "method" > trace_state
103+
c. Filter out the method start/stop "AML tracer" logs when the specified
104+
control method is being evaluated for the first time:
105+
# cd /sys/module/acpi/parameters
106+
# echo "0x80" > trace_debug_layer
107+
# echo "0x10" > trace_debug_level
108+
# echo "\PPPP.AAAA.TTTT.HHHH" > trace_method_name
109+
# echo "method-once" > trace_state
110+
d. Filter out the method/opcode start/stop "AML tracer" when the
111+
specified control method is being evaluated:
112+
# cd /sys/module/acpi/parameters
113+
# echo "0x80" > trace_debug_layer
114+
# echo "0x10" > trace_debug_level
115+
# echo "\PPPP.AAAA.TTTT.HHHH" > trace_method_name
116+
# echo "opcode" > trace_state
117+
e. Filter out the method/opcode start/stop "AML tracer" when the
118+
specified control method is being evaluated for the first time:
119+
# cd /sys/module/acpi/parameters
120+
# echo "0x80" > trace_debug_layer
121+
# echo "0x10" > trace_debug_level
122+
# echo "\PPPP.AAAA.TTTT.HHHH" > trace_method_name
123+
# echo "opcode-opcode" > trace_state
22124

23-
"disabled" means this feature is disabled.
24-
Users can enable/disable this debug tracing feature by
25-
"echo string > /sys/module/acpi/parameters/trace_state".
26-
"string" should be one of "enable", "disable" and "1".
125+
Note that all above method tracing facility related module parameters can
126+
be used as the boot parameters, for example:
127+
acpi.trace_debug_layer=0x80 acpi.trace_debug_level=0x10 \
128+
acpi.trace_method_name=\_SB.LID0._LID acpi.trace_state=opcode-once
129+
130+
2. Interface descriptions:
131+
132+
All method tracing functions can be configured via ACPI module
133+
parameters that are accessible at /sys/module/acpi/parameters/:
134+
135+
trace_method_name
136+
The full path of the AML method that the user wants to trace.
137+
Note that the full path shouldn't contain the trailing "_"s in its
138+
name segments but may contain "\" to form an absolute path.
139+
140+
trace_debug_layer
141+
The temporary debug_layer used when the tracing feature is enabled.
142+
Using ACPI_EXECUTER (0x80) by default, which is the debug_layer
143+
used to match all "AML tracer" logs.
144+
145+
trace_debug_level
146+
The temporary debug_level used when the tracing feature is enabled.
147+
Using ACPI_LV_TRACE_POINT (0x10) by default, which is the
148+
debug_level used to match all "AML tracer" logs.
149+
150+
trace_state
151+
The status of the tracing feature.
152+
Users can enable/disable this debug tracing feature by executing
153+
the following command:
154+
# echo string > /sys/module/acpi/parameters/trace_state
155+
Where "string" should be one of the followings:
156+
"disable"
157+
Disable the method tracing feature.
158+
"enable"
159+
Enable the method tracing feature.
160+
ACPICA debugging messages matching
161+
"trace_debug_layer/trace_debug_level" during any method
162+
execution will be logged.
163+
"method"
164+
Enable the method tracing feature.
165+
ACPICA debugging messages matching
166+
"trace_debug_layer/trace_debug_level" during method execution
167+
of "trace_method_name" will be logged.
168+
"method-once"
169+
Enable the method tracing feature.
170+
ACPICA debugging messages matching
171+
"trace_debug_layer/trace_debug_level" during method execution
172+
of "trace_method_name" will be logged only once.
173+
"opcode"
174+
Enable the method tracing feature.
175+
ACPICA debugging messages matching
176+
"trace_debug_layer/trace_debug_level" during method/opcode
177+
execution of "trace_method_name" will be logged.
178+
"opcode-once"
179+
Enable the method tracing feature.
180+
ACPICA debugging messages matching
181+
"trace_debug_layer/trace_debug_level" during method/opcode
182+
execution of "trace_method_name" will be logged only once.
183+
Note that, the difference between the "enable" and other feature
184+
enabling options are:
185+
1. When "enable" is specified, since
186+
"trace_debug_layer/trace_debug_level" shall apply to all control
187+
method evaluations, after configuring "trace_state" to "enable",
188+
"trace_method_name" will be reset to NULL.
189+
2. When "method/opcode" is specified, if
190+
"trace_method_name" is NULL when "trace_state" is configured to
191+
these options, the "trace_debug_layer/trace_debug_level" will
192+
apply to all control method evaluations.

Documentation/cpu-freq/core.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,13 @@ transition notifiers.
5555
----------------------------
5656

5757
These are notified when a new policy is intended to be set. Each
58-
CPUFreq policy notifier is called three times for a policy transition:
58+
CPUFreq policy notifier is called twice for a policy transition:
5959

6060
1.) During CPUFREQ_ADJUST all CPUFreq notifiers may change the limit if
6161
they see a need for this - may it be thermal considerations or
6262
hardware limitations.
6363

64-
2.) During CPUFREQ_INCOMPATIBLE only changes may be done in order to avoid
65-
hardware failure.
66-
67-
3.) And during CPUFREQ_NOTIFY all notifiers are informed of the new policy
64+
2.) And during CPUFREQ_NOTIFY all notifiers are informed of the new policy
6865
- if two hardware drivers failed to agree on a new policy before this
6966
stage, the incompatible hardware shall be shut down, and the user
7067
informed of this.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Device Tree Clock bindins for CPU DVFS of Mediatek MT8173 SoC
2+
3+
Required properties:
4+
- clocks: A list of phandle + clock-specifier pairs for the clocks listed in clock names.
5+
- clock-names: Should contain the following:
6+
"cpu" - The multiplexer for clock input of CPU cluster.
7+
"intermediate" - A parent of "cpu" clock which is used as "intermediate" clock
8+
source (usually MAINPLL) when the original CPU PLL is under
9+
transition and not stable yet.
10+
Please refer to Documentation/devicetree/bindings/clk/clock-bindings.txt for
11+
generic clock consumer properties.
12+
- proc-supply: Regulator for Vproc of CPU cluster.
13+
14+
Optional properties:
15+
- sram-supply: Regulator for Vsram of CPU cluster. When present, the cpufreq driver
16+
needs to do "voltage tracking" to step by step scale up/down Vproc and
17+
Vsram to fit SoC specific needs. When absent, the voltage scaling
18+
flow is handled by hardware, hence no software "voltage tracking" is
19+
needed.
20+
21+
Example:
22+
--------
23+
cpu0: cpu@0 {
24+
device_type = "cpu";
25+
compatible = "arm,cortex-a53";
26+
reg = <0x000>;
27+
enable-method = "psci";
28+
cpu-idle-states = <&CPU_SLEEP_0>;
29+
clocks = <&infracfg CLK_INFRA_CA53SEL>,
30+
<&apmixedsys CLK_APMIXED_MAINPLL>;
31+
clock-names = "cpu", "intermediate";
32+
};
33+
34+
cpu1: cpu@1 {
35+
device_type = "cpu";
36+
compatible = "arm,cortex-a53";
37+
reg = <0x001>;
38+
enable-method = "psci";
39+
cpu-idle-states = <&CPU_SLEEP_0>;
40+
clocks = <&infracfg CLK_INFRA_CA53SEL>,
41+
<&apmixedsys CLK_APMIXED_MAINPLL>;
42+
clock-names = "cpu", "intermediate";
43+
};
44+
45+
cpu2: cpu@100 {
46+
device_type = "cpu";
47+
compatible = "arm,cortex-a57";
48+
reg = <0x100>;
49+
enable-method = "psci";
50+
cpu-idle-states = <&CPU_SLEEP_0>;
51+
clocks = <&infracfg CLK_INFRA_CA57SEL>,
52+
<&apmixedsys CLK_APMIXED_MAINPLL>;
53+
clock-names = "cpu", "intermediate";
54+
};
55+
56+
cpu3: cpu@101 {
57+
device_type = "cpu";
58+
compatible = "arm,cortex-a57";
59+
reg = <0x101>;
60+
enable-method = "psci";
61+
cpu-idle-states = <&CPU_SLEEP_0>;
62+
clocks = <&infracfg CLK_INFRA_CA57SEL>,
63+
<&apmixedsys CLK_APMIXED_MAINPLL>;
64+
clock-names = "cpu", "intermediate";
65+
};
66+
67+
&cpu0 {
68+
proc-supply = <&mt6397_vpca15_reg>;
69+
};
70+
71+
&cpu1 {
72+
proc-supply = <&mt6397_vpca15_reg>;
73+
};
74+
75+
&cpu2 {
76+
proc-supply = <&da9211_vcpu_reg>;
77+
sram-supply = <&mt6397_vsramca7_reg>;
78+
};
79+
80+
&cpu3 {
81+
proc-supply = <&da9211_vcpu_reg>;
82+
sram-supply = <&mt6397_vsramca7_reg>;
83+
};

Documentation/devicetree/bindings/devfreq/event/exynos-ppmu.txt

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ to various devfreq devices. The devfreq devices would use the event data when
1111
derterming the current state of each IP.
1212

1313
Required properties:
14-
- compatible: Should be "samsung,exynos-ppmu".
14+
- compatible: Should be "samsung,exynos-ppmu" or "samsung,exynos-ppmu-v2.
1515
- reg: physical base address of each PPMU and length of memory mapped region.
1616

1717
Optional properties:
1818
- clock-names : the name of clock used by the PPMU, "ppmu"
1919
- clocks : phandles for clock specified in "clock-names" property
20-
- #clock-cells: should be 1.
2120

22-
Example1 : PPMU nodes in exynos3250.dtsi are listed below.
21+
Example1 : PPMUv1 nodes in exynos3250.dtsi are listed below.
2322

2423
ppmu_dmc0: ppmu_dmc0@106a0000 {
2524
compatible = "samsung,exynos-ppmu";
@@ -108,3 +107,41 @@ Example2 : Events of each PPMU node in exynos3250-rinato.dts are listed below.
108107
};
109108
};
110109
};
110+
111+
Example3 : PPMUv2 nodes in exynos5433.dtsi are listed below.
112+
113+
ppmu_d0_cpu: ppmu_d0_cpu@10480000 {
114+
compatible = "samsung,exynos-ppmu-v2";
115+
reg = <0x10480000 0x2000>;
116+
status = "disabled";
117+
};
118+
119+
ppmu_d0_general: ppmu_d0_general@10490000 {
120+
compatible = "samsung,exynos-ppmu-v2";
121+
reg = <0x10490000 0x2000>;
122+
status = "disabled";
123+
};
124+
125+
ppmu_d0_rt: ppmu_d0_rt@104a0000 {
126+
compatible = "samsung,exynos-ppmu-v2";
127+
reg = <0x104a0000 0x2000>;
128+
status = "disabled";
129+
};
130+
131+
ppmu_d1_cpu: ppmu_d1_cpu@104b0000 {
132+
compatible = "samsung,exynos-ppmu-v2";
133+
reg = <0x104b0000 0x2000>;
134+
status = "disabled";
135+
};
136+
137+
ppmu_d1_general: ppmu_d1_general@104c0000 {
138+
compatible = "samsung,exynos-ppmu-v2";
139+
reg = <0x104c0000 0x2000>;
140+
status = "disabled";
141+
};
142+
143+
ppmu_d1_rt: ppmu_d1_rt@104d0000 {
144+
compatible = "samsung,exynos-ppmu-v2";
145+
reg = <0x104d0000 0x2000>;
146+
status = "disabled";
147+
};

0 commit comments

Comments
 (0)