linux-mips
[Top] [All Lists]

[PATCH 20/36] Cavium OCTEON: add in icache and dcache error functions.

To: linux-mips@linux-mips.org
Subject: [PATCH 20/36] Cavium OCTEON: add in icache and dcache error functions.
From: David Daney <ddaney@caviumnetworks.com>
Date: Mon, 27 Oct 2008 17:02:52 -0700
Cc: David Daney <ddaney@caviumnetworks.com>, Tomaso Paoletti <tpaoletti@caviumnetworks.com>
In-reply-to: <1225152181-3221-19-git-send-email-ddaney@caviumnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <490655B6.4030406@caviumnetworks.com> <1225152181-3221-1-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-2-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-3-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-4-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-5-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-6-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-7-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-8-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-9-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-10-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-11-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-12-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-13-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-14-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-15-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-16-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-17-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-18-git-send-email-ddaney@caviumnetworks.com> <1225152181-3221-19-git-send-email-ddaney@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
If there is an icache or dcache error, there is additional data to
be had from the 64bit read of c0 @ $27.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/include/asm/mipsregs.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index 9316324..ed266ce 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -967,7 +967,12 @@ do {                                                       
                \
 #define read_c0_derraddr0()    __read_ulong_c0_register($26, 1)
 #define write_c0_derraddr0(val)        __write_ulong_c0_register($26, 1, val)
 
+#ifdef CONFIG_CPU_CAVIUM_OCTEON
+#define read_c0_cacheerr()     __read_64bit_c0_register($27, 0)
+#define write_c0_cacheerr(val) __write_64bit_c0_register($27, 0, val)
+#else
 #define read_c0_cacheerr()     __read_32bit_c0_register($27, 0)
+#endif
 
 #define read_c0_derraddr1()    __read_ulong_c0_register($27, 1)
 #define write_c0_derraddr1(val)        __write_ulong_c0_register($27, 1, val)
-- 
1.5.6.5


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