aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-19 12:59:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-19 12:59:06 -0400
commitb7356abb9fb952d385caef6d58d7e7aff17a478e (patch)
tree63dbc0e071caa944134290ac657c1da9ea55c9ce
parentecb2cf1a6b63825a258ff4fe0d7f3070fbe4676b (diff)
parent5a8d2815593007d4eb59f337ef919c871c2649ab (diff)
Merge tag 'pm+acpi-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management and ACPI fixes from Rafael Wysocki: "These are fixes collected over the last week, most importnatly two cpufreq reverts fixing regressions introduced in 3.10, an autoseelp fix preventing systems using it from crashing during shutdown and two ACPI scan fixes related to hotplug. Specifics: - Two cpufreq commits from the 3.10 cycle introduced regressions. The first of them was buggy (it did way much more than it needed to do) and the second one attempted to fix an issue introduced by the first one. Fixes from Srivatsa S Bhat revert both. - If autosleep triggers during system shutdown and the shutdown callbacks of some device drivers have been called already, it may crash the system. Fix from Liu Shuo prevents that from happening by making try_to_suspend() check system_state. - The ACPI memory hotplug driver doesn't clear its driver_data on errors which may cause a NULL poiter dereference to happen later. Fix from Toshi Kani. - The ACPI namespace scanning code should not try to attach scan handlers to device objects that have them already, which may confuse things quite a bit, and it should rescan the whole namespace branch starting at the given node after receiving a bus check notify event even if the device at that particular node has been discovered already. Fixes from Rafael J Wysocki. - New ACPI video blacklist entry for a system whose initial backlight setting from the BIOS doesn't make sense. From Lan Tianyu. - Garbage string output avoindance for ACPI PNP from Liu Shuo. - Two Kconfig fixes for issues introduced recently in the s3c24xx cpufreq driver (when moving the driver to drivers/cpufreq) from Paul Bolle. - Trivial comment fix in pm_wakeup.h from Chanwoo Choi" * tag 'pm+acpi-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / video: ignore BIOS initial backlight value for Fujitsu E753 PNP / ACPI: avoid garbage in resource name cpufreq: Revert commit 2f7021a8 to fix CPU hotplug regression cpufreq: s3c24xx: fix "depends on ARM_S3C24XX" in Kconfig cpufreq: s3c24xx: rename CONFIG_CPU_FREQ_S3C24XX_DEBUGFS PM / Sleep: Fix comment typo in pm_wakeup.h PM / Sleep: avoid 'autosleep' in shutdown progress cpufreq: Revert commit a66b2e to fix suspend/resume regression ACPI / memhotplug: Fix a stale pointer in error path ACPI / scan: Always call acpi_bus_scan() for bus check notifications ACPI / scan: Do not try to attach scan handlers to devices having them
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig2
-rw-r--r--drivers/acpi/acpi_memhotplug.c1
-rw-r--r--drivers/acpi/scan.c13
-rw-r--r--drivers/acpi/video.c8
-rw-r--r--drivers/cpufreq/cpufreq.c4
-rw-r--r--drivers/cpufreq/cpufreq_governor.c3
-rw-r--r--drivers/cpufreq/cpufreq_stats.c6
-rw-r--r--drivers/cpufreq/s3c24xx-cpufreq.c4
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c2
-rw-r--r--drivers/pnp/resource.c1
-rw-r--r--include/linux/pm_wakeup.h4
-rw-r--r--kernel/power/autosleep.c3
12 files changed, 32 insertions, 19 deletions
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 6d9252e081ce..7791ac76f945 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -208,7 +208,7 @@ config S3C24XX_GPIO_EXTRA128
208 208
209config S3C24XX_PLL 209config S3C24XX_PLL
210 bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)" 210 bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)"
211 depends on ARM_S3C24XX 211 depends on ARM_S3C24XX_CPUFREQ
212 help 212 help
213 Compile in support for changing the PLL frequency from the 213 Compile in support for changing the PLL frequency from the
214 S3C24XX series CPUfreq driver. The PLL takes time to settle 214 S3C24XX series CPUfreq driver. The PLL takes time to settle
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index c711d1144044..999adb5499c7 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -323,6 +323,7 @@ static int acpi_memory_device_add(struct acpi_device *device,
323 /* Get the range from the _CRS */ 323 /* Get the range from the _CRS */
324 result = acpi_memory_get_device_resources(mem_device); 324 result = acpi_memory_get_device_resources(mem_device);
325 if (result) { 325 if (result) {
326 device->driver_data = NULL;
326 kfree(mem_device); 327 kfree(mem_device);
327 return result; 328 return result;
328 } 329 }
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 10985573aaa7..8a46c924effd 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -352,10 +352,12 @@ static void acpi_scan_bus_device_check(acpi_handle handle, u32 ost_source)
352 mutex_lock(&acpi_scan_lock); 352 mutex_lock(&acpi_scan_lock);
353 lock_device_hotplug(); 353 lock_device_hotplug();
354 354
355 acpi_bus_get_device(handle, &device); 355 if (ost_source != ACPI_NOTIFY_BUS_CHECK) {
356 if (device) { 356 acpi_bus_get_device(handle, &device);
357 dev_warn(&device->dev, "Attempt to re-insert\n"); 357 if (device) {
358 goto out; 358 dev_warn(&device->dev, "Attempt to re-insert\n");
359 goto out;
360 }
359 } 361 }
360 acpi_evaluate_hotplug_ost(handle, ost_source, 362 acpi_evaluate_hotplug_ost(handle, ost_source,
361 ACPI_OST_SC_INSERT_IN_PROGRESS, NULL); 363 ACPI_OST_SC_INSERT_IN_PROGRESS, NULL);
@@ -1981,6 +1983,9 @@ static acpi_status acpi_bus_device_attach(acpi_handle handle, u32 lvl_not_used,
1981 if (acpi_bus_get_device(handle, &device)) 1983 if (acpi_bus_get_device(handle, &device))
1982 return AE_CTRL_DEPTH; 1984 return AE_CTRL_DEPTH;
1983 1985
1986 if (device->handler)
1987 return AE_OK;
1988
1984 ret = acpi_scan_attach_handler(device); 1989 ret = acpi_scan_attach_handler(device);
1985 if (ret) 1990 if (ret)
1986 return ret > 0 ? AE_OK : AE_CTRL_DEPTH; 1991 return ret > 0 ? AE_OK : AE_CTRL_DEPTH;
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 5d7075d25700..e441876f5d5b 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -450,6 +450,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
450 }, 450 },
451 { 451 {
452 .callback = video_ignore_initial_backlight, 452 .callback = video_ignore_initial_backlight,
453 .ident = "Fujitsu E753",
454 .matches = {
455 DMI_MATCH(DMI_BOARD_VENDOR, "FUJITSU"),
456 DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E753"),
457 },
458 },
459 {
460 .callback = video_ignore_initial_backlight,
453 .ident = "HP Pavilion dm4", 461 .ident = "HP Pavilion dm4",
454 .matches = { 462 .matches = {
455 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), 463 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index b7bda8d9f081..a4ad7339588d 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1942,13 +1942,15 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
1942 if (dev) { 1942 if (dev) {
1943 switch (action) { 1943 switch (action) {
1944 case CPU_ONLINE: 1944 case CPU_ONLINE:
1945 case CPU_ONLINE_FROZEN:
1945 cpufreq_add_dev(dev, NULL); 1946 cpufreq_add_dev(dev, NULL);
1946 break; 1947 break;
1947 case CPU_DOWN_PREPARE: 1948 case CPU_DOWN_PREPARE:
1948 case CPU_UP_CANCELED_FROZEN: 1949 case CPU_DOWN_PREPARE_FROZEN:
1949 __cpufreq_remove_dev(dev, NULL); 1950 __cpufreq_remove_dev(dev, NULL);
1950 break; 1951 break;
1951 case CPU_DOWN_FAILED: 1952 case CPU_DOWN_FAILED:
1953 case CPU_DOWN_FAILED_FROZEN:
1952 cpufreq_add_dev(dev, NULL); 1954 cpufreq_add_dev(dev, NULL);
1953 break; 1955 break;
1954 } 1956 }
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index 464587697561..7b839a8db2a7 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -25,7 +25,6 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/workqueue.h> 27#include <linux/workqueue.h>
28#include <linux/cpu.h>
29 28
30#include "cpufreq_governor.h" 29#include "cpufreq_governor.h"
31 30
@@ -137,10 +136,8 @@ void gov_queue_work(struct dbs_data *dbs_data, struct cpufreq_policy *policy,
137 if (!all_cpus) { 136 if (!all_cpus) {
138 __gov_queue_work(smp_processor_id(), dbs_data, delay); 137 __gov_queue_work(smp_processor_id(), dbs_data, delay);
139 } else { 138 } else {
140 get_online_cpus();
141 for_each_cpu(i, policy->cpus) 139 for_each_cpu(i, policy->cpus)
142 __gov_queue_work(i, dbs_data, delay); 140 __gov_queue_work(i, dbs_data, delay);
143 put_online_cpus();
144 } 141 }
145} 142}
146EXPORT_SYMBOL_GPL(gov_queue_work); 143EXPORT_SYMBOL_GPL(gov_queue_work);
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index c1ec11c513c1..d37568c5ca9c 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -353,13 +353,11 @@ static int cpufreq_stat_cpu_callback(struct notifier_block *nfb,
353 cpufreq_update_policy(cpu); 353 cpufreq_update_policy(cpu);
354 break; 354 break;
355 case CPU_DOWN_PREPARE: 355 case CPU_DOWN_PREPARE:
356 case CPU_DOWN_PREPARE_FROZEN:
356 cpufreq_stats_free_sysfs(cpu); 357 cpufreq_stats_free_sysfs(cpu);
357 break; 358 break;
358 case CPU_DEAD: 359 case CPU_DEAD:
359 cpufreq_stats_free_table(cpu); 360 case CPU_DEAD_FROZEN:
360 break;
361 case CPU_UP_CANCELED_FROZEN:
362 cpufreq_stats_free_sysfs(cpu);
363 cpufreq_stats_free_table(cpu); 361 cpufreq_stats_free_table(cpu);
364 break; 362 break;
365 } 363 }
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index 3513e7477160..87781eb20d6d 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -49,7 +49,7 @@ static struct clk *clk_hclk;
49static struct clk *clk_pclk; 49static struct clk *clk_pclk;
50static struct clk *clk_arm; 50static struct clk *clk_arm;
51 51
52#ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUGFS 52#ifdef CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS
53struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void) 53struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void)
54{ 54{
55 return &cpu_cur; 55 return &cpu_cur;
@@ -59,7 +59,7 @@ struct s3c_iotimings *s3c_cpufreq_getiotimings(void)
59{ 59{
60 return &s3c24xx_iotiming; 60 return &s3c24xx_iotiming;
61} 61}
62#endif /* CONFIG_CPU_FREQ_S3C24XX_DEBUGFS */ 62#endif /* CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS */
63 63
64static void s3c_cpufreq_getcur(struct s3c_cpufreq_config *cfg) 64static void s3c_cpufreq_getcur(struct s3c_cpufreq_config *cfg)
65{ 65{
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 9847ab163829..167f3d00c916 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -180,7 +180,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
180 struct pnp_dev *dev = data; 180 struct pnp_dev *dev = data;
181 struct acpi_resource_dma *dma; 181 struct acpi_resource_dma *dma;
182 struct acpi_resource_vendor_typed *vendor_typed; 182 struct acpi_resource_vendor_typed *vendor_typed;
183 struct resource r; 183 struct resource r = {0};
184 int i, flags; 184 int i, flags;
185 185
186 if (acpi_dev_resource_memory(res, &r) 186 if (acpi_dev_resource_memory(res, &r)
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 3e6db1c1dc29..d95e101ffb43 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -515,6 +515,7 @@ struct pnp_resource *pnp_add_resource(struct pnp_dev *dev,
515 } 515 }
516 516
517 pnp_res->res = *res; 517 pnp_res->res = *res;
518 pnp_res->res.name = dev->name;
518 dev_dbg(&dev->dev, "%pR\n", res); 519 dev_dbg(&dev->dev, "%pR\n", res);
519 return pnp_res; 520 return pnp_res;
520} 521}
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h
index 569781faa504..a0f70808d7f4 100644
--- a/include/linux/pm_wakeup.h
+++ b/include/linux/pm_wakeup.h
@@ -36,8 +36,8 @@
36 * @last_time: Monotonic clock when the wakeup source's was touched last time. 36 * @last_time: Monotonic clock when the wakeup source's was touched last time.
37 * @prevent_sleep_time: Total time this source has been preventing autosleep. 37 * @prevent_sleep_time: Total time this source has been preventing autosleep.
38 * @event_count: Number of signaled wakeup events. 38 * @event_count: Number of signaled wakeup events.
39 * @active_count: Number of times the wakeup sorce was activated. 39 * @active_count: Number of times the wakeup source was activated.
40 * @relax_count: Number of times the wakeup sorce was deactivated. 40 * @relax_count: Number of times the wakeup source was deactivated.
41 * @expire_count: Number of times the wakeup source's timeout has expired. 41 * @expire_count: Number of times the wakeup source's timeout has expired.
42 * @wakeup_count: Number of times the wakeup source might abort suspend. 42 * @wakeup_count: Number of times the wakeup source might abort suspend.
43 * @active: Status of the wakeup source. 43 * @active: Status of the wakeup source.
diff --git a/kernel/power/autosleep.c b/kernel/power/autosleep.c
index c6422ffeda9a..9012ecf7b814 100644
--- a/kernel/power/autosleep.c
+++ b/kernel/power/autosleep.c
@@ -32,7 +32,8 @@ static void try_to_suspend(struct work_struct *work)
32 32
33 mutex_lock(&autosleep_lock); 33 mutex_lock(&autosleep_lock);
34 34
35 if (!pm_save_wakeup_count(initial_count)) { 35 if (!pm_save_wakeup_count(initial_count) ||
36 system_state != SYSTEM_RUNNING) {
36 mutex_unlock(&autosleep_lock); 37 mutex_unlock(&autosleep_lock);
37 goto out; 38 goto out;
38 } 39 }