From abe77f90dc9c65a7c9a4d61c2cbb8db4d5566e4f Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 25 Oct 2012 16:23:31 +0200 Subject: MIPS: Octeon: Add kexec and kdump support [ralf@linux-mips.org: Original patch by Maxim Uvarov with plenty of further shining, polishing, debugging and testing by me.] Signed-off-by: Maxim Uvarov Cc: linux-mips@linux-mips.org Cc: kexec@lists.infradead.org Cc: horms@verge.net.au Patchwork: https://patchwork.linux-mips.org/patch/1026/ Signed-off-by: Ralf Baechle --- arch/mips/kernel/crash_dump.c | 2 -- arch/mips/kernel/relocate_kernel.S | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'arch/mips/kernel') diff --git a/arch/mips/kernel/crash_dump.c b/arch/mips/kernel/crash_dump.c index d9ec3898f9fa..35bed0d2342c 100644 --- a/arch/mips/kernel/crash_dump.c +++ b/arch/mips/kernel/crash_dump.c @@ -3,8 +3,6 @@ #include #include -unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; - static int __init parse_savemaxmem(char *p) { if (p) diff --git a/arch/mips/kernel/relocate_kernel.S b/arch/mips/kernel/relocate_kernel.S index 0b108587f065..e4142c5f7c2b 100644 --- a/arch/mips/kernel/relocate_kernel.S +++ b/arch/mips/kernel/relocate_kernel.S @@ -78,7 +78,19 @@ done: LONG_S zero,(t0) #endif +#ifdef CONFIG_CPU_CAVIUM_OCTEON + /* We need to flush I-cache before jumping to new kernel. + * Unfortunatelly, this code is cpu-specific. + */ + .set push + .set noreorder + syncw + syncw + synci 0($0) + .set pop +#else sync +#endif /* jump to kexec_start_address */ j s1 END(relocate_new_kernel) @@ -110,7 +122,14 @@ LEAF(kexec_smp_wait) 1: LONG_L s0, (t0) bne s0, zero,1b +#ifdef CONFIG_CPU_CAVIUM_OCTEON + .set push + .set noreorder + synci 0($0) + .set pop +#else sync +#endif j s1 END(kexec_smp_wait) #endif -- cgit v1.2.3-55-g7522