diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-09-14 11:26:53 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-14 11:26:53 -0400 |
| commit | f81b691a3df09806385ea413c3a2ee094c705ca3 (patch) | |
| tree | 01c0d6d319fcbddc98171d06cfe8e742cd270455 /kernel/power | |
| parent | 110e0358e7dfd9cc56d47077068f3680dae10b56 (diff) | |
| parent | adee14b2e1557d0a8559f29681732d05a89dfc35 (diff) | |
Merge commit 'v2.6.27-rc6' into x86/pat
Diffstat (limited to 'kernel/power')
| -rw-r--r-- | kernel/power/disk.c | 13 | ||||
| -rw-r--r-- | kernel/power/main.c | 5 | ||||
| -rw-r--r-- | kernel/power/swap.c | 1 |
3 files changed, 14 insertions, 5 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index f011e0870b52..bbd85c60f741 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/console.h> | 21 | #include <linux/console.h> |
| 22 | #include <linux/cpu.h> | 22 | #include <linux/cpu.h> |
| 23 | #include <linux/freezer.h> | 23 | #include <linux/freezer.h> |
| 24 | #include <linux/ftrace.h> | ||
| 24 | 25 | ||
| 25 | #include "power.h" | 26 | #include "power.h" |
| 26 | 27 | ||
| @@ -255,7 +256,7 @@ static int create_image(int platform_mode) | |||
| 255 | 256 | ||
| 256 | int hibernation_snapshot(int platform_mode) | 257 | int hibernation_snapshot(int platform_mode) |
| 257 | { | 258 | { |
| 258 | int error; | 259 | int error, ftrace_save; |
| 259 | 260 | ||
| 260 | /* Free memory before shutting down devices. */ | 261 | /* Free memory before shutting down devices. */ |
| 261 | error = swsusp_shrink_memory(); | 262 | error = swsusp_shrink_memory(); |
| @@ -267,6 +268,7 @@ int hibernation_snapshot(int platform_mode) | |||
| 267 | goto Close; | 268 | goto Close; |
| 268 | 269 | ||
| 269 | suspend_console(); | 270 | suspend_console(); |
| 271 | ftrace_save = __ftrace_enabled_save(); | ||
| 270 | error = device_suspend(PMSG_FREEZE); | 272 | error = device_suspend(PMSG_FREEZE); |
| 271 | if (error) | 273 | if (error) |
| 272 | goto Recover_platform; | 274 | goto Recover_platform; |
| @@ -296,6 +298,7 @@ int hibernation_snapshot(int platform_mode) | |||
| 296 | Resume_devices: | 298 | Resume_devices: |
| 297 | device_resume(in_suspend ? | 299 | device_resume(in_suspend ? |
| 298 | (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); | 300 | (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); |
| 301 | __ftrace_enabled_restore(ftrace_save); | ||
| 299 | resume_console(); | 302 | resume_console(); |
| 300 | Close: | 303 | Close: |
| 301 | platform_end(platform_mode); | 304 | platform_end(platform_mode); |
| @@ -366,10 +369,11 @@ static int resume_target_kernel(void) | |||
| 366 | 369 | ||
| 367 | int hibernation_restore(int platform_mode) | 370 | int hibernation_restore(int platform_mode) |
| 368 | { | 371 | { |
| 369 | int error; | 372 | int error, ftrace_save; |
| 370 | 373 | ||
| 371 | pm_prepare_console(); | 374 | pm_prepare_console(); |
| 372 | suspend_console(); | 375 | suspend_console(); |
| 376 | ftrace_save = __ftrace_enabled_save(); | ||
| 373 | error = device_suspend(PMSG_QUIESCE); | 377 | error = device_suspend(PMSG_QUIESCE); |
| 374 | if (error) | 378 | if (error) |
| 375 | goto Finish; | 379 | goto Finish; |
| @@ -384,6 +388,7 @@ int hibernation_restore(int platform_mode) | |||
| 384 | platform_restore_cleanup(platform_mode); | 388 | platform_restore_cleanup(platform_mode); |
| 385 | device_resume(PMSG_RECOVER); | 389 | device_resume(PMSG_RECOVER); |
| 386 | Finish: | 390 | Finish: |
| 391 | __ftrace_enabled_restore(ftrace_save); | ||
| 387 | resume_console(); | 392 | resume_console(); |
| 388 | pm_restore_console(); | 393 | pm_restore_console(); |
| 389 | return error; | 394 | return error; |
| @@ -396,7 +401,7 @@ int hibernation_restore(int platform_mode) | |||
| 396 | 401 | ||
| 397 | int hibernation_platform_enter(void) | 402 | int hibernation_platform_enter(void) |
| 398 | { | 403 | { |
| 399 | int error; | 404 | int error, ftrace_save; |
| 400 | 405 | ||
| 401 | if (!hibernation_ops) | 406 | if (!hibernation_ops) |
| 402 | return -ENOSYS; | 407 | return -ENOSYS; |
| @@ -411,6 +416,7 @@ int hibernation_platform_enter(void) | |||
| 411 | goto Close; | 416 | goto Close; |
| 412 | 417 | ||
| 413 | suspend_console(); | 418 | suspend_console(); |
| 419 | ftrace_save = __ftrace_enabled_save(); | ||
| 414 | error = device_suspend(PMSG_HIBERNATE); | 420 | error = device_suspend(PMSG_HIBERNATE); |
| 415 | if (error) { | 421 | if (error) { |
| 416 | if (hibernation_ops->recover) | 422 | if (hibernation_ops->recover) |
| @@ -445,6 +451,7 @@ int hibernation_platform_enter(void) | |||
| 445 | hibernation_ops->finish(); | 451 | hibernation_ops->finish(); |
| 446 | Resume_devices: | 452 | Resume_devices: |
| 447 | device_resume(PMSG_RESTORE); | 453 | device_resume(PMSG_RESTORE); |
| 454 | __ftrace_enabled_restore(ftrace_save); | ||
| 448 | resume_console(); | 455 | resume_console(); |
| 449 | Close: | 456 | Close: |
| 450 | hibernation_ops->end(); | 457 | hibernation_ops->end(); |
diff --git a/kernel/power/main.c b/kernel/power/main.c index 0b7476f5d2a6..540b16b68565 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/freezer.h> | 21 | #include <linux/freezer.h> |
| 22 | #include <linux/vmstat.h> | 22 | #include <linux/vmstat.h> |
| 23 | #include <linux/syscalls.h> | 23 | #include <linux/syscalls.h> |
| 24 | #include <linux/ftrace.h> | ||
| 24 | 25 | ||
| 25 | #include "power.h" | 26 | #include "power.h" |
| 26 | 27 | ||
| @@ -310,7 +311,7 @@ static int suspend_enter(suspend_state_t state) | |||
| 310 | */ | 311 | */ |
| 311 | int suspend_devices_and_enter(suspend_state_t state) | 312 | int suspend_devices_and_enter(suspend_state_t state) |
| 312 | { | 313 | { |
| 313 | int error; | 314 | int error, ftrace_save; |
| 314 | 315 | ||
| 315 | if (!suspend_ops) | 316 | if (!suspend_ops) |
| 316 | return -ENOSYS; | 317 | return -ENOSYS; |
| @@ -321,6 +322,7 @@ int suspend_devices_and_enter(suspend_state_t state) | |||
| 321 | goto Close; | 322 | goto Close; |
| 322 | } | 323 | } |
| 323 | suspend_console(); | 324 | suspend_console(); |
| 325 | ftrace_save = __ftrace_enabled_save(); | ||
| 324 | suspend_test_start(); | 326 | suspend_test_start(); |
| 325 | error = device_suspend(PMSG_SUSPEND); | 327 | error = device_suspend(PMSG_SUSPEND); |
| 326 | if (error) { | 328 | if (error) { |
| @@ -352,6 +354,7 @@ int suspend_devices_and_enter(suspend_state_t state) | |||
| 352 | suspend_test_start(); | 354 | suspend_test_start(); |
| 353 | device_resume(PMSG_RESUME); | 355 | device_resume(PMSG_RESUME); |
| 354 | suspend_test_finish("resume devices"); | 356 | suspend_test_finish("resume devices"); |
| 357 | __ftrace_enabled_restore(ftrace_save); | ||
| 355 | resume_console(); | 358 | resume_console(); |
| 356 | Close: | 359 | Close: |
| 357 | if (suspend_ops->end) | 360 | if (suspend_ops->end) |
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index a0abf9a463f9..80ccac849e46 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/file.h> | 15 | #include <linux/file.h> |
| 16 | #include <linux/utsname.h> | 16 | #include <linux/utsname.h> |
| 17 | #include <linux/version.h> | ||
| 18 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
| 19 | #include <linux/bitops.h> | 18 | #include <linux/bitops.h> |
| 20 | #include <linux/genhd.h> | 19 | #include <linux/genhd.h> |
