aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2012-05-15 03:04:48 -0400
committerRalf Baechle <ralf@linux-mips.org>2012-05-16 17:34:33 -0400
commit586016ebf76d62e58a0e9dfd971e465c8027889d (patch)
treea83319dd56a2d445db20be61a6df0c01fc3cb1bc /arch/mips
parente3dc81f2306e650f01e38ec87e24c3fecb843dc3 (diff)
MIPS: Octeon: Use board_cache_error_setup for cache error handler setup.
Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3820/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/mm/c-octeon.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c
index 47037ec5589b..44e69e7a4519 100644
--- a/arch/mips/mm/c-octeon.c
+++ b/arch/mips/mm/c-octeon.c
@@ -21,6 +21,7 @@
21#include <asm/page.h> 21#include <asm/page.h>
22#include <asm/pgtable.h> 22#include <asm/pgtable.h>
23#include <asm/r4kcache.h> 23#include <asm/r4kcache.h>
24#include <asm/traps.h>
24#include <asm/mmu_context.h> 25#include <asm/mmu_context.h>
25#include <asm/war.h> 26#include <asm/war.h>
26 27
@@ -248,6 +249,11 @@ static void __cpuinit probe_octeon(void)
248 } 249 }
249} 250}
250 251
252static void __cpuinit octeon_cache_error_setup(void)
253{
254 extern char except_vec2_octeon;
255 set_handler(0x100, &except_vec2_octeon, 0x80);
256}
251 257
252/** 258/**
253 * Setup the Octeon cache flush routines 259 * Setup the Octeon cache flush routines
@@ -255,12 +261,6 @@ static void __cpuinit probe_octeon(void)
255 */ 261 */
256void __cpuinit octeon_cache_init(void) 262void __cpuinit octeon_cache_init(void)
257{ 263{
258 extern unsigned long ebase;
259 extern char except_vec2_octeon;
260
261 memcpy((void *)(ebase + 0x100), &except_vec2_octeon, 0x80);
262 octeon_flush_cache_sigtramp(ebase + 0x100);
263
264 probe_octeon(); 264 probe_octeon();
265 265
266 shm_align_mask = PAGE_SIZE - 1; 266 shm_align_mask = PAGE_SIZE - 1;
@@ -280,6 +280,8 @@ void __cpuinit octeon_cache_init(void)
280 280
281 build_clear_page(); 281 build_clear_page();
282 build_copy_page(); 282 build_copy_page();
283
284 board_cache_error_setup = octeon_cache_error_setup;
283} 285}
284 286
285/** 287/**