diff options
-rw-r--r-- | arch/x86/kernel/apm_32.c | 8 | ||||
-rw-r--r-- | drivers/base/power/main.c | 26 | ||||
-rw-r--r-- | drivers/xen/manage.c | 10 | ||||
-rw-r--r-- | include/linux/pm.h | 4 | ||||
-rw-r--r-- | kernel/kexec.c | 8 | ||||
-rw-r--r-- | kernel/power/disk.c | 16 | ||||
-rw-r--r-- | kernel/power/main.c | 4 |
7 files changed, 38 insertions, 38 deletions
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 49e0939bac42..31ae547da159 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -1235,7 +1235,7 @@ static int suspend(int vetoable) | |||
1235 | 1235 | ||
1236 | device_suspend(PMSG_SUSPEND); | 1236 | device_suspend(PMSG_SUSPEND); |
1237 | 1237 | ||
1238 | device_power_down(PMSG_SUSPEND); | 1238 | device_suspend_noirq(PMSG_SUSPEND); |
1239 | 1239 | ||
1240 | local_irq_disable(); | 1240 | local_irq_disable(); |
1241 | sysdev_suspend(PMSG_SUSPEND); | 1241 | sysdev_suspend(PMSG_SUSPEND); |
@@ -1259,7 +1259,7 @@ static int suspend(int vetoable) | |||
1259 | sysdev_resume(); | 1259 | sysdev_resume(); |
1260 | local_irq_enable(); | 1260 | local_irq_enable(); |
1261 | 1261 | ||
1262 | device_power_up(PMSG_RESUME); | 1262 | device_resume_noirq(PMSG_RESUME); |
1263 | 1263 | ||
1264 | device_resume(PMSG_RESUME); | 1264 | device_resume(PMSG_RESUME); |
1265 | queue_event(APM_NORMAL_RESUME, NULL); | 1265 | queue_event(APM_NORMAL_RESUME, NULL); |
@@ -1277,7 +1277,7 @@ static void standby(void) | |||
1277 | { | 1277 | { |
1278 | int err; | 1278 | int err; |
1279 | 1279 | ||
1280 | device_power_down(PMSG_SUSPEND); | 1280 | device_suspend_noirq(PMSG_SUSPEND); |
1281 | 1281 | ||
1282 | local_irq_disable(); | 1282 | local_irq_disable(); |
1283 | sysdev_suspend(PMSG_SUSPEND); | 1283 | sysdev_suspend(PMSG_SUSPEND); |
@@ -1291,7 +1291,7 @@ static void standby(void) | |||
1291 | sysdev_resume(); | 1291 | sysdev_resume(); |
1292 | local_irq_enable(); | 1292 | local_irq_enable(); |
1293 | 1293 | ||
1294 | device_power_up(PMSG_RESUME); | 1294 | device_resume_noirq(PMSG_RESUME); |
1295 | } | 1295 | } |
1296 | 1296 | ||
1297 | static apm_event_t get_event(void) | 1297 | static apm_event_t get_event(void) |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 3e4bc699bc0f..c5a35bc9d63b 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -315,13 +315,13 @@ static void pm_dev_err(struct device *dev, pm_message_t state, char *info, | |||
315 | /*------------------------- Resume routines -------------------------*/ | 315 | /*------------------------- Resume routines -------------------------*/ |
316 | 316 | ||
317 | /** | 317 | /** |
318 | * resume_device_noirq - Power on one device (early resume). | 318 | * __device_resume_noirq - Power on one device (early resume). |
319 | * @dev: Device. | 319 | * @dev: Device. |
320 | * @state: PM transition of the system being carried out. | 320 | * @state: PM transition of the system being carried out. |
321 | * | 321 | * |
322 | * Must be called with interrupts disabled. | 322 | * Must be called with interrupts disabled. |
323 | */ | 323 | */ |
324 | static int resume_device_noirq(struct device *dev, pm_message_t state) | 324 | static int __device_resume_noirq(struct device *dev, pm_message_t state) |
325 | { | 325 | { |
326 | int error = 0; | 326 | int error = 0; |
327 | 327 | ||
@@ -363,7 +363,7 @@ static void dpm_power_up(pm_message_t state) | |||
363 | int error; | 363 | int error; |
364 | 364 | ||
365 | dev->power.status = DPM_OFF; | 365 | dev->power.status = DPM_OFF; |
366 | error = resume_device_noirq(dev, state); | 366 | error = __device_resume_noirq(dev, state); |
367 | if (error) | 367 | if (error) |
368 | pm_dev_err(dev, state, " early", error); | 368 | pm_dev_err(dev, state, " early", error); |
369 | } | 369 | } |
@@ -371,18 +371,18 @@ static void dpm_power_up(pm_message_t state) | |||
371 | } | 371 | } |
372 | 372 | ||
373 | /** | 373 | /** |
374 | * device_power_up - Turn on all devices that need special attention. | 374 | * device_resume_noirq - Turn on all devices that need special attention. |
375 | * @state: PM transition of the system being carried out. | 375 | * @state: PM transition of the system being carried out. |
376 | * | 376 | * |
377 | * Call the "early" resume handlers and enable device drivers to receive | 377 | * Call the "early" resume handlers and enable device drivers to receive |
378 | * interrupts. | 378 | * interrupts. |
379 | */ | 379 | */ |
380 | void device_power_up(pm_message_t state) | 380 | void device_resume_noirq(pm_message_t state) |
381 | { | 381 | { |
382 | dpm_power_up(state); | 382 | dpm_power_up(state); |
383 | resume_device_irqs(); | 383 | resume_device_irqs(); |
384 | } | 384 | } |
385 | EXPORT_SYMBOL_GPL(device_power_up); | 385 | EXPORT_SYMBOL_GPL(device_resume_noirq); |
386 | 386 | ||
387 | /** | 387 | /** |
388 | * resume_device - Restore state for one device. | 388 | * resume_device - Restore state for one device. |
@@ -577,13 +577,13 @@ static pm_message_t resume_event(pm_message_t sleep_state) | |||
577 | } | 577 | } |
578 | 578 | ||
579 | /** | 579 | /** |
580 | * suspend_device_noirq - Shut down one device (late suspend). | 580 | * __device_suspend_noirq - Shut down one device (late suspend). |
581 | * @dev: Device. | 581 | * @dev: Device. |
582 | * @state: PM transition of the system being carried out. | 582 | * @state: PM transition of the system being carried out. |
583 | * | 583 | * |
584 | * This is called with interrupts off and only a single CPU running. | 584 | * This is called with interrupts off and only a single CPU running. |
585 | */ | 585 | */ |
586 | static int suspend_device_noirq(struct device *dev, pm_message_t state) | 586 | static int __device_suspend_noirq(struct device *dev, pm_message_t state) |
587 | { | 587 | { |
588 | int error = 0; | 588 | int error = 0; |
589 | 589 | ||
@@ -602,7 +602,7 @@ static int suspend_device_noirq(struct device *dev, pm_message_t state) | |||
602 | } | 602 | } |
603 | 603 | ||
604 | /** | 604 | /** |
605 | * device_power_down - Shut down special devices. | 605 | * device_suspend_noirq - Shut down special devices. |
606 | * @state: PM transition of the system being carried out. | 606 | * @state: PM transition of the system being carried out. |
607 | * | 607 | * |
608 | * Prevent device drivers from receiving interrupts and call the "late" | 608 | * Prevent device drivers from receiving interrupts and call the "late" |
@@ -610,7 +610,7 @@ static int suspend_device_noirq(struct device *dev, pm_message_t state) | |||
610 | * | 610 | * |
611 | * Must be called under dpm_list_mtx. | 611 | * Must be called under dpm_list_mtx. |
612 | */ | 612 | */ |
613 | int device_power_down(pm_message_t state) | 613 | int device_suspend_noirq(pm_message_t state) |
614 | { | 614 | { |
615 | struct device *dev; | 615 | struct device *dev; |
616 | int error = 0; | 616 | int error = 0; |
@@ -618,7 +618,7 @@ int device_power_down(pm_message_t state) | |||
618 | suspend_device_irqs(); | 618 | suspend_device_irqs(); |
619 | mutex_lock(&dpm_list_mtx); | 619 | mutex_lock(&dpm_list_mtx); |
620 | list_for_each_entry_reverse(dev, &dpm_list, power.entry) { | 620 | list_for_each_entry_reverse(dev, &dpm_list, power.entry) { |
621 | error = suspend_device_noirq(dev, state); | 621 | error = __device_suspend_noirq(dev, state); |
622 | if (error) { | 622 | if (error) { |
623 | pm_dev_err(dev, state, " late", error); | 623 | pm_dev_err(dev, state, " late", error); |
624 | break; | 624 | break; |
@@ -627,10 +627,10 @@ int device_power_down(pm_message_t state) | |||
627 | } | 627 | } |
628 | mutex_unlock(&dpm_list_mtx); | 628 | mutex_unlock(&dpm_list_mtx); |
629 | if (error) | 629 | if (error) |
630 | device_power_up(resume_event(state)); | 630 | device_resume_noirq(resume_event(state)); |
631 | return error; | 631 | return error; |
632 | } | 632 | } |
633 | EXPORT_SYMBOL_GPL(device_power_down); | 633 | EXPORT_SYMBOL_GPL(device_suspend_noirq); |
634 | 634 | ||
635 | /** | 635 | /** |
636 | * suspend_device - Save state of one device. | 636 | * suspend_device - Save state of one device. |
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index fddc2025dece..d5b327ac4039 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -43,7 +43,7 @@ static int xen_suspend(void *data) | |||
43 | if (err) { | 43 | if (err) { |
44 | printk(KERN_ERR "xen_suspend: sysdev_suspend failed: %d\n", | 44 | printk(KERN_ERR "xen_suspend: sysdev_suspend failed: %d\n", |
45 | err); | 45 | err); |
46 | device_power_up(PMSG_RESUME); | 46 | device_resume_noirq(PMSG_RESUME); |
47 | return err; | 47 | return err; |
48 | } | 48 | } |
49 | 49 | ||
@@ -69,7 +69,7 @@ static int xen_suspend(void *data) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | sysdev_resume(); | 71 | sysdev_resume(); |
72 | device_power_up(PMSG_RESUME); | 72 | device_resume_noirq(PMSG_RESUME); |
73 | 73 | ||
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
@@ -101,9 +101,9 @@ static void do_suspend(void) | |||
101 | printk(KERN_DEBUG "suspending xenstore...\n"); | 101 | printk(KERN_DEBUG "suspending xenstore...\n"); |
102 | xs_suspend(); | 102 | xs_suspend(); |
103 | 103 | ||
104 | err = device_power_down(PMSG_SUSPEND); | 104 | err = device_suspend_noirq(PMSG_SUSPEND); |
105 | if (err) { | 105 | if (err) { |
106 | printk(KERN_ERR "device_power_down failed: %d\n", err); | 106 | printk(KERN_ERR "device_suspend_noirq failed: %d\n", err); |
107 | goto resume_devices; | 107 | goto resume_devices; |
108 | } | 108 | } |
109 | 109 | ||
@@ -119,7 +119,7 @@ static void do_suspend(void) | |||
119 | } else | 119 | } else |
120 | xs_suspend_cancel(); | 120 | xs_suspend_cancel(); |
121 | 121 | ||
122 | device_power_up(PMSG_RESUME); | 122 | device_resume_noirq(PMSG_RESUME); |
123 | 123 | ||
124 | resume_devices: | 124 | resume_devices: |
125 | device_resume(PMSG_RESUME); | 125 | device_resume(PMSG_RESUME); |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 1d4e2d289821..2170252074f3 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -382,12 +382,12 @@ struct dev_pm_info { | |||
382 | #ifdef CONFIG_PM_SLEEP | 382 | #ifdef CONFIG_PM_SLEEP |
383 | extern void device_pm_lock(void); | 383 | extern void device_pm_lock(void); |
384 | extern int sysdev_resume(void); | 384 | extern int sysdev_resume(void); |
385 | extern void device_power_up(pm_message_t state); | 385 | extern void device_resume_noirq(pm_message_t state); |
386 | extern void device_resume(pm_message_t state); | 386 | extern void device_resume(pm_message_t state); |
387 | 387 | ||
388 | extern void device_pm_unlock(void); | 388 | extern void device_pm_unlock(void); |
389 | extern int sysdev_suspend(pm_message_t state); | 389 | extern int sysdev_suspend(pm_message_t state); |
390 | extern int device_power_down(pm_message_t state); | 390 | extern int device_suspend_noirq(pm_message_t state); |
391 | extern int device_suspend(pm_message_t state); | 391 | extern int device_suspend(pm_message_t state); |
392 | extern int device_prepare_suspend(pm_message_t state); | 392 | extern int device_prepare_suspend(pm_message_t state); |
393 | 393 | ||
diff --git a/kernel/kexec.c b/kernel/kexec.c index e4983770913b..5a3da87adae0 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -1452,13 +1452,13 @@ int kernel_kexec(void) | |||
1452 | if (error) | 1452 | if (error) |
1453 | goto Resume_console; | 1453 | goto Resume_console; |
1454 | /* At this point, device_suspend() has been called, | 1454 | /* At this point, device_suspend() has been called, |
1455 | * but *not* device_power_down(). We *must* | 1455 | * but *not* device_suspend_noirq(). We *must* call |
1456 | * device_power_down() now. Otherwise, drivers for | 1456 | * device_suspend_noirq() now. Otherwise, drivers for |
1457 | * some devices (e.g. interrupt controllers) become | 1457 | * some devices (e.g. interrupt controllers) become |
1458 | * desynchronized with the actual state of the | 1458 | * desynchronized with the actual state of the |
1459 | * hardware at resume time, and evil weirdness ensues. | 1459 | * hardware at resume time, and evil weirdness ensues. |
1460 | */ | 1460 | */ |
1461 | error = device_power_down(PMSG_FREEZE); | 1461 | error = device_suspend_noirq(PMSG_FREEZE); |
1462 | if (error) | 1462 | if (error) |
1463 | goto Resume_devices; | 1463 | goto Resume_devices; |
1464 | error = disable_nonboot_cpus(); | 1464 | error = disable_nonboot_cpus(); |
@@ -1486,7 +1486,7 @@ int kernel_kexec(void) | |||
1486 | local_irq_enable(); | 1486 | local_irq_enable(); |
1487 | Enable_cpus: | 1487 | Enable_cpus: |
1488 | enable_nonboot_cpus(); | 1488 | enable_nonboot_cpus(); |
1489 | device_power_up(PMSG_RESTORE); | 1489 | device_resume_noirq(PMSG_RESTORE); |
1490 | Resume_devices: | 1490 | Resume_devices: |
1491 | device_resume(PMSG_RESTORE); | 1491 | device_resume(PMSG_RESTORE); |
1492 | Resume_console: | 1492 | Resume_console: |
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 5cb080e7eebd..1c18bc894a2d 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -216,12 +216,12 @@ static int create_image(int platform_mode) | |||
216 | return error; | 216 | return error; |
217 | 217 | ||
218 | /* At this point, device_suspend() has been called, but *not* | 218 | /* At this point, device_suspend() has been called, but *not* |
219 | * device_power_down(). We *must* call device_power_down() now. | 219 | * device_suspend_noirq(). We *must* call device_suspend_noirq() now. |
220 | * Otherwise, drivers for some devices (e.g. interrupt controllers) | 220 | * Otherwise, drivers for some devices (e.g. interrupt controllers) |
221 | * become desynchronized with the actual state of the hardware | 221 | * become desynchronized with the actual state of the hardware |
222 | * at resume time, and evil weirdness ensues. | 222 | * at resume time, and evil weirdness ensues. |
223 | */ | 223 | */ |
224 | error = device_power_down(PMSG_FREEZE); | 224 | error = device_suspend_noirq(PMSG_FREEZE); |
225 | if (error) { | 225 | if (error) { |
226 | printk(KERN_ERR "PM: Some devices failed to power down, " | 226 | printk(KERN_ERR "PM: Some devices failed to power down, " |
227 | "aborting hibernation\n"); | 227 | "aborting hibernation\n"); |
@@ -262,7 +262,7 @@ static int create_image(int platform_mode) | |||
262 | 262 | ||
263 | Power_up: | 263 | Power_up: |
264 | sysdev_resume(); | 264 | sysdev_resume(); |
265 | /* NOTE: device_power_up() is just a resume() for devices | 265 | /* NOTE: device_resume_noirq() is just a resume() for devices |
266 | * that suspended with irqs off ... no overall powerup. | 266 | * that suspended with irqs off ... no overall powerup. |
267 | */ | 267 | */ |
268 | 268 | ||
@@ -275,7 +275,7 @@ static int create_image(int platform_mode) | |||
275 | Platform_finish: | 275 | Platform_finish: |
276 | platform_finish(platform_mode); | 276 | platform_finish(platform_mode); |
277 | 277 | ||
278 | device_power_up(in_suspend ? | 278 | device_resume_noirq(in_suspend ? |
279 | (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); | 279 | (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); |
280 | 280 | ||
281 | return error; | 281 | return error; |
@@ -339,7 +339,7 @@ static int resume_target_kernel(bool platform_mode) | |||
339 | { | 339 | { |
340 | int error; | 340 | int error; |
341 | 341 | ||
342 | error = device_power_down(PMSG_QUIESCE); | 342 | error = device_suspend_noirq(PMSG_QUIESCE); |
343 | if (error) { | 343 | if (error) { |
344 | printk(KERN_ERR "PM: Some devices failed to power down, " | 344 | printk(KERN_ERR "PM: Some devices failed to power down, " |
345 | "aborting resume\n"); | 345 | "aborting resume\n"); |
@@ -394,7 +394,7 @@ static int resume_target_kernel(bool platform_mode) | |||
394 | Cleanup: | 394 | Cleanup: |
395 | platform_restore_cleanup(platform_mode); | 395 | platform_restore_cleanup(platform_mode); |
396 | 396 | ||
397 | device_power_up(PMSG_RECOVER); | 397 | device_resume_noirq(PMSG_RECOVER); |
398 | 398 | ||
399 | return error; | 399 | return error; |
400 | } | 400 | } |
@@ -454,7 +454,7 @@ int hibernation_platform_enter(void) | |||
454 | goto Resume_devices; | 454 | goto Resume_devices; |
455 | } | 455 | } |
456 | 456 | ||
457 | error = device_power_down(PMSG_HIBERNATE); | 457 | error = device_suspend_noirq(PMSG_HIBERNATE); |
458 | if (error) | 458 | if (error) |
459 | goto Resume_devices; | 459 | goto Resume_devices; |
460 | 460 | ||
@@ -479,7 +479,7 @@ int hibernation_platform_enter(void) | |||
479 | Platofrm_finish: | 479 | Platofrm_finish: |
480 | hibernation_ops->finish(); | 480 | hibernation_ops->finish(); |
481 | 481 | ||
482 | device_power_up(PMSG_RESTORE); | 482 | device_suspend_noirq(PMSG_RESTORE); |
483 | 483 | ||
484 | Resume_devices: | 484 | Resume_devices: |
485 | entering_platform_hibernation = false; | 485 | entering_platform_hibernation = false; |
diff --git a/kernel/power/main.c b/kernel/power/main.c index 868028280d13..2f6638ee03c0 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -295,7 +295,7 @@ static int suspend_enter(suspend_state_t state) | |||
295 | return error; | 295 | return error; |
296 | } | 296 | } |
297 | 297 | ||
298 | error = device_power_down(PMSG_SUSPEND); | 298 | error = device_suspend_noirq(PMSG_SUSPEND); |
299 | if (error) { | 299 | if (error) { |
300 | printk(KERN_ERR "PM: Some devices failed to power down\n"); | 300 | printk(KERN_ERR "PM: Some devices failed to power down\n"); |
301 | goto Platfrom_finish; | 301 | goto Platfrom_finish; |
@@ -335,7 +335,7 @@ static int suspend_enter(suspend_state_t state) | |||
335 | suspend_ops->wake(); | 335 | suspend_ops->wake(); |
336 | 336 | ||
337 | Power_up_devices: | 337 | Power_up_devices: |
338 | device_power_up(PMSG_RESUME); | 338 | device_resume_noirq(PMSG_RESUME); |
339 | 339 | ||
340 | Platfrom_finish: | 340 | Platfrom_finish: |
341 | if (suspend_ops->finish) | 341 | if (suspend_ops->finish) |