History

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

Linus Torvalds committed 10 years ago

Commit b1007e72 parents 071f5d1 d441fe210 files · +40 −27Browse files

Unified · Split

10 files
  1. MAINTAINERS +1 −1
  2. arch/x86/pci/bus_numa.c +2 −11
  3. drivers/acpi/Kconfig +2 −2
  4. drivers/acpi/pci_root.c +7 −0
  5. drivers/base/power/domain.c +1 −2
  6. drivers/base/power/domain_governor.c +0 −3
  7. drivers/cpufreq/cpufreq.c +10 −4
  8. drivers/pci/pci-driver.c +14 −2
  9. include/linux/acpi.h +2 −2
  10. include/linux/cpufreq.h +1 −0
MAINTAINERS+1−1
@@ -318,7 +318,7 @@ M: Zhang Rui <rui.zhang@intel.com> · 317 unmodified lines
318L: linux-acpi@vger.kernel.org318L: linux-acpi@vger.kernel.org
319W: https://01.org/linux-acpi319W: https://01.org/linux-acpi
320S: Supported320S: Supported
321F: drivers/acpi/video.c321F: drivers/acpi/acpi_video.c
322 322
323ACPI WMI DRIVER323ACPI WMI DRIVER
324L: platform-driver-x86@vger.kernel.org324L: platform-driver-x86@vger.kernel.org
arch/x86/pci/bus_numa.c+2−11
@@ -50,18 +50,9 @@ void x86_pci_root_bus_resources(int bus, struct list_head *resources) · 49 unmodified lines
50 if (!found)50 if (!found)
51 pci_add_resource(resources, &info->busn);51 pci_add_resource(resources, &info->busn);
52 52
53 list_for_each_entry(root_res, &info->resources, list) {53 list_for_each_entry(root_res, &info->resources, list)
54 struct resource *res;54 pci_add_resource(resources, &root_res->res);
55 struct resource *root;
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 return;56 return;
66 57
67default_resources:58default_resources:
drivers/acpi/Kconfig+2−2
@@ -58,10 +58,10 @@ config ACPI_CCA_REQUIRED · 57 unmodified lines
58 bool58 bool
59 59
60config ACPI_DEBUGGER60config ACPI_DEBUGGER
61 bool "In-kernel debugger (EXPERIMENTAL)"61 bool "AML debugger interface (EXPERIMENTAL)"
62 select ACPI_DEBUG62 select ACPI_DEBUG
63 help63 help
64 Enable in-kernel debugging facilities: statistics, internal64 Enable in-kernel debugging of AML facilities: statistics, internal
65 object dump, single step control method execution.65 object dump, single step control method execution.
66 This is still under development, currently enabling this only66 This is still under development, currently enabling this only
67 results in the compilation of the ACPICA debugger files.67 results in the compilation of the ACPICA debugger files.
drivers/acpi/pci_root.c+7−0
@@ -768,6 +768,13 @@ static void pci_acpi_root_add_resources(struct acpi_pci_root_info *info) · 767 unmodified lines
768 else768 else
769 continue;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 conflict = insert_resource_conflict(root, res);778 conflict = insert_resource_conflict(root, res);
772 if (conflict) {779 if (conflict) {
773 dev_info(&info->bridge->dev,780 dev_info(&info->bridge->dev,
drivers/base/power/domain.c+1−2
@@ -1775,10 +1775,10 @@ int genpd_dev_pm_attach(struct device *dev) · 1774 unmodified lines
1775 }1775 }
1776 1776
1777 pd = of_genpd_get_from_provider(&pd_args);1777 pd = of_genpd_get_from_provider(&pd_args);
1778 of_node_put(pd_args.np);
1778 if (IS_ERR(pd)) {1779 if (IS_ERR(pd)) {
1779 dev_dbg(dev, "%s() failed to find PM domain: %ld\n",1780 dev_dbg(dev, "%s() failed to find PM domain: %ld\n",
1780 __func__, PTR_ERR(pd));1781 __func__, PTR_ERR(pd));
1781 of_node_put(dev->of_node);
1782 return -EPROBE_DEFER;1782 return -EPROBE_DEFER;
1783 }1783 }
1784 1784
@@ -1796,7 +1796,6 @@ int genpd_dev_pm_attach(struct device *dev) · 11 unmodified lines
1796 if (ret < 0) {1796 if (ret < 0) {
1797 dev_err(dev, "failed to add to PM domain %s: %d",1797 dev_err(dev, "failed to add to PM domain %s: %d",
1798 pd->name, ret);1798 pd->name, ret);
1799 of_node_put(dev->of_node);
1800 goto out;1799 goto out;
1801 }1800 }
1802 1801
drivers/base/power/domain_governor.c+0−3
@@ -160,9 +160,6 @@ static bool default_power_down_ok(struct dev_pm_domain *pd) · 159 unmodified lines
160 struct gpd_timing_data *td;160 struct gpd_timing_data *td;
161 s64 constraint_ns;161 s64 constraint_ns;
162 162
163 if (!pdd->dev->driver)
164 continue;
165
166 /*163 /*
167 * Check if the device is allowed to be off long enough for the164 * Check if the device is allowed to be off long enough for the
168 * domain to turn off and on (that's how much time it will165 * domain to turn off and on (that's how much time it will
drivers/cpufreq/cpufreq.c+10−4
@@ -976,10 +976,14 @@ static int cpufreq_init_policy(struct cpufreq_policy *policy) · 975 unmodified lines
976 976
977 new_policy.governor = gov;977 new_policy.governor = gov;
978 978
979 /* Use the default policy if its valid. */979 /* Use the default policy if there is no last_policy. */
980 if (cpufreq_driver->setpolicy)980 if (cpufreq_driver->setpolicy) {
981 cpufreq_parse_governor(gov->name, &new_policy.policy, NULL);981 if (policy->last_policy)
982 982 new_policy.policy = policy->last_policy;
983 else
984 cpufreq_parse_governor(gov->name, &new_policy.policy,
985 NULL);
986 }
983 /* set default policy */987 /* set default policy */
984 return cpufreq_set_policy(policy, &new_policy);988 return cpufreq_set_policy(policy, &new_policy);
985}989}
@@ -1330,6 +1334,8 @@ static void cpufreq_offline_prepare(unsigned int cpu) · 344 unmodified lines
1330 if (has_target())1334 if (has_target())
1331 strncpy(policy->last_governor, policy->governor->name,1335 strncpy(policy->last_governor, policy->governor->name,
1332 CPUFREQ_NAME_LEN);1336 CPUFREQ_NAME_LEN);
1337 else
1338 policy->last_policy = policy->policy;
1333 } else if (cpu == policy->cpu) {1339 } else if (cpu == policy->cpu) {
1334 /* Nominate new CPU */1340 /* Nominate new CPU */
1335 policy->cpu = cpumask_any(policy->cpus);1341 policy->cpu = cpumask_any(policy->cpus);
drivers/pci/pci-driver.c+14−2
@@ -1146,9 +1146,21 @@ static int pci_pm_runtime_suspend(struct device *dev) · 1145 unmodified lines
1146 pci_dev->state_saved = false;1146 pci_dev->state_saved = false;
1147 pci_dev->no_d3cold = false;1147 pci_dev->no_d3cold = false;
1148 error = pm->runtime_suspend(dev);1148 error = pm->runtime_suspend(dev);
1149 suspend_report_result(pm->runtime_suspend, error);1149 if (error) {
1150 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 return error;1162 return error;
1163 }
1152 if (!pci_dev->d3cold_allowed)1164 if (!pci_dev->d3cold_allowed)
1153 pci_dev->no_d3cold = true;1165 pci_dev->no_d3cold = true;
1154 1166
include/linux/acpi.h+2−2
@@ -870,8 +870,8 @@ static inline int acpi_dev_get_property(struct acpi_device *adev, · 869 unmodified lines
870}870}
871 871
872static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode,872static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode,
873 const char *name, const char *cells_name,873 const char *name, size_t index,
874 size_t index, struct acpi_reference_args *args)874 struct acpi_reference_args *args)
875{875{
876 return -ENXIO;876 return -ENXIO;
877}877}
include/linux/cpufreq.h+1−0
@@ -77,6 +77,7 @@ struct cpufreq_policy { · 76 unmodified lines
77 unsigned int suspend_freq; /* freq to set during suspend */77 unsigned int suspend_freq; /* freq to set during suspend */
78 78
79 unsigned int policy; /* see above */79 unsigned int policy; /* see above */
80 unsigned int last_policy; /* policy before unplug */
80 struct cpufreq_governor *governor; /* see below */81 struct cpufreq_governor *governor; /* see below */
81 void *governor_data;82 void *governor_data;
82 bool governor_enabled; /* governor start/stop flag */83 bool governor_enabled; /* governor start/stop flag */