Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm+acpi-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management and ACPI fixes from Rafael Wysocki:
"These fix a recent regression in the ACPI PCI host bridge
initialization code, clean up some recent changes (generic power
domains framework, ACPI AML debugger support), fix three older but
annoying bugs (PCI power management. generic power domains framework,
cpufreq) and a build problem (device properties framework), and update
a stale MAINTAINERS entry (ACPI backlight driver).

Specifics:

- Fix a regression in the ACPI PCI host bridge initialization code
introduced by the recent consolidation of the host bridge handling
on x86 and ia64 that forgot to take one special piece of code
related to NUMA on x86 into account (Liu Jiang).

- Improve the Kconfig help description of the new ACPI AML debugger
support option to avoid possible confusion (Peter Zijlstra).

- Remove a piece of code in the generic power domains framework that
should have been removed by one of the recent commits modifying
that code (Ulf Hansson).

- Reduce the log level of a PCI PM message that generates a lot of
false-positive log noise for some drivers and improve the message
itself while at it (Imre Deak).

- Fix the OF-based domain lookup code in the generic power domains
framework to make it drop references to DT nodes correctly (Eric
Anholt).

- Prevent the cpufreq core from setting the policy back to the
default after a CPU offline/online cycle for cpufreq drivers
providing the ->setpolicy callback (Srinivas Pandruvada).

- Fix a build problem for CONFIG_ACPI unset in the device properties
framework (Hanjun Guo).

- Fix a stale file path in the ACPI backlight driver entry in
MAINTAINERS (Dan Carpenter)"

* tag 'pm+acpi-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM / Domains: Fix bad of_node_put() in failure paths of genpd_dev_pm_attach()
cpufreq: use last policy after online for drivers with ->setpolicy
PCI / PM: Tune down retryable runtime suspend error messages
PM / Domains: Validate cases of a non-bound driver in genpd governor
MAINTAINERS: ACPI / video: update a file name in drivers/acpi/
ACPI / property: fix compile error for acpi_node_get_property_reference() when CONFIG_ACPI=n
x86/PCI/ACPI: Fix regression caused by commit 4d6b4e69a245
ACPI: Better describe ACPI_DEBUGGER

+40 -27
+1 -1
MAINTAINERS
··· 318 318 L: linux-acpi@vger.kernel.org 319 319 W: https://01.org/linux-acpi 320 320 S: Supported 321 - F: drivers/acpi/video.c 321 + F: drivers/acpi/acpi_video.c 322 322 323 323 ACPI WMI DRIVER 324 324 L: platform-driver-x86@vger.kernel.org
+2 -11
arch/x86/pci/bus_numa.c
··· 50 50 if (!found) 51 51 pci_add_resource(resources, &info->busn); 52 52 53 - list_for_each_entry(root_res, &info->resources, list) { 54 - struct resource *res; 55 - struct resource *root; 53 + list_for_each_entry(root_res, &info->resources, list) 54 + pci_add_resource(resources, &root_res->res); 56 55 57 - res = &root_res->res; 58 - pci_add_resource(resources, res); 59 - if (res->flags & IORESOURCE_IO) 60 - root = &ioport_resource; 61 - else 62 - root = &iomem_resource; 63 - insert_resource(root, res); 64 - } 65 56 return; 66 57 67 58 default_resources:
+2 -2
drivers/acpi/Kconfig
··· 58 58 bool 59 59 60 60 config ACPI_DEBUGGER 61 - bool "In-kernel debugger (EXPERIMENTAL)" 61 + bool "AML debugger interface (EXPERIMENTAL)" 62 62 select ACPI_DEBUG 63 63 help 64 - Enable in-kernel debugging facilities: statistics, internal 64 + Enable in-kernel debugging of AML facilities: statistics, internal 65 65 object dump, single step control method execution. 66 66 This is still under development, currently enabling this only 67 67 results in the compilation of the ACPICA debugger files.
+7
drivers/acpi/pci_root.c
··· 768 768 else 769 769 continue; 770 770 771 + /* 772 + * Some legacy x86 host bridge drivers use iomem_resource and 773 + * ioport_resource as default resource pool, skip it. 774 + */ 775 + if (res == root) 776 + continue; 777 + 771 778 conflict = insert_resource_conflict(root, res); 772 779 if (conflict) { 773 780 dev_info(&info->bridge->dev,
+1 -2
drivers/base/power/domain.c
··· 1775 1775 } 1776 1776 1777 1777 pd = of_genpd_get_from_provider(&pd_args); 1778 + of_node_put(pd_args.np); 1778 1779 if (IS_ERR(pd)) { 1779 1780 dev_dbg(dev, "%s() failed to find PM domain: %ld\n", 1780 1781 __func__, PTR_ERR(pd)); 1781 - of_node_put(dev->of_node); 1782 1782 return -EPROBE_DEFER; 1783 1783 } 1784 1784 ··· 1796 1796 if (ret < 0) { 1797 1797 dev_err(dev, "failed to add to PM domain %s: %d", 1798 1798 pd->name, ret); 1799 - of_node_put(dev->of_node); 1800 1799 goto out; 1801 1800 } 1802 1801
-3
drivers/base/power/domain_governor.c
··· 160 160 struct gpd_timing_data *td; 161 161 s64 constraint_ns; 162 162 163 - if (!pdd->dev->driver) 164 - continue; 165 - 166 163 /* 167 164 * Check if the device is allowed to be off long enough for the 168 165 * domain to turn off and on (that's how much time it will
+10 -4
drivers/cpufreq/cpufreq.c
··· 976 976 977 977 new_policy.governor = gov; 978 978 979 - /* Use the default policy if its valid. */ 980 - if (cpufreq_driver->setpolicy) 981 - cpufreq_parse_governor(gov->name, &new_policy.policy, NULL); 982 - 979 + /* Use the default policy if there is no last_policy. */ 980 + if (cpufreq_driver->setpolicy) { 981 + if (policy->last_policy) 982 + new_policy.policy = policy->last_policy; 983 + else 984 + cpufreq_parse_governor(gov->name, &new_policy.policy, 985 + NULL); 986 + } 983 987 /* set default policy */ 984 988 return cpufreq_set_policy(policy, &new_policy); 985 989 } ··· 1334 1330 if (has_target()) 1335 1331 strncpy(policy->last_governor, policy->governor->name, 1336 1332 CPUFREQ_NAME_LEN); 1333 + else 1334 + policy->last_policy = policy->policy; 1337 1335 } else if (cpu == policy->cpu) { 1338 1336 /* Nominate new CPU */ 1339 1337 policy->cpu = cpumask_any(policy->cpus);
+14 -2
drivers/pci/pci-driver.c
··· 1146 1146 pci_dev->state_saved = false; 1147 1147 pci_dev->no_d3cold = false; 1148 1148 error = pm->runtime_suspend(dev); 1149 - suspend_report_result(pm->runtime_suspend, error); 1150 - if (error) 1149 + if (error) { 1150 + /* 1151 + * -EBUSY and -EAGAIN is used to request the runtime PM core 1152 + * to schedule a new suspend, so log the event only with debug 1153 + * log level. 1154 + */ 1155 + if (error == -EBUSY || error == -EAGAIN) 1156 + dev_dbg(dev, "can't suspend now (%pf returned %d)\n", 1157 + pm->runtime_suspend, error); 1158 + else 1159 + dev_err(dev, "can't suspend (%pf returned %d)\n", 1160 + pm->runtime_suspend, error); 1161 + 1151 1162 return error; 1163 + } 1152 1164 if (!pci_dev->d3cold_allowed) 1153 1165 pci_dev->no_d3cold = true; 1154 1166
+2 -2
include/linux/acpi.h
··· 870 870 } 871 871 872 872 static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode, 873 - const char *name, const char *cells_name, 874 - size_t index, struct acpi_reference_args *args) 873 + const char *name, size_t index, 874 + struct acpi_reference_args *args) 875 875 { 876 876 return -ENXIO; 877 877 }
+1
include/linux/cpufreq.h
··· 77 77 unsigned int suspend_freq; /* freq to set during suspend */ 78 78 79 79 unsigned int policy; /* see above */ 80 + unsigned int last_policy; /* policy before unplug */ 80 81 struct cpufreq_governor *governor; /* see below */ 81 82 void *governor_data; 82 83 bool governor_enabled; /* governor start/stop flag */