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>
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/reboot.h>
|
#include <linux/reboot.h>
|
||||||
#include <linux/numa.h>
|
#include <linux/numa.h>
|
||||||
|
#include <linux/ftrace.h>
|
||||||
#include <linux/suspend.h>
|
#include <linux/suspend.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
#include <asm/pgalloc.h>
|
#include <asm/pgalloc.h>
|
||||||
@@ -78,6 +79,7 @@ void machine_kexec(struct kimage *image)
|
|||||||
relocate_new_kernel_t rnk;
|
relocate_new_kernel_t rnk;
|
||||||
unsigned long entry;
|
unsigned long entry;
|
||||||
unsigned long *ptr;
|
unsigned long *ptr;
|
||||||
|
int save_ftrace_enabled;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Nicked from the mips version of machine_kexec():
|
* Nicked from the mips version of machine_kexec():
|
||||||
@@ -97,6 +99,8 @@ void machine_kexec(struct kimage *image)
|
|||||||
save_processor_state();
|
save_processor_state();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
save_ftrace_enabled = __ftrace_enabled_save();
|
||||||
|
|
||||||
/* Interrupts aren't acceptable while we reboot */
|
/* Interrupts aren't acceptable while we reboot */
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
|
|
||||||
@@ -138,6 +142,8 @@ void machine_kexec(struct kimage *image)
|
|||||||
*ptr = virt_to_phys(*ptr);
|
*ptr = virt_to_phys(*ptr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
__ftrace_enabled_restore(save_ftrace_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void arch_crash_save_vmcoreinfo(void)
|
void arch_crash_save_vmcoreinfo(void)
|
||||||
|
Reference in New Issue
Block a user