Commit b1007e73 authored by Linus Torvalds's avatar Linus Torvalds

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 4d6b4e69
  ACPI: Better describe ACPI_DEBUGGER
parents 071f5d10 d441fe25
...@@ -318,7 +318,7 @@ M: Zhang Rui <rui.zhang@intel.com> ...@@ -318,7 +318,7 @@ M: Zhang Rui <rui.zhang@intel.com>
L: linux-acpi@vger.kernel.org L: linux-acpi@vger.kernel.org
W: https://01.org/linux-acpi W: https://01.org/linux-acpi
S: Supported S: Supported
F: drivers/acpi/video.c F: drivers/acpi/acpi_video.c
ACPI WMI DRIVER ACPI WMI DRIVER
L: platform-driver-x86@vger.kernel.org L: platform-driver-x86@vger.kernel.org
......
...@@ -50,18 +50,9 @@ void x86_pci_root_bus_resources(int bus, struct list_head *resources) ...@@ -50,18 +50,9 @@ void x86_pci_root_bus_resources(int bus, struct list_head *resources)
if (!found) if (!found)
pci_add_resource(resources, &info->busn); pci_add_resource(resources, &info->busn);
list_for_each_entry(root_res, &info->resources, list) { list_for_each_entry(root_res, &info->resources, list)
struct resource *res; pci_add_resource(resources, &root_res->res);
struct resource *root;
res = &root_res->res;
pci_add_resource(resources, res);
if (res->flags & IORESOURCE_IO)
root = &ioport_resource;
else
root = &iomem_resource;
insert_resource(root, res);
}
return; return;
default_resources: default_resources:
......
...@@ -58,10 +58,10 @@ config ACPI_CCA_REQUIRED ...@@ -58,10 +58,10 @@ config ACPI_CCA_REQUIRED
bool bool
config ACPI_DEBUGGER config ACPI_DEBUGGER
bool "In-kernel debugger (EXPERIMENTAL)" bool "AML debugger interface (EXPERIMENTAL)"
select ACPI_DEBUG select ACPI_DEBUG
help help
Enable in-kernel debugging facilities: statistics, internal Enable in-kernel debugging of AML facilities: statistics, internal
object dump, single step control method execution. object dump, single step control method execution.
This is still under development, currently enabling this only This is still under development, currently enabling this only
results in the compilation of the ACPICA debugger files. results in the compilation of the ACPICA debugger files.
......
...@@ -768,6 +768,13 @@ static void pci_acpi_root_add_resources(struct acpi_pci_root_info *info) ...@@ -768,6 +768,13 @@ static void pci_acpi_root_add_resources(struct acpi_pci_root_info *info)
else else
continue; continue;
/*
* Some legacy x86 host bridge drivers use iomem_resource and
* ioport_resource as default resource pool, skip it.
*/
if (res == root)
continue;
conflict = insert_resource_conflict(root, res); conflict = insert_resource_conflict(root, res);
if (conflict) { if (conflict) {
dev_info(&info->bridge->dev, dev_info(&info->bridge->dev,
......
...@@ -1775,10 +1775,10 @@ int genpd_dev_pm_attach(struct device *dev) ...@@ -1775,10 +1775,10 @@ int genpd_dev_pm_attach(struct device *dev)
} }
pd = of_genpd_get_from_provider(&pd_args); pd = of_genpd_get_from_provider(&pd_args);
of_node_put(pd_args.np);
if (IS_ERR(pd)) { if (IS_ERR(pd)) {
dev_dbg(dev, "%s() failed to find PM domain: %ld\n", dev_dbg(dev, "%s() failed to find PM domain: %ld\n",
__func__, PTR_ERR(pd)); __func__, PTR_ERR(pd));
of_node_put(dev->of_node);
return -EPROBE_DEFER; return -EPROBE_DEFER;
} }
...@@ -1796,7 +1796,6 @@ int genpd_dev_pm_attach(struct device *dev) ...@@ -1796,7 +1796,6 @@ int genpd_dev_pm_attach(struct device *dev)
if (ret < 0) { if (ret < 0) {
dev_err(dev, "failed to add to PM domain %s: %d", dev_err(dev, "failed to add to PM domain %s: %d",
pd->name, ret); pd->name, ret);
of_node_put(dev->of_node);
goto out; goto out;
} }
......
...@@ -160,9 +160,6 @@ static bool default_power_down_ok(struct dev_pm_domain *pd) ...@@ -160,9 +160,6 @@ static bool default_power_down_ok(struct dev_pm_domain *pd)
struct gpd_timing_data *td; struct gpd_timing_data *td;
s64 constraint_ns; s64 constraint_ns;
if (!pdd->dev->driver)
continue;
/* /*
* Check if the device is allowed to be off long enough for the * Check if the device is allowed to be off long enough for the
* domain to turn off and on (that's how much time it will * domain to turn off and on (that's how much time it will
......
...@@ -976,10 +976,14 @@ static int cpufreq_init_policy(struct cpufreq_policy *policy) ...@@ -976,10 +976,14 @@ static int cpufreq_init_policy(struct cpufreq_policy *policy)
new_policy.governor = gov; new_policy.governor = gov;
/* Use the default policy if its valid. */ /* Use the default policy if there is no last_policy. */
if (cpufreq_driver->setpolicy) if (cpufreq_driver->setpolicy) {
cpufreq_parse_governor(gov->name, &new_policy.policy, NULL); if (policy->last_policy)
new_policy.policy = policy->last_policy;
else
cpufreq_parse_governor(gov->name, &new_policy.policy,
NULL);
}
/* set default policy */ /* set default policy */
return cpufreq_set_policy(policy, &new_policy); return cpufreq_set_policy(policy, &new_policy);
} }
...@@ -1330,6 +1334,8 @@ static void cpufreq_offline_prepare(unsigned int cpu) ...@@ -1330,6 +1334,8 @@ static void cpufreq_offline_prepare(unsigned int cpu)
if (has_target()) if (has_target())
strncpy(policy->last_governor, policy->governor->name, strncpy(policy->last_governor, policy->governor->name,
CPUFREQ_NAME_LEN); CPUFREQ_NAME_LEN);
else
policy->last_policy = policy->policy;
} else if (cpu == policy->cpu) { } else if (cpu == policy->cpu) {
/* Nominate new CPU */ /* Nominate new CPU */
policy->cpu = cpumask_any(policy->cpus); policy->cpu = cpumask_any(policy->cpus);
......
...@@ -1146,9 +1146,21 @@ static int pci_pm_runtime_suspend(struct device *dev) ...@@ -1146,9 +1146,21 @@ static int pci_pm_runtime_suspend(struct device *dev)
pci_dev->state_saved = false; pci_dev->state_saved = false;
pci_dev->no_d3cold = false; pci_dev->no_d3cold = false;
error = pm->runtime_suspend(dev); error = pm->runtime_suspend(dev);
suspend_report_result(pm->runtime_suspend, error); if (error) {
if (error) /*
* -EBUSY and -EAGAIN is used to request the runtime PM core
* to schedule a new suspend, so log the event only with debug
* log level.
*/
if (error == -EBUSY || error == -EAGAIN)
dev_dbg(dev, "can't suspend now (%pf returned %d)\n",
pm->runtime_suspend, error);
else
dev_err(dev, "can't suspend (%pf returned %d)\n",
pm->runtime_suspend, error);
return error; return error;
}
if (!pci_dev->d3cold_allowed) if (!pci_dev->d3cold_allowed)
pci_dev->no_d3cold = true; pci_dev->no_d3cold = true;
......
...@@ -870,8 +870,8 @@ static inline int acpi_dev_get_property(struct acpi_device *adev, ...@@ -870,8 +870,8 @@ static inline int acpi_dev_get_property(struct acpi_device *adev,
} }
static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode, static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode,
const char *name, const char *cells_name, const char *name, size_t index,
size_t index, struct acpi_reference_args *args) struct acpi_reference_args *args)
{ {
return -ENXIO; return -ENXIO;
} }
......
...@@ -77,6 +77,7 @@ struct cpufreq_policy { ...@@ -77,6 +77,7 @@ struct cpufreq_policy {
unsigned int suspend_freq; /* freq to set during suspend */ unsigned int suspend_freq; /* freq to set during suspend */
unsigned int policy; /* see above */ unsigned int policy; /* see above */
unsigned int last_policy; /* policy before unplug */
struct cpufreq_governor *governor; /* see below */ struct cpufreq_governor *governor; /* see below */
void *governor_data; void *governor_data;
bool governor_enabled; /* governor start/stop flag */ bool governor_enabled; /* governor start/stop flag */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment