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
318318 L: linux-acpi@vger.kernel.org
319319 W: https://01.org/linux-acpi
320320 S: Supported
321−F: drivers/acpi/video.c
321+F: drivers/acpi/acpi_video.c
322322
323323 ACPI WMI DRIVER
324324 L: 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
5050 if (!found)
5151 pci_add_resource(resources, &info->busn);
5252
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);
5655
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− }
6556 return;
6657
6758 default_resources:
drivers/acpi/Kconfig+2−2
@@ -58,10 +58,10 @@ config ACPI_CCA_REQUIRED · 57 unmodified lines
5858 bool
5959
6060 config ACPI_DEBUGGER
61− bool "In-kernel debugger (EXPERIMENTAL)"
61+ bool "AML debugger interface (EXPERIMENTAL)"
6262 select ACPI_DEBUG
6363 help
64− Enable in-kernel debugging facilities: statistics, internal
64+ Enable in-kernel debugging of AML facilities: statistics, internal
6565 object dump, single step control method execution.
6666 This is still under development, currently enabling this only
6767 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
768768 else
769769 continue;
770770
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+
771778 conflict = insert_resource_conflict(root, res);
772779 if (conflict) {
773780 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
17751775 }
17761776
17771777 pd = of_genpd_get_from_provider(&pd_args);
1778+ of_node_put(pd_args.np);
17781779 if (IS_ERR(pd)) {
17791780 dev_dbg(dev, "%s() failed to find PM domain: %ld\n",
17801781 __func__, PTR_ERR(pd));
1781− of_node_put(dev->of_node);
17821782 return -EPROBE_DEFER;
17831783 }
17841784
@@ -1796,7 +1796,6 @@ int genpd_dev_pm_attach(struct device *dev) · 11 unmodified lines
17961796 if (ret < 0) {
17971797 dev_err(dev, "failed to add to PM domain %s: %d",
17981798 pd->name, ret);
1799− of_node_put(dev->of_node);
18001799 goto out;
18011800 }
18021801
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
160160 struct gpd_timing_data *td;
161161 s64 constraint_ns;
162162
163− if (!pdd->dev->driver)
164− continue;
165−
166163 /*
167164 * Check if the device is allowed to be off long enough for the
168165 * 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
976976
977977 new_policy.governor = gov;
978978
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+ }
983987 /* set default policy */
984988 return cpufreq_set_policy(policy, &new_policy);
985989 }
@@ -1330,6 +1334,8 @@ static void cpufreq_offline_prepare(unsigned int cpu) · 344 unmodified lines
13301334 if (has_target())
13311335 strncpy(policy->last_governor, policy->governor->name,
13321336 CPUFREQ_NAME_LEN);
1337+ else
1338+ policy->last_policy = policy->policy;
13331339 } else if (cpu == policy->cpu) {
13341340 /* Nominate new CPU */
13351341 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
11461146 pci_dev->state_saved = false;
11471147 pci_dev->no_d3cold = false;
11481148 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+
11511162 return error;
1163+ }
11521164 if (!pci_dev->d3cold_allowed)
11531165 pci_dev->no_d3cold = true;
11541166
include/linux/acpi.h+2−2
@@ -870,8 +870,8 @@ static inline int acpi_dev_get_property(struct acpi_device *adev, · 869 unmodified lines
870870 }
871871
872872 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)
875875 {
876876 return -ENXIO;
877877 }
include/linux/cpufreq.h+1−0
@@ -77,6 +77,7 @@ struct cpufreq_policy { · 76 unmodified lines
7777 unsigned int suspend_freq; /* freq to set during suspend */
7878
7979 unsigned int policy; /* see above */
80+ unsigned int last_policy; /* policy before unplug */
8081 struct cpufreq_governor *governor; /* see below */
8182 void *governor_data;
8283 bool governor_enabled; /* governor start/stop flag */