aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-03-18 06:07:16 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-03-18 06:07:16 -0400
commit7e6b6f2b949a52382f59a93ecbe86e32e4fcec7c (patch)
tree646efa98aa16b4d829eb61ea067124ffe42d0d94 /arch/sh/kernel
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/kernel')
-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 69268c0d8063..cc7c29b0dc8d 100644
--- a/arch/sh/kernel/machine_kexec.c
+++ b/arch/sh/kernel/machine_kexec.c
@@ -14,6 +14,7 @@
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/reboot.h> 15#include <linux/reboot.h>
16#include <linux/numa.h> 16#include <linux/numa.h>
17#include <linux/ftrace.h>
17#include <linux/suspend.h> 18#include <linux/suspend.h>
18#include <asm/pgtable.h> 19#include <asm/pgtable.h>
19#include <asm/pgalloc.h> 20#include <asm/pgalloc.h>
@@ -78,6 +79,7 @@ void machine_kexec(struct kimage *image)
78 relocate_new_kernel_t rnk; 79 relocate_new_kernel_t rnk;
79 unsigned long entry; 80 unsigned long entry;
80 unsigned long *ptr; 81 unsigned long *ptr;
82 int save_ftrace_enabled;
81 83
82 /* 84 /*
83 * Nicked from the mips version of machine_kexec(): 85 * Nicked from the mips version of machine_kexec():
@@ -97,6 +99,8 @@ void machine_kexec(struct kimage *image)
97 save_processor_state(); 99 save_processor_state();
98#endif 100#endif
99 101
102 save_ftrace_enabled = __ftrace_enabled_save();
103
100 /* Interrupts aren't acceptable while we reboot */ 104 /* Interrupts aren't acceptable while we reboot */
101 local_irq_disable(); 105 local_irq_disable();
102 106
@@ -138,6 +142,8 @@ void machine_kexec(struct kimage *image)
138 *ptr = virt_to_phys(*ptr); 142 *ptr = virt_to_phys(*ptr);
139 } 143 }
140#endif 144#endif
145
146 __ftrace_enabled_restore(save_ftrace_enabled);
141} 147}
142 148
143void arch_crash_save_vmcoreinfo(void) 149void arch_crash_save_vmcoreinfo(void)