summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-10-25 16:23:31 +0200
committerRalf Baechle <ralf@linux-mips.org>2012-12-13 17:00:39 +0100
commitabe77f90dc9c65a7c9a4d61c2cbb8db4d5566e4f (patch)
tree69fd0cfe31a9041e8e1a881829c011892075ea2c /arch/mips/kernel
parent7aa1c8f47e7e792d11f898cbdddaf6fa21ff08cc (diff)
MIPS: Octeon: Add kexec and kdump support
[ralf@linux-mips.org: Original patch by Maxim Uvarov <muvarov@gmail.com> with plenty of further shining, polishing, debugging and testing by me.] Signed-off-by: Maxim Uvarov <muvarov@gmail.com> 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 <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/crash_dump.c2
-rw-r--r--arch/mips/kernel/relocate_kernel.S19
2 files changed, 19 insertions, 2 deletions
diff --git a/arch/mips/kernel/crash_dump.c b/arch/mips/kernel/crash_dump.c
index d9ec3898f9f..35bed0d2342 100644
--- a/arch/mips/kernel/crash_dump.c
+++ b/arch/mips/kernel/crash_dump.c
@@ -3,8 +3,6 @@
#include <linux/crash_dump.h>
#include <asm/uaccess.h>
-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 0b108587f06..e4142c5f7c2 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