diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-07 16:03:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-07 16:03:53 -0400 |
commit | 3132aef2ed51d0248c89b102247be73f44e2b826 (patch) | |
tree | c286a2b045efa0a44b1a95fb7eb314c786b8a0c5 | |
parent | 1612e111e4e565422242727efb59499cce8738e4 (diff) | |
parent | c6617b39c39d8735c912bb4efd2f735fedff5052 (diff) |
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()
-rw-r--r-- | drivers/acpi/apei/ghes.c | 7 | ||||
-rw-r--r-- | drivers/acpi/device_pm.c | 10 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 4 | ||||
-rw-r--r-- | drivers/acpi/video.c | 16 | ||||
-rw-r--r-- | drivers/cpufreq/acpi-cpufreq.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq-cpu0.c | 5 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 3 | ||||
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 2 |
8 files changed, 39 insertions, 12 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 403baf4dffc1..fcd7d91cec34 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -919,13 +919,14 @@ static int ghes_probe(struct platform_device *ghes_dev) | |||
919 | break; | 919 | break; |
920 | case ACPI_HEST_NOTIFY_EXTERNAL: | 920 | case ACPI_HEST_NOTIFY_EXTERNAL: |
921 | /* External interrupt vector is GSI */ | 921 | /* External interrupt vector is GSI */ |
922 | if (acpi_gsi_to_irq(generic->notify.vector, &ghes->irq)) { | 922 | rc = acpi_gsi_to_irq(generic->notify.vector, &ghes->irq); |
923 | if (rc) { | ||
923 | pr_err(GHES_PFX "Failed to map GSI to IRQ for generic hardware error source: %d\n", | 924 | pr_err(GHES_PFX "Failed to map GSI to IRQ for generic hardware error source: %d\n", |
924 | generic->header.source_id); | 925 | generic->header.source_id); |
925 | goto err_edac_unreg; | 926 | goto err_edac_unreg; |
926 | } | 927 | } |
927 | if (request_irq(ghes->irq, ghes_irq_func, | 928 | rc = request_irq(ghes->irq, ghes_irq_func, 0, "GHES IRQ", ghes); |
928 | 0, "GHES IRQ", ghes)) { | 929 | if (rc) { |
929 | pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n", | 930 | pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n", |
930 | generic->header.source_id); | 931 | generic->header.source_id); |
931 | goto err_edac_unreg; | 932 | goto err_edac_unreg; |
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index bc493aa3af19..318fa32a141e 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c | |||
@@ -278,11 +278,13 @@ int acpi_bus_init_power(struct acpi_device *device) | |||
278 | if (result) | 278 | if (result) |
279 | return result; | 279 | return result; |
280 | } else if (state == ACPI_STATE_UNKNOWN) { | 280 | } else if (state == ACPI_STATE_UNKNOWN) { |
281 | /* No power resources and missing _PSC? Try to force D0. */ | 281 | /* |
282 | * No power resources and missing _PSC? Cross fingers and make | ||
283 | * it D0 in hope that this is what the BIOS put the device into. | ||
284 | * [We tried to force D0 here by executing _PS0, but that broke | ||
285 | * Toshiba P870-303 in a nasty way.] | ||
286 | */ | ||
282 | state = ACPI_STATE_D0; | 287 | state = ACPI_STATE_D0; |
283 | result = acpi_dev_pm_explicit_set(device, state); | ||
284 | if (result) | ||
285 | return result; | ||
286 | } | 288 | } |
287 | device->power.state = state; | 289 | device->power.state = state; |
288 | return 0; | 290 | return 0; |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 44225cb15f3a..90c5759e1355 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -740,6 +740,10 @@ static int acpi_bus_match(struct device *dev, struct device_driver *drv) | |||
740 | struct acpi_device *acpi_dev = to_acpi_device(dev); | 740 | struct acpi_device *acpi_dev = to_acpi_device(dev); |
741 | struct acpi_driver *acpi_drv = to_acpi_driver(drv); | 741 | struct acpi_driver *acpi_drv = to_acpi_driver(drv); |
742 | 742 | ||
743 | /* Skip ACPI device objects with scan handlers attached. */ | ||
744 | if (acpi_dev->handler) | ||
745 | return 0; | ||
746 | |||
743 | return acpi_dev->flags.match_driver | 747 | return acpi_dev->flags.match_driver |
744 | && !acpi_match_device_ids(acpi_dev, acpi_drv->ids); | 748 | && !acpi_match_device_ids(acpi_dev, acpi_drv->ids); |
745 | } | 749 | } |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 5b32e15a65ce..5d7075d25700 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -458,12 +458,28 @@ static struct dmi_system_id video_dmi_table[] __initdata = { | |||
458 | }, | 458 | }, |
459 | { | 459 | { |
460 | .callback = video_ignore_initial_backlight, | 460 | .callback = video_ignore_initial_backlight, |
461 | .ident = "HP Pavilion g6 Notebook PC", | ||
462 | .matches = { | ||
463 | DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), | ||
464 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"), | ||
465 | }, | ||
466 | }, | ||
467 | { | ||
468 | .callback = video_ignore_initial_backlight, | ||
461 | .ident = "HP 1000 Notebook PC", | 469 | .ident = "HP 1000 Notebook PC", |
462 | .matches = { | 470 | .matches = { |
463 | DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), | 471 | DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), |
464 | DMI_MATCH(DMI_PRODUCT_NAME, "HP 1000 Notebook PC"), | 472 | DMI_MATCH(DMI_PRODUCT_NAME, "HP 1000 Notebook PC"), |
465 | }, | 473 | }, |
466 | }, | 474 | }, |
475 | { | ||
476 | .callback = video_ignore_initial_backlight, | ||
477 | .ident = "HP Pavilion m4", | ||
478 | .matches = { | ||
479 | DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), | ||
480 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion m4 Notebook PC"), | ||
481 | }, | ||
482 | }, | ||
467 | {} | 483 | {} |
468 | }; | 484 | }; |
469 | 485 | ||
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 11b8b4b54ceb..edc089e9d0c4 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c | |||
@@ -347,11 +347,11 @@ static u32 get_cur_val(const struct cpumask *mask) | |||
347 | switch (per_cpu(acfreq_data, cpumask_first(mask))->cpu_feature) { | 347 | switch (per_cpu(acfreq_data, cpumask_first(mask))->cpu_feature) { |
348 | case SYSTEM_INTEL_MSR_CAPABLE: | 348 | case SYSTEM_INTEL_MSR_CAPABLE: |
349 | cmd.type = SYSTEM_INTEL_MSR_CAPABLE; | 349 | cmd.type = SYSTEM_INTEL_MSR_CAPABLE; |
350 | cmd.addr.msr.reg = MSR_IA32_PERF_STATUS; | 350 | cmd.addr.msr.reg = MSR_IA32_PERF_CTL; |
351 | break; | 351 | break; |
352 | case SYSTEM_AMD_MSR_CAPABLE: | 352 | case SYSTEM_AMD_MSR_CAPABLE: |
353 | cmd.type = SYSTEM_AMD_MSR_CAPABLE; | 353 | cmd.type = SYSTEM_AMD_MSR_CAPABLE; |
354 | cmd.addr.msr.reg = MSR_AMD_PERF_STATUS; | 354 | cmd.addr.msr.reg = MSR_AMD_PERF_CTL; |
355 | break; | 355 | break; |
356 | case SYSTEM_IO_CAPABLE: | 356 | case SYSTEM_IO_CAPABLE: |
357 | cmd.type = SYSTEM_IO_CAPABLE; | 357 | cmd.type = SYSTEM_IO_CAPABLE; |
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index a64eb8b70444..ad1fde277661 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c | |||
@@ -45,7 +45,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy, | |||
45 | struct cpufreq_freqs freqs; | 45 | struct cpufreq_freqs freqs; |
46 | struct opp *opp; | 46 | struct opp *opp; |
47 | unsigned long volt = 0, volt_old = 0, tol = 0; | 47 | unsigned long volt = 0, volt_old = 0, tol = 0; |
48 | long freq_Hz; | 48 | long freq_Hz, freq_exact; |
49 | unsigned int index; | 49 | unsigned int index; |
50 | int ret; | 50 | int ret; |
51 | 51 | ||
@@ -60,6 +60,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy, | |||
60 | freq_Hz = clk_round_rate(cpu_clk, freq_table[index].frequency * 1000); | 60 | freq_Hz = clk_round_rate(cpu_clk, freq_table[index].frequency * 1000); |
61 | if (freq_Hz < 0) | 61 | if (freq_Hz < 0) |
62 | freq_Hz = freq_table[index].frequency * 1000; | 62 | freq_Hz = freq_table[index].frequency * 1000; |
63 | freq_exact = freq_Hz; | ||
63 | freqs.new = freq_Hz / 1000; | 64 | freqs.new = freq_Hz / 1000; |
64 | freqs.old = clk_get_rate(cpu_clk) / 1000; | 65 | freqs.old = clk_get_rate(cpu_clk) / 1000; |
65 | 66 | ||
@@ -98,7 +99,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy, | |||
98 | } | 99 | } |
99 | } | 100 | } |
100 | 101 | ||
101 | ret = clk_set_rate(cpu_clk, freqs.new * 1000); | 102 | ret = clk_set_rate(cpu_clk, freq_exact); |
102 | if (ret) { | 103 | if (ret) { |
103 | pr_err("failed to set clock rate: %d\n", ret); | 104 | pr_err("failed to set clock rate: %d\n", ret); |
104 | if (cpu_reg) | 105 | if (cpu_reg) |
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 5af40ad82d23..dc9b72e25c1a 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/tick.h> | 26 | #include <linux/tick.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/workqueue.h> | 28 | #include <linux/workqueue.h> |
29 | #include <linux/cpu.h> | ||
29 | 30 | ||
30 | #include "cpufreq_governor.h" | 31 | #include "cpufreq_governor.h" |
31 | 32 | ||
@@ -180,8 +181,10 @@ void gov_queue_work(struct dbs_data *dbs_data, struct cpufreq_policy *policy, | |||
180 | if (!all_cpus) { | 181 | if (!all_cpus) { |
181 | __gov_queue_work(smp_processor_id(), dbs_data, delay); | 182 | __gov_queue_work(smp_processor_id(), dbs_data, delay); |
182 | } else { | 183 | } else { |
184 | get_online_cpus(); | ||
183 | for_each_cpu(i, policy->cpus) | 185 | for_each_cpu(i, policy->cpus) |
184 | __gov_queue_work(i, dbs_data, delay); | 186 | __gov_queue_work(i, dbs_data, delay); |
187 | put_online_cpus(); | ||
185 | } | 188 | } |
186 | } | 189 | } |
187 | EXPORT_SYMBOL_GPL(gov_queue_work); | 190 | EXPORT_SYMBOL_GPL(gov_queue_work); |
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 8df0c5a21be2..d111c8687f9b 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
@@ -703,7 +703,7 @@ static int hp_wmi_rfkill_setup(struct platform_device *device) | |||
703 | } | 703 | } |
704 | rfkill_init_sw_state(gps_rfkill, | 704 | rfkill_init_sw_state(gps_rfkill, |
705 | hp_wmi_get_sw_state(HPWMI_GPS)); | 705 | hp_wmi_get_sw_state(HPWMI_GPS)); |
706 | rfkill_set_hw_state(bluetooth_rfkill, | 706 | rfkill_set_hw_state(gps_rfkill, |
707 | hp_wmi_get_hw_state(HPWMI_GPS)); | 707 | hp_wmi_get_hw_state(HPWMI_GPS)); |
708 | err = rfkill_register(gps_rfkill); | 708 | err = rfkill_register(gps_rfkill); |
709 | if (err) | 709 | if (err) |