diff options
author | Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> | 2012-06-16 09:30:45 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-01 07:31:22 -0400 |
commit | 443772d408a25af62498793f6f805ce3c559309a (patch) | |
tree | f89e50547524bbb275d38b8a39b1e4d82a18c22d /kernel/power/hibernate.c | |
parent | 62c552ccc3eda1198632a4f344aa32623d226bab (diff) |
ftrace: Disable function tracing during suspend/resume and hibernation, again
If function tracing is enabled for some of the low-level suspend/resume
functions, it leads to triple fault during resume from suspend, ultimately
ending up in a reboot instead of a resume (or a total refusal to come out
of suspended state, on some machines).
This issue was explained in more detail in commit f42ac38c59e0a03d (ftrace:
disable tracing for suspend to ram). However, the changes made by that commit
got reverted by commit cbe2f5a6e84eebb (tracing: allow tracing of
suspend/resume & hibernation code again). So, unfortunately since things are
not yet robust enough to allow tracing of low-level suspend/resume functions,
suspend/resume is still broken when ftrace is enabled.
So fix this by disabling function tracing during suspend/resume & hibernation.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power/hibernate.c')
-rw-r--r-- | kernel/power/hibernate.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 21ad3fe3164f..0d4b354bc1be 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c | |||
@@ -358,6 +358,7 @@ int hibernation_snapshot(int platform_mode) | |||
358 | } | 358 | } |
359 | 359 | ||
360 | suspend_console(); | 360 | suspend_console(); |
361 | ftrace_stop(); | ||
361 | pm_restrict_gfp_mask(); | 362 | pm_restrict_gfp_mask(); |
362 | 363 | ||
363 | error = dpm_suspend(PMSG_FREEZE); | 364 | error = dpm_suspend(PMSG_FREEZE); |
@@ -383,6 +384,7 @@ int hibernation_snapshot(int platform_mode) | |||
383 | if (error || !in_suspend) | 384 | if (error || !in_suspend) |
384 | pm_restore_gfp_mask(); | 385 | pm_restore_gfp_mask(); |
385 | 386 | ||
387 | ftrace_start(); | ||
386 | resume_console(); | 388 | resume_console(); |
387 | dpm_complete(msg); | 389 | dpm_complete(msg); |
388 | 390 | ||
@@ -485,6 +487,7 @@ int hibernation_restore(int platform_mode) | |||
485 | 487 | ||
486 | pm_prepare_console(); | 488 | pm_prepare_console(); |
487 | suspend_console(); | 489 | suspend_console(); |
490 | ftrace_stop(); | ||
488 | pm_restrict_gfp_mask(); | 491 | pm_restrict_gfp_mask(); |
489 | error = dpm_suspend_start(PMSG_QUIESCE); | 492 | error = dpm_suspend_start(PMSG_QUIESCE); |
490 | if (!error) { | 493 | if (!error) { |
@@ -492,6 +495,7 @@ int hibernation_restore(int platform_mode) | |||
492 | dpm_resume_end(PMSG_RECOVER); | 495 | dpm_resume_end(PMSG_RECOVER); |
493 | } | 496 | } |
494 | pm_restore_gfp_mask(); | 497 | pm_restore_gfp_mask(); |
498 | ftrace_start(); | ||
495 | resume_console(); | 499 | resume_console(); |
496 | pm_restore_console(); | 500 | pm_restore_console(); |
497 | return error; | 501 | return error; |
@@ -518,6 +522,7 @@ int hibernation_platform_enter(void) | |||
518 | 522 | ||
519 | entering_platform_hibernation = true; | 523 | entering_platform_hibernation = true; |
520 | suspend_console(); | 524 | suspend_console(); |
525 | ftrace_stop(); | ||
521 | error = dpm_suspend_start(PMSG_HIBERNATE); | 526 | error = dpm_suspend_start(PMSG_HIBERNATE); |
522 | if (error) { | 527 | if (error) { |
523 | if (hibernation_ops->recover) | 528 | if (hibernation_ops->recover) |
@@ -561,6 +566,7 @@ int hibernation_platform_enter(void) | |||
561 | Resume_devices: | 566 | Resume_devices: |
562 | entering_platform_hibernation = false; | 567 | entering_platform_hibernation = false; |
563 | dpm_resume_end(PMSG_RESTORE); | 568 | dpm_resume_end(PMSG_RESTORE); |
569 | ftrace_start(); | ||
564 | resume_console(); | 570 | resume_console(); |
565 | 571 | ||
566 | Close: | 572 | Close: |