Skip to content

Commit

Permalink
MIPS: Octeon: Use board_cache_error_setup for cache error handler setup.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Daney authored and Ralf Baechle committed May 16, 2012
1 parent e3dc81f commit 586016e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions arch/mips/mm/c-octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/r4kcache.h>
#include <asm/traps.h>
#include <asm/mmu_context.h>
#include <asm/war.h>

Expand Down Expand Up @@ -248,19 +249,18 @@ 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
*
*/
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();

shm_align_mask = PAGE_SIZE - 1;
Expand All @@ -280,6 +280,8 @@ void __cpuinit octeon_cache_init(void)

build_clear_page();
build_copy_page();

board_cache_error_setup = octeon_cache_error_setup;
}

/**
Expand Down

0 comments on commit 586016e

Please sign in to comment.