summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/relocate_kernel.S
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-10-25 18:23:31 +0400
committerRalf Baechle <ralf@linux-mips.org>2012-12-13 20:00:39 +0400
commitabe77f90dc9c65a7c9a4d61c2cbb8db4d5566e4f (patch)
tree69fd0cfe31a9041e8e1a881829c011892075ea2c /arch/mips/kernel/relocate_kernel.S
parent7aa1c8f47e7e792d11f898cbdddaf6fa21ff08cc (diff)
downloadlinux-abe77f90dc9c65a7c9a4d61c2cbb8db4d5566e4f.tar.xz
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/relocate_kernel.S')
-rw-r--r--arch/mips/kernel/relocate_kernel.S19
1 files changed, 19 insertions, 0 deletions
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