Skip to content

Commit 3c89adb

Browse files
committed
Merge tag 'pm-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki: "These include a significant update of the generic power domains (genpd) and Operating Performance Points (OPP) frameworks, mostly related to the introduction of power domain performance levels, cpufreq updates (new driver for Qualcomm Kryo processors, updates of the existing drivers, some core fixes, schedutil governor improvements), PCI power management fixes, ACPI workaround for EC-based wakeup events handling on resume from suspend-to-idle, and major updates of the turbostat and pm-graph utilities. Specifics: - Introduce power domain performance levels into the the generic power domains (genpd) and Operating Performance Points (OPP) frameworks (Viresh Kumar, Rajendra Nayak, Dan Carpenter). - Fix two issues in the runtime PM framework related to the initialization and removal of devices using device links (Ulf Hansson). - Clean up the initialization of drivers for devices in PM domains (Ulf Hansson, Geert Uytterhoeven). - Fix a cpufreq core issue related to the policy sysfs interface causing CPU online to fail for CPUs sharing one cpufreq policy in some situations (Tao Wang). - Make it possible to use platform-specific suspend/resume hooks in the cpufreq-dt driver and make the Armada 37xx DVFS use that feature (Viresh Kumar, Miquel Raynal). - Optimize policy transition notifications in cpufreq (Viresh Kumar). - Improve the iowait boost mechanism in the schedutil cpufreq governor (Patrick Bellasi). - Improve the handling of deferred frequency updates in the schedutil cpufreq governor (Joel Fernandes, Dietmar Eggemann, Rafael Wysocki, Viresh Kumar). - Add a new cpufreq driver for Qualcomm Kryo (Ilia Lin). - Fix and clean up some cpufreq drivers (Colin Ian King, Dmitry Osipenko, Doug Smythies, Luc Van Oostenryck, Simon Horman, Viresh Kumar). - Fix the handling of PCI devices with the DPM_SMART_SUSPEND flag set and update stale comments in the PCI core PM code (Rafael Wysocki). - Work around an issue related to the handling of EC-based wakeup events in the ACPI PM core during resume from suspend-to-idle if the EC has been put into the low-power mode (Rafael Wysocki). - Improve the handling of wakeup source objects in the PM core (Doug Berger, Mahendran Ganesh, Rafael Wysocki). - Update the driver core to prevent deferred probe from breaking suspend/resume ordering (Feng Kan). - Clean up the PM core somewhat (Bjorn Helgaas, Ulf Hansson, Rafael Wysocki). - Make the core suspend/resume code and cpufreq support the RT patch (Sebastian Andrzej Siewior, Thomas Gleixner). - Consolidate the PM QoS handling in cpuidle governors (Rafael Wysocki). - Fix a possible crash in the hibernation core (Tetsuo Handa). - Update the rockchip-io Adaptive Voltage Scaling (AVS) driver (David Wu). - Update the turbostat utility (fixes, cleanups, new CPU IDs, new command line options, built-in "Low Power Idle" counters support, new POLL and POLL% columns) and add an entry for it to MAINTAINERS (Len Brown, Artem Bityutskiy, Chen Yu, Laura Abbott, Matt Turner, Prarit Bhargava, Srinivas Pandruvada). - Update the pm-graph to version 5.1 (Todd Brandt). - Update the intel_pstate_tracer utility (Doug Smythies)" * tag 'pm-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (128 commits) tools/power turbostat: update version number tools/power turbostat: Add Node in output tools/power turbostat: add node information into turbostat calculations tools/power turbostat: remove num_ from cpu_topology struct tools/power turbostat: rename num_cores_per_pkg to num_cores_per_node tools/power turbostat: track thread ID in cpu_topology tools/power turbostat: Calculate additional node information for a package tools/power turbostat: Fix node and siblings lookup data tools/power turbostat: set max_num_cpus equal to the cpumask length tools/power turbostat: if --num_iterations, print for specific number of iterations tools/power turbostat: Add Cannon Lake support tools/power turbostat: delete duplicate #defines x86: msr-index.h: Correct SNB_C1/C3_AUTO_UNDEMOTE defines tools/power turbostat: Correct SNB_C1/C3_AUTO_UNDEMOTE defines tools/power turbostat: add POLL and POLL% column tools/power turbostat: Fix --hide Pk%pc10 tools/power turbostat: Build-in "Low Power Idle" counters support tools/power turbostat: Don't make man pages executable tools/power turbostat: remove blank lines tools/power turbostat: a small C-states dump readability immprovement ...
2 parents 11e7c21 + a24e16b commit 3c89adb

Some content is hidden

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

78 files changed

+3235
-1192
lines changed

Documentation/devicetree/bindings/opp/kryo-cpufreq.txt

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

Documentation/devicetree/bindings/opp/opp.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ This defines voltage-current-frequency combinations along with other related
8282
properties.
8383

8484
Required properties:
85-
- opp-hz: Frequency in Hz, expressed as a 64-bit big-endian integer.
85+
- opp-hz: Frequency in Hz, expressed as a 64-bit big-endian integer. This is a
86+
required property for all device nodes but devices like power domains. The
87+
power domain nodes must have another (implementation dependent) property which
88+
uniquely identifies the OPP nodes.
8689

8790
Optional properties:
8891
- opp-microvolt: voltage in micro Volts.
@@ -159,7 +162,7 @@ Optional properties:
159162

160163
- status: Marks the node enabled/disabled.
161164

162-
- required-opp: This contains phandle to an OPP node in another device's OPP
165+
- required-opps: This contains phandle to an OPP node in another device's OPP
163166
table. It may contain an array of phandles, where each phandle points to an
164167
OPP of a different device. It should not contain multiple phandles to the OPP
165168
nodes in the same OPP table. This specifies the minimum required OPP of the

Documentation/devicetree/bindings/power/power_domain.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ inside a PM domain with index 0 of a power controller represented by a node
127127
with the label "power".
128128

129129
Optional properties:
130-
- required-opp: This contains phandle to an OPP node in another device's OPP
130+
- required-opps: This contains phandle to an OPP node in another device's OPP
131131
table. It may contain an array of phandles, where each phandle points to an
132132
OPP of a different device. It should not contain multiple phandles to the OPP
133133
nodes in the same OPP table. This specifies the minimum required OPP of the
@@ -175,14 +175,14 @@ Example:
175175
compatible = "foo,i-leak-current";
176176
reg = <0x12350000 0x1000>;
177177
power-domains = <&power 0>;
178-
required-opp = <&domain0_opp_0>;
178+
required-opps = <&domain0_opp_0>;
179179
};
180180

181181
leaky-device1@12350000 {
182182
compatible = "foo,i-leak-current";
183183
reg = <0x12350000 0x1000>;
184184
power-domains = <&power 1>;
185-
required-opp = <&domain1_opp_1>;
185+
required-opps = <&domain1_opp_1>;
186186
};
187187

188188
[1]. Documentation/devicetree/bindings/power/domain-idle-state.txt

Documentation/devicetree/bindings/power/rockchip-io-domain.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ SoC is on the same page.
3131

3232
Required properties:
3333
- compatible: should be one of:
34+
- "rockchip,px30-io-voltage-domain" for px30
35+
- "rockchip,px30-pmu-io-voltage-domain" for px30 pmu-domains
3436
- "rockchip,rk3188-io-voltage-domain" for rk3188
3537
- "rockchip,rk3228-io-voltage-domain" for rk3228
3638
- "rockchip,rk3288-io-voltage-domain" for rk3288
@@ -51,6 +53,19 @@ a phandle the relevant regulator. All specified supplies must be able
5153
to report their voltage. The IO Voltage Domain for any non-specified
5254
supplies will be not be touched.
5355

56+
Possible supplies for PX30:
57+
- vccio6-supply: The supply connected to VCCIO6.
58+
- vccio1-supply: The supply connected to VCCIO1.
59+
- vccio2-supply: The supply connected to VCCIO2.
60+
- vccio3-supply: The supply connected to VCCIO3.
61+
- vccio4-supply: The supply connected to VCCIO4.
62+
- vccio5-supply: The supply connected to VCCIO5.
63+
- vccio-oscgpi-supply: The supply connected to VCCIO_OSCGPI.
64+
65+
Possible supplies for PX30 pmu-domains:
66+
- pmuio1-supply: The supply connected to PMUIO1.
67+
- pmuio2-supply: The supply connected to PMUIO2.
68+
5469
Possible supplies for rk3188:
5570
- ap0-supply: The supply connected to AP0_VCC.
5671
- ap1-supply: The supply connected to AP1_VCC.

MAINTAINERS

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11663,6 +11663,13 @@ F: Documentation/devicetree/bindings/media/qcom,camss.txt
1166311663
F: Documentation/media/v4l-drivers/qcom_camss.rst
1166411664
F: drivers/media/platform/qcom/camss-8x16/
1166511665

11666+
QUALCOMM CPUFREQ DRIVER MSM8996/APQ8096
11667+
M: Ilia Lin <[email protected]>
11668+
11669+
S: Maintained
11670+
F: Documentation/devicetree/bindings/opp/kryo-cpufreq.txt
11671+
F: drivers/cpufreq/qcom-cpufreq-kryo.c
11672+
1166611673
QUALCOMM EMAC GIGABIT ETHERNET DRIVER
1166711674
M: Timur Tabi <[email protected]>
1166811675
@@ -14380,6 +14387,15 @@ S: Maintained
1438014387
F: drivers/tc/
1438114388
F: include/linux/tc.h
1438214389

14390+
TURBOSTAT UTILITY
14391+
M: "Len Brown" <[email protected]>
14392+
14393+
B: https://bugzilla.kernel.org
14394+
Q: https://patchwork.kernel.org/project/linux-pm/list/
14395+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git turbostat
14396+
S: Supported
14397+
F: tools/power/x86/turbostat/
14398+
1438314399
TW5864 VIDEO4LINUX DRIVER
1438414400
M: Bluecherry Maintainers <[email protected]>
1438514401
M: Anton Sviridenko <[email protected]>

arch/x86/include/asm/msr-index.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
#define NHM_C3_AUTO_DEMOTE (1UL << 25)
6363
#define NHM_C1_AUTO_DEMOTE (1UL << 26)
6464
#define ATM_LNC_C6_AUTO_DEMOTE (1UL << 25)
65-
#define SNB_C1_AUTO_UNDEMOTE (1UL << 27)
66-
#define SNB_C3_AUTO_UNDEMOTE (1UL << 28)
65+
#define SNB_C3_AUTO_UNDEMOTE (1UL << 27)
66+
#define SNB_C1_AUTO_UNDEMOTE (1UL << 28)
6767

6868
#define MSR_MTRRcap 0x000000fe
6969

drivers/acpi/acpica/evgpe.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,12 @@ acpi_ev_detect_gpe(struct acpi_namespace_node *gpe_device,
634634

635635
flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
636636

637+
if (!gpe_event_info) {
638+
gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
639+
if (!gpe_event_info)
640+
goto error_exit;
641+
}
642+
637643
/* Get the info block for the entire GPE register */
638644

639645
gpe_register_info = gpe_event_info->register_info;

drivers/acpi/acpica/evxfgpe.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,28 @@ acpi_get_gpe_status(acpi_handle gpe_device,
637637

638638
ACPI_EXPORT_SYMBOL(acpi_get_gpe_status)
639639

640+
/*******************************************************************************
641+
*
642+
* FUNCTION: acpi_gispatch_gpe
643+
*
644+
* PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
645+
* gpe_number - GPE level within the GPE block
646+
*
647+
* RETURN: None
648+
*
649+
* DESCRIPTION: Detect and dispatch a General Purpose Event to either a function
650+
* (e.g. EC) or method (e.g. _Lxx/_Exx) handler.
651+
*
652+
******************************************************************************/
653+
void acpi_dispatch_gpe(acpi_handle gpe_device, u32 gpe_number)
654+
{
655+
ACPI_FUNCTION_TRACE(acpi_dispatch_gpe);
656+
657+
acpi_ev_detect_gpe(gpe_device, NULL, gpe_number);
658+
}
659+
660+
ACPI_EXPORT_SYMBOL(acpi_dispatch_gpe)
661+
640662
/*******************************************************************************
641663
*
642664
* FUNCTION: acpi_finish_gpe

drivers/acpi/device_pm.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,18 +1257,15 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
12571257
struct acpi_device *adev = ACPI_COMPANION(dev);
12581258

12591259
if (!adev)
1260-
return -ENODEV;
1261-
1262-
if (dev->pm_domain)
1263-
return -EEXIST;
1260+
return 0;
12641261

12651262
/*
12661263
* Only attach the power domain to the first device if the
12671264
* companion is shared by multiple. This is to prevent doing power
12681265
* management twice.
12691266
*/
12701267
if (!acpi_device_is_first_physical_node(adev, dev))
1271-
return -EBUSY;
1268+
return 0;
12721269

12731270
acpi_add_pm_notifier(adev, dev, acpi_pm_notify_work_func);
12741271
dev_pm_domain_set(dev, &acpi_general_pm_domain);
@@ -1278,7 +1275,7 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
12781275
}
12791276

12801277
dev->pm_domain->detach = acpi_dev_pm_detach;
1281-
return 0;
1278+
return 1;
12821279
}
12831280
EXPORT_SYMBOL_GPL(acpi_dev_pm_attach);
12841281
#endif /* CONFIG_PM */

drivers/acpi/ec.c

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

1037+
void acpi_ec_dispatch_gpe(void)
1038+
{
1039+
if (first_ec)
1040+
acpi_dispatch_gpe(NULL, first_ec->gpe);
1041+
}
1042+
10371043
/* --------------------------------------------------------------------------
10381044
Event Management
10391045
-------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)