Commit 3132aef2 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull power management and ACPI fixes from Rafael J Wysocki:

 - Fix for an ACPI PM regression causing Toshiba P870-303 to crash
   during boot from Rafael J Wysocki.

 - ACPI fix for an issue causing some drivers to attempt to bind to
   devices they shouldn't touch from Aaron Lu.

 - Fix for a recent cpufreq regression related to a possible race with
   CPU offline from Michael Wang.

 - ACPI cpufreq regression fix for an issue causing turbo frequencies to
   be underutilized in some cases from Ross Lagerwall.

 - cpufreq-cpu0 driver fix related to incorrect clock ACPI usage from
   Guennadi Liakhovetski.

 - HP WMI driver fix for an issue causing GPS initialization and
   poweroff failures on HP Elitebook 6930p from Lan Tianyu.

 - APEI (ACPI Platform Error Interface) fix for an issue in the error
   code path in ghes_probe() from Wei Yongjun.

 - New ACPI video driver blacklist entries for HP m4 and HP Pavilion g6
   from Alex Hung and Ash Willis.

* tag 'pm+acpi-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / PM: Do not execute _PS0 for devices without _PSC during initialization
  cpufreq: cpufreq-cpu0: use the exact frequency for clk_set_rate()
  cpufreq: protect 'policy->cpus' from offlining during __gov_queue_work()
  ACPI / scan: do not match drivers against objects having scan handlers
  ACPI / APEI: fix error return code in ghes_probe()
  acpi-cpufreq: set current frequency based on target P-State
  ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6
  ACPI / video: ignore BIOS initial backlight value for HP m4
  x86 / platform / hp_wmi: Fix bluetooth_rfkill misuse in hp_wmi_rfkill_setup()
parents 1612e111 c6617b39
...@@ -919,13 +919,14 @@ static int ghes_probe(struct platform_device *ghes_dev) ...@@ -919,13 +919,14 @@ static int ghes_probe(struct platform_device *ghes_dev)
break; break;
case ACPI_HEST_NOTIFY_EXTERNAL: case ACPI_HEST_NOTIFY_EXTERNAL:
/* External interrupt vector is GSI */ /* External interrupt vector is GSI */
if (acpi_gsi_to_irq(generic->notify.vector, &ghes->irq)) { rc = acpi_gsi_to_irq(generic->notify.vector, &ghes->irq);
if (rc) {
pr_err(GHES_PFX "Failed to map GSI to IRQ for generic hardware error source: %d\n", pr_err(GHES_PFX "Failed to map GSI to IRQ for generic hardware error source: %d\n",
generic->header.source_id); generic->header.source_id);
goto err_edac_unreg; goto err_edac_unreg;
} }
if (request_irq(ghes->irq, ghes_irq_func, rc = request_irq(ghes->irq, ghes_irq_func, 0, "GHES IRQ", ghes);
0, "GHES IRQ", ghes)) { if (rc) {
pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n", pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n",
generic->header.source_id); generic->header.source_id);
goto err_edac_unreg; goto err_edac_unreg;
......
...@@ -278,11 +278,13 @@ int acpi_bus_init_power(struct acpi_device *device) ...@@ -278,11 +278,13 @@ int acpi_bus_init_power(struct acpi_device *device)
if (result) if (result)
return result; return result;
} else if (state == ACPI_STATE_UNKNOWN) { } else if (state == ACPI_STATE_UNKNOWN) {
/* No power resources and missing _PSC? Try to force D0. */ /*
* No power resources and missing _PSC? Cross fingers and make
* it D0 in hope that this is what the BIOS put the device into.
* [We tried to force D0 here by executing _PS0, but that broke
* Toshiba P870-303 in a nasty way.]
*/
state = ACPI_STATE_D0; state = ACPI_STATE_D0;
result = acpi_dev_pm_explicit_set(device, state);
if (result)
return result;
} }
device->power.state = state; device->power.state = state;
return 0; return 0;
......
...@@ -740,6 +740,10 @@ static int acpi_bus_match(struct device *dev, struct device_driver *drv) ...@@ -740,6 +740,10 @@ static int acpi_bus_match(struct device *dev, struct device_driver *drv)
struct acpi_device *acpi_dev = to_acpi_device(dev); struct acpi_device *acpi_dev = to_acpi_device(dev);
struct acpi_driver *acpi_drv = to_acpi_driver(drv); struct acpi_driver *acpi_drv = to_acpi_driver(drv);
/* Skip ACPI device objects with scan handlers attached. */
if (acpi_dev->handler)
return 0;
return acpi_dev->flags.match_driver return acpi_dev->flags.match_driver
&& !acpi_match_device_ids(acpi_dev, acpi_drv->ids); && !acpi_match_device_ids(acpi_dev, acpi_drv->ids);
} }
......
...@@ -456,6 +456,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { ...@@ -456,6 +456,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"), DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"),
}, },
}, },
{
.callback = video_ignore_initial_backlight,
.ident = "HP Pavilion g6 Notebook PC",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"),
},
},
{ {
.callback = video_ignore_initial_backlight, .callback = video_ignore_initial_backlight,
.ident = "HP 1000 Notebook PC", .ident = "HP 1000 Notebook PC",
...@@ -464,6 +472,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { ...@@ -464,6 +472,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
DMI_MATCH(DMI_PRODUCT_NAME, "HP 1000 Notebook PC"), DMI_MATCH(DMI_PRODUCT_NAME, "HP 1000 Notebook PC"),
}, },
}, },
{
.callback = video_ignore_initial_backlight,
.ident = "HP Pavilion m4",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion m4 Notebook PC"),
},
},
{} {}
}; };
......
...@@ -347,11 +347,11 @@ static u32 get_cur_val(const struct cpumask *mask) ...@@ -347,11 +347,11 @@ static u32 get_cur_val(const struct cpumask *mask)
switch (per_cpu(acfreq_data, cpumask_first(mask))->cpu_feature) { switch (per_cpu(acfreq_data, cpumask_first(mask))->cpu_feature) {
case SYSTEM_INTEL_MSR_CAPABLE: case SYSTEM_INTEL_MSR_CAPABLE:
cmd.type = SYSTEM_INTEL_MSR_CAPABLE; cmd.type = SYSTEM_INTEL_MSR_CAPABLE;
cmd.addr.msr.reg = MSR_IA32_PERF_STATUS; cmd.addr.msr.reg = MSR_IA32_PERF_CTL;
break; break;
case SYSTEM_AMD_MSR_CAPABLE: case SYSTEM_AMD_MSR_CAPABLE:
cmd.type = SYSTEM_AMD_MSR_CAPABLE; cmd.type = SYSTEM_AMD_MSR_CAPABLE;
cmd.addr.msr.reg = MSR_AMD_PERF_STATUS; cmd.addr.msr.reg = MSR_AMD_PERF_CTL;
break; break;
case SYSTEM_IO_CAPABLE: case SYSTEM_IO_CAPABLE:
cmd.type = SYSTEM_IO_CAPABLE; cmd.type = SYSTEM_IO_CAPABLE;
......
...@@ -45,7 +45,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy, ...@@ -45,7 +45,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
struct cpufreq_freqs freqs; struct cpufreq_freqs freqs;
struct opp *opp; struct opp *opp;
unsigned long volt = 0, volt_old = 0, tol = 0; unsigned long volt = 0, volt_old = 0, tol = 0;
long freq_Hz; long freq_Hz, freq_exact;
unsigned int index; unsigned int index;
int ret; int ret;
...@@ -60,6 +60,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy, ...@@ -60,6 +60,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
freq_Hz = clk_round_rate(cpu_clk, freq_table[index].frequency * 1000); freq_Hz = clk_round_rate(cpu_clk, freq_table[index].frequency * 1000);
if (freq_Hz < 0) if (freq_Hz < 0)
freq_Hz = freq_table[index].frequency * 1000; freq_Hz = freq_table[index].frequency * 1000;
freq_exact = freq_Hz;
freqs.new = freq_Hz / 1000; freqs.new = freq_Hz / 1000;
freqs.old = clk_get_rate(cpu_clk) / 1000; freqs.old = clk_get_rate(cpu_clk) / 1000;
...@@ -98,7 +99,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy, ...@@ -98,7 +99,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
} }
} }
ret = clk_set_rate(cpu_clk, freqs.new * 1000); ret = clk_set_rate(cpu_clk, freq_exact);
if (ret) { if (ret) {
pr_err("failed to set clock rate: %d\n", ret); pr_err("failed to set clock rate: %d\n", ret);
if (cpu_reg) if (cpu_reg)
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/tick.h> #include <linux/tick.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/cpu.h>
#include "cpufreq_governor.h" #include "cpufreq_governor.h"
...@@ -180,8 +181,10 @@ void gov_queue_work(struct dbs_data *dbs_data, struct cpufreq_policy *policy, ...@@ -180,8 +181,10 @@ void gov_queue_work(struct dbs_data *dbs_data, struct cpufreq_policy *policy,
if (!all_cpus) { if (!all_cpus) {
__gov_queue_work(smp_processor_id(), dbs_data, delay); __gov_queue_work(smp_processor_id(), dbs_data, delay);
} else { } else {
get_online_cpus();
for_each_cpu(i, policy->cpus) for_each_cpu(i, policy->cpus)
__gov_queue_work(i, dbs_data, delay); __gov_queue_work(i, dbs_data, delay);
put_online_cpus();
} }
} }
EXPORT_SYMBOL_GPL(gov_queue_work); EXPORT_SYMBOL_GPL(gov_queue_work);
......
...@@ -703,7 +703,7 @@ static int hp_wmi_rfkill_setup(struct platform_device *device) ...@@ -703,7 +703,7 @@ static int hp_wmi_rfkill_setup(struct platform_device *device)
} }
rfkill_init_sw_state(gps_rfkill, rfkill_init_sw_state(gps_rfkill,
hp_wmi_get_sw_state(HPWMI_GPS)); hp_wmi_get_sw_state(HPWMI_GPS));
rfkill_set_hw_state(bluetooth_rfkill, rfkill_set_hw_state(gps_rfkill,
hp_wmi_get_hw_state(HPWMI_GPS)); hp_wmi_get_hw_state(HPWMI_GPS));
err = rfkill_register(gps_rfkill); err = rfkill_register(gps_rfkill);
if (err) if (err)
......
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