aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2011-01-06 13:00:36 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-01-20 22:08:36 -0500
commitac4414e4d3024a3c9ac5f54a734ac77dd7edfdb3 (patch)
tree20bb68df2f97e912e266e5b930a99b0f28a4ab0f /arch/powerpc
parent158d5b5e3654938cca963eec82cd10af49cda17f (diff)
powerpc/kdump: Disable ftrace during kexec
We should disable ftrace during kexec, some of the tracers are very invasive and we do not want them going off while doing the low level work of swapping one kernel out for another. This mirrors what we do on x86. Even though we cannot return from a kexec on powerpc (since we do not implement CONFIG_KEXEC_JUMP), add the restore code in case we do one day. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/machine_kexec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index 3427b2faa19a..49a170af8145 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -15,6 +15,7 @@
15#include <linux/memblock.h> 15#include <linux/memblock.h>
16#include <linux/of.h> 16#include <linux/of.h>
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/ftrace.h>
18 19
19#include <asm/machdep.h> 20#include <asm/machdep.h>
20#include <asm/prom.h> 21#include <asm/prom.h>
@@ -82,8 +83,14 @@ void arch_crash_save_vmcoreinfo(void)
82 */ 83 */
83void machine_kexec(struct kimage *image) 84void machine_kexec(struct kimage *image)
84{ 85{
86 int save_ftrace_enabled;
87
88 save_ftrace_enabled = __ftrace_enabled_save();
89
85 default_machine_kexec(image); 90 default_machine_kexec(image);
86 91
92 __ftrace_enabled_restore(save_ftrace_enabled);
93
87 /* Fall back to normal restart if we're still alive. */ 94 /* Fall back to normal restart if we're still alive. */
88 machine_restart(NULL); 95 machine_restart(NULL);
89 for(;;); 96 for(;;);