Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+32 -19
+1 -1
arch/arm/mach-s3c24xx/Kconfig
··· 208 208 209 209 config S3C24XX_PLL 210 210 bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)" 211 - depends on ARM_S3C24XX 211 + depends on ARM_S3C24XX_CPUFREQ 212 212 help 213 213 Compile in support for changing the PLL frequency from the 214 214 S3C24XX series CPUfreq driver. The PLL takes time to settle
+1
drivers/acpi/acpi_memhotplug.c
··· 323 323 /* Get the range from the _CRS */ 324 324 result = acpi_memory_get_device_resources(mem_device); 325 325 if (result) { 326 + device->driver_data = NULL; 326 327 kfree(mem_device); 327 328 return result; 328 329 }
+9 -4
drivers/acpi/scan.c
··· 352 352 mutex_lock(&acpi_scan_lock); 353 353 lock_device_hotplug(); 354 354 355 - acpi_bus_get_device(handle, &device); 356 - if (device) { 357 - dev_warn(&device->dev, "Attempt to re-insert\n"); 358 - goto out; 355 + if (ost_source != ACPI_NOTIFY_BUS_CHECK) { 356 + acpi_bus_get_device(handle, &device); 357 + if (device) { 358 + dev_warn(&device->dev, "Attempt to re-insert\n"); 359 + goto out; 360 + } 359 361 } 360 362 acpi_evaluate_hotplug_ost(handle, ost_source, 361 363 ACPI_OST_SC_INSERT_IN_PROGRESS, NULL); ··· 1982 1980 1983 1981 if (acpi_bus_get_device(handle, &device)) 1984 1982 return AE_CTRL_DEPTH; 1983 + 1984 + if (device->handler) 1985 + return AE_OK; 1985 1986 1986 1987 ret = acpi_scan_attach_handler(device); 1987 1988 if (ret)
+8
drivers/acpi/video.c
··· 450 450 }, 451 451 { 452 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 461 .ident = "HP Pavilion dm4", 454 462 .matches = { 455 463 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+3 -1
drivers/cpufreq/cpufreq.c
··· 1942 1942 if (dev) { 1943 1943 switch (action) { 1944 1944 case CPU_ONLINE: 1945 + case CPU_ONLINE_FROZEN: 1945 1946 cpufreq_add_dev(dev, NULL); 1946 1947 break; 1947 1948 case CPU_DOWN_PREPARE: 1948 - case CPU_UP_CANCELED_FROZEN: 1949 + case CPU_DOWN_PREPARE_FROZEN: 1949 1950 __cpufreq_remove_dev(dev, NULL); 1950 1951 break; 1951 1952 case CPU_DOWN_FAILED: 1953 + case CPU_DOWN_FAILED_FROZEN: 1952 1954 cpufreq_add_dev(dev, NULL); 1953 1955 break; 1954 1956 }
-3
drivers/cpufreq/cpufreq_governor.c
··· 25 25 #include <linux/slab.h> 26 26 #include <linux/types.h> 27 27 #include <linux/workqueue.h> 28 - #include <linux/cpu.h> 29 28 30 29 #include "cpufreq_governor.h" 31 30 ··· 136 137 if (!all_cpus) { 137 138 __gov_queue_work(smp_processor_id(), dbs_data, delay); 138 139 } else { 139 - get_online_cpus(); 140 140 for_each_cpu(i, policy->cpus) 141 141 __gov_queue_work(i, dbs_data, delay); 142 - put_online_cpus(); 143 142 } 144 143 } 145 144 EXPORT_SYMBOL_GPL(gov_queue_work);
+2 -4
drivers/cpufreq/cpufreq_stats.c
··· 353 353 cpufreq_update_policy(cpu); 354 354 break; 355 355 case CPU_DOWN_PREPARE: 356 + case CPU_DOWN_PREPARE_FROZEN: 356 357 cpufreq_stats_free_sysfs(cpu); 357 358 break; 358 359 case CPU_DEAD: 359 - cpufreq_stats_free_table(cpu); 360 - break; 361 - case CPU_UP_CANCELED_FROZEN: 362 - cpufreq_stats_free_sysfs(cpu); 360 + case CPU_DEAD_FROZEN: 363 361 cpufreq_stats_free_table(cpu); 364 362 break; 365 363 }
+2 -2
drivers/cpufreq/s3c24xx-cpufreq.c
··· 49 49 static struct clk *clk_pclk; 50 50 static struct clk *clk_arm; 51 51 52 - #ifdef CONFIG_CPU_FREQ_S3C24XX_DEBUGFS 52 + #ifdef CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS 53 53 struct s3c_cpufreq_config *s3c_cpufreq_getconfig(void) 54 54 { 55 55 return &cpu_cur; ··· 59 59 { 60 60 return &s3c24xx_iotiming; 61 61 } 62 - #endif /* CONFIG_CPU_FREQ_S3C24XX_DEBUGFS */ 62 + #endif /* CONFIG_ARM_S3C24XX_CPUFREQ_DEBUGFS */ 63 63 64 64 static void s3c_cpufreq_getcur(struct s3c_cpufreq_config *cfg) 65 65 {
+1 -1
drivers/pnp/pnpacpi/rsparser.c
··· 180 180 struct pnp_dev *dev = data; 181 181 struct acpi_resource_dma *dma; 182 182 struct acpi_resource_vendor_typed *vendor_typed; 183 - struct resource r; 183 + struct resource r = {0}; 184 184 int i, flags; 185 185 186 186 if (acpi_dev_resource_memory(res, &r)
+1
drivers/pnp/resource.c
··· 515 515 } 516 516 517 517 pnp_res->res = *res; 518 + pnp_res->res.name = dev->name; 518 519 dev_dbg(&dev->dev, "%pR\n", res); 519 520 return pnp_res; 520 521 }
+2 -2
include/linux/pm_wakeup.h
··· 36 36 * @last_time: Monotonic clock when the wakeup source's was touched last time. 37 37 * @prevent_sleep_time: Total time this source has been preventing autosleep. 38 38 * @event_count: Number of signaled wakeup events. 39 - * @active_count: Number of times the wakeup sorce was activated. 40 - * @relax_count: Number of times the wakeup sorce was deactivated. 39 + * @active_count: Number of times the wakeup source was activated. 40 + * @relax_count: Number of times the wakeup source was deactivated. 41 41 * @expire_count: Number of times the wakeup source's timeout has expired. 42 42 * @wakeup_count: Number of times the wakeup source might abort suspend. 43 43 * @active: Status of the wakeup source.
+2 -1
kernel/power/autosleep.c
··· 32 32 33 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 37 mutex_unlock(&autosleep_lock); 37 38 goto out; 38 39 }