Commit 2b014666 authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

PM / Sleep: Remove ftrace_stop/start() from suspend and hibernate

ftrace_stop() and ftrace_start() were added to the suspend and hibernate
process because there was some function within the work flow that caused
the system to reboot if it was traced. This function has recently been
found (restore_processor_state()). Now there's no reason to disable
function tracing while we are going into suspend or hibernate, which means
that being able to trace this will help tremendously in debugging any
issues with suspend or hibernate.

This also means that the ftrace_stop/start() functions can be removed
and simplify the function tracing code a bit.

Link: http://lkml.kernel.org/r/1518201.VD9cU33jRU@vostro.rjw.lanAcked-by: default avatar"Rafael J. Wysocki" <rjw@rjwysocki.net>
Reviewed-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent b8f99b3e
...@@ -371,7 +371,6 @@ int hibernation_snapshot(int platform_mode) ...@@ -371,7 +371,6 @@ int hibernation_snapshot(int platform_mode)
} }
suspend_console(); suspend_console();
ftrace_stop();
pm_restrict_gfp_mask(); pm_restrict_gfp_mask();
error = dpm_suspend(PMSG_FREEZE); error = dpm_suspend(PMSG_FREEZE);
...@@ -397,7 +396,6 @@ int hibernation_snapshot(int platform_mode) ...@@ -397,7 +396,6 @@ int hibernation_snapshot(int platform_mode)
if (error || !in_suspend) if (error || !in_suspend)
pm_restore_gfp_mask(); pm_restore_gfp_mask();
ftrace_start();
resume_console(); resume_console();
dpm_complete(msg); dpm_complete(msg);
...@@ -500,7 +498,6 @@ int hibernation_restore(int platform_mode) ...@@ -500,7 +498,6 @@ int hibernation_restore(int platform_mode)
pm_prepare_console(); pm_prepare_console();
suspend_console(); suspend_console();
ftrace_stop();
pm_restrict_gfp_mask(); pm_restrict_gfp_mask();
error = dpm_suspend_start(PMSG_QUIESCE); error = dpm_suspend_start(PMSG_QUIESCE);
if (!error) { if (!error) {
...@@ -508,7 +505,6 @@ int hibernation_restore(int platform_mode) ...@@ -508,7 +505,6 @@ int hibernation_restore(int platform_mode)
dpm_resume_end(PMSG_RECOVER); dpm_resume_end(PMSG_RECOVER);
} }
pm_restore_gfp_mask(); pm_restore_gfp_mask();
ftrace_start();
resume_console(); resume_console();
pm_restore_console(); pm_restore_console();
return error; return error;
...@@ -535,7 +531,6 @@ int hibernation_platform_enter(void) ...@@ -535,7 +531,6 @@ int hibernation_platform_enter(void)
entering_platform_hibernation = true; entering_platform_hibernation = true;
suspend_console(); suspend_console();
ftrace_stop();
error = dpm_suspend_start(PMSG_HIBERNATE); error = dpm_suspend_start(PMSG_HIBERNATE);
if (error) { if (error) {
if (hibernation_ops->recover) if (hibernation_ops->recover)
...@@ -579,7 +574,6 @@ int hibernation_platform_enter(void) ...@@ -579,7 +574,6 @@ int hibernation_platform_enter(void)
Resume_devices: Resume_devices:
entering_platform_hibernation = false; entering_platform_hibernation = false;
dpm_resume_end(PMSG_RESTORE); dpm_resume_end(PMSG_RESTORE);
ftrace_start();
resume_console(); resume_console();
Close: Close:
......
...@@ -248,7 +248,6 @@ static int suspend_enter(suspend_state_t state, bool *wakeup) ...@@ -248,7 +248,6 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
goto Platform_wake; goto Platform_wake;
} }
ftrace_stop();
error = disable_nonboot_cpus(); error = disable_nonboot_cpus();
if (error || suspend_test(TEST_CPUS)) if (error || suspend_test(TEST_CPUS))
goto Enable_cpus; goto Enable_cpus;
...@@ -275,7 +274,6 @@ static int suspend_enter(suspend_state_t state, bool *wakeup) ...@@ -275,7 +274,6 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
Enable_cpus: Enable_cpus:
enable_nonboot_cpus(); enable_nonboot_cpus();
ftrace_start();
Platform_wake: Platform_wake:
if (need_suspend_ops(state) && suspend_ops->wake) if (need_suspend_ops(state) && suspend_ops->wake)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment