aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-10-25 10:23:31 -0400
committerRalf Baechle <ralf@linux-mips.org>2012-12-13 11:00:39 -0500
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 d9ec3898f9fa..35bed0d2342c 100644
--- a/arch/mips/kernel/crash_dump.c
+++ b/arch/mips/kernel/crash_dump.c
@@ -3,8 +3,6 @@
3#include <linux/crash_dump.h> 3#include <linux/crash_dump.h>
4#include <asm/uaccess.h> 4#include <asm/uaccess.h>
5 5
6unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
7
8static int __init parse_savemaxmem(char *p) 6static int __init parse_savemaxmem(char *p)
9{ 7{
10 if (p) 8 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:
78 LONG_S zero,(t0) 78 LONG_S zero,(t0)
79#endif 79#endif
80 80
81#ifdef CONFIG_CPU_CAVIUM_OCTEON
82 /* We need to flush I-cache before jumping to new kernel.
83 * Unfortunatelly, this code is cpu-specific.
84 */
85 .set push
86 .set noreorder
87 syncw
88 syncw
89 synci 0($0)
90 .set pop
91#else
81 sync 92 sync
93#endif
82 /* jump to kexec_start_address */ 94 /* jump to kexec_start_address */
83 j s1 95 j s1
84 END(relocate_new_kernel) 96 END(relocate_new_kernel)
@@ -110,7 +122,14 @@ LEAF(kexec_smp_wait)
1101: LONG_L s0, (t0) 1221: LONG_L s0, (t0)
111 bne s0, zero,1b 123 bne s0, zero,1b
112 124
125#ifdef CONFIG_CPU_CAVIUM_OCTEON
126 .set push
127 .set noreorder
128 synci 0($0)
129 .set pop
130#else
113 sync 131 sync
132#endif
114 j s1 133 j s1
115 END(kexec_smp_wait) 134 END(kexec_smp_wait)
116#endif 135#endif