Skip to content

Commit

Permalink
sh: kexec jump: fix for ftrace.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Mar 18, 2009
1 parent a6bab7b commit 7e6b6f2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/sh/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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():
Expand All @@ -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();

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7e6b6f2

Please sign in to comment.