linux-mips
[Top] [All Lists]

[PATCH 3/5] MIPS: Octeon: Use board_cache_error_setup for cache error ha

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 3/5] MIPS: Octeon: Use board_cache_error_setup for cache error handler setup.
From: David Daney <ddaney.cavm@gmail.com>
Date: Mon, 19 Dec 2011 15:16:40 -0800
Cc: David Daney <david.daney@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=g5vULzkec4WJRXdLD71bRmpzehY9uTHgubWeUgT9zKs=; b=A7YRHJU+hYCq5OWf57A8CHhaTWKP/u7K4e2w5KpF1Da82On8ABqNGKcawy0K2dPeh7 z+usnkSDzJpjF45tpySObEyEcKbg2wvcG+t5YwZLo64xHmmDBw3bXpq5SfXmP4WkGTJh qf3JtKP1qF+NuWzaX++XtmsTOaO/lGrtd+lBw=
In-reply-to: <1324336602-29812-1-git-send-email-ddaney.cavm@gmail.com>
References: <1324336602-29812-1-git-send-email-ddaney.cavm@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

Signed-off-by: David Daney <david.daney@cavium.com>
---
 arch/mips/mm/c-octeon.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c
index cf7895d..2d99a1d 100644
--- a/arch/mips/mm/c-octeon.c
+++ b/arch/mips/mm/c-octeon.c
@@ -22,6 +22,7 @@
 #include <asm/pgtable.h>
 #include <asm/r4kcache.h>
 #include <asm/system.h>
+#include <asm/traps.h>
 #include <asm/mmu_context.h>
 #include <asm/war.h>
 
@@ -249,6 +250,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
@@ -256,12 +262,6 @@ static void __cpuinit probe_octeon(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();
 
        shm_align_mask = PAGE_SIZE - 1;
@@ -281,6 +281,8 @@ void __cpuinit octeon_cache_init(void)
 
        build_clear_page();
        build_copy_page();
+
+       board_cache_error_setup = octeon_cache_error_setup;
 }
 
 /**
-- 
1.7.2.3


<Prev in Thread] Current Thread [Next in Thread>