summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/traps.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2020-05-08 06:34:06 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2020-05-18 16:10:35 +0200
commitbbbc8032b00f8ef287894425fbdb691049e28d39 (patch)
treea241324825ad1719fa4a0d3caa6d1365f7898b44 /arch/powerpc/kernel/traps.c
parentpowerpc/64s: machine check do not trace real-mode handler (diff)
downloadlinux-bbbc8032b00f8ef287894425fbdb691049e28d39.tar.xz
linux-bbbc8032b00f8ef287894425fbdb691049e28d39.zip
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: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr> Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Link: https://lore.kernel.org/r/20200508043408.886394-15-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r--arch/powerpc/kernel/traps.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 9f6852322e59..ee209c5a1ad7 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -443,6 +443,9 @@ void system_reset_exception(struct pt_regs *regs)
unsigned long hsrr0, hsrr1;
bool nested = in_nmi();
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
@@ -524,6 +527,8 @@ out:
if (!nested)
nmi_exit();
+ this_cpu_set_ftrace_enabled(ftrace_enabled);
+
/* What should we do here? We could issue a shutdown or hard reset. */
}