Commit 586016eb authored by David Daney's avatar David Daney Committed by Ralf Baechle

MIPS: Octeon: Use board_cache_error_setup for cache error handler setup.

Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3820/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e3dc81f2
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/r4kcache.h> #include <asm/r4kcache.h>
#include <asm/traps.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/war.h> #include <asm/war.h>
...@@ -248,6 +249,11 @@ static void __cpuinit probe_octeon(void) ...@@ -248,6 +249,11 @@ static void __cpuinit probe_octeon(void)
} }
} }
static void __cpuinit octeon_cache_error_setup(void)
{
extern char except_vec2_octeon;
set_handler(0x100, &except_vec2_octeon, 0x80);
}
/** /**
* Setup the Octeon cache flush routines * Setup the Octeon cache flush routines
...@@ -255,12 +261,6 @@ static void __cpuinit probe_octeon(void) ...@@ -255,12 +261,6 @@ static void __cpuinit probe_octeon(void)
*/ */
void __cpuinit octeon_cache_init(void) void __cpuinit octeon_cache_init(void)
{ {
extern unsigned long ebase;
extern char except_vec2_octeon;
memcpy((void *)(ebase + 0x100), &except_vec2_octeon, 0x80);
octeon_flush_cache_sigtramp(ebase + 0x100);
probe_octeon(); probe_octeon();
shm_align_mask = PAGE_SIZE - 1; shm_align_mask = PAGE_SIZE - 1;
...@@ -280,6 +280,8 @@ void __cpuinit octeon_cache_init(void) ...@@ -280,6 +280,8 @@ void __cpuinit octeon_cache_init(void)
build_clear_page(); build_clear_page();
build_copy_page(); build_copy_page();
board_cache_error_setup = octeon_cache_error_setup;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment