aboutsummaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-03-18 19:07:16 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-03-18 19:07:16 +0900
commit7e6b6f2b949a52382f59a93ecbe86e32e4fcec7c (patch)
tree646efa98aa16b4d829eb61ea067124ffe42d0d94 /arch/sh
parenta6bab7b5c18501e4dd3201ae8ac1dc6da5f07acc (diff)
sh: kexec jump: fix for ftrace.
Save and restore ftrace state when returning from kexec jump in machine_kexec(). Follows the x86 change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/machine_kexec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c
index 69268c0d806..cc7c29b0dc8 100644
--- a/arch/sh/kernel/machine_kexec.c
+++ b/arch/sh/kernel/machine_kexec.c
@@ -14,6 +14,7 @@
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/numa.h>
+#include <linux/ftrace.h>
#include <linux/suspend.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
@@ -78,6 +79,7 @@ void machine_kexec(struct kimage *image)
relocate_new_kernel_t rnk;
unsigned long entry;
unsigned long *ptr;
+ int save_ftrace_enabled;
/*
* Nicked from the mips version of machine_kexec():
@@ -97,6 +99,8 @@ void machine_kexec(struct kimage *image)
save_processor_state();
#endif
+ save_ftrace_enabled = __ftrace_enabled_save();
+
/* Interrupts aren't acceptable while we reboot */
local_irq_disable();
@@ -138,6 +142,8 @@ void machine_kexec(struct kimage *image)
*ptr = virt_to_phys(*ptr);
}
#endif
+
+ __ftrace_enabled_restore(save_ftrace_enabled);
}
void arch_crash_save_vmcoreinfo(void)