Commit bbbc8032 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/traps: Do not trace system reset

Similarly to the previous patch, do not trace system reset. This code
is used when there is a crash or hang, and tracing disturbs the system
more and has been known to crash in the crash handling path.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Reviewed-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Acked-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/20200508043408.886394-15-npiggin@gmail.com
parent abd106fb
...@@ -443,6 +443,9 @@ void system_reset_exception(struct pt_regs *regs) ...@@ -443,6 +443,9 @@ void system_reset_exception(struct pt_regs *regs)
unsigned long hsrr0, hsrr1; unsigned long hsrr0, hsrr1;
bool nested = in_nmi(); bool nested = in_nmi();
bool saved_hsrrs = false; bool saved_hsrrs = false;
u8 ftrace_enabled = this_cpu_get_ftrace_enabled();
this_cpu_set_ftrace_enabled(0);
/* /*
* Avoid crashes in case of nested NMI exceptions. Recoverability * Avoid crashes in case of nested NMI exceptions. Recoverability
...@@ -524,6 +527,8 @@ void system_reset_exception(struct pt_regs *regs) ...@@ -524,6 +527,8 @@ void system_reset_exception(struct pt_regs *regs)
if (!nested) if (!nested)
nmi_exit(); nmi_exit();
this_cpu_set_ftrace_enabled(ftrace_enabled);
/* What should we do here? We could issue a shutdown or hard reset. */ /* What should we do here? We could issue a shutdown or hard reset. */
} }
......
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