From cc3023b9f95d7ac959a764471a65001062aecf41 Mon Sep 17 00:00:00 2001
From: Rafal Jaworowski <raj@semihalf.com>
Date: Thu, 19 Jul 2007 17:12:28 +0200
Subject: [PATCH] Fix breakage of 8xx boards from recent commit.

This patch fixes the negative consequences for 8xx of the recent
"ppc4xx: Clean up 440 exceptions handling" commit.

Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
---
 include/asm-ppc/processor.h | 6 ++++++
 include/ppc_asm.tmpl        | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index 9780fe15c0..4898dd41cc 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -628,6 +628,12 @@
 #define MAS6	SPRN_MAS6
 #define MAS7	SPRN_MAS7
 
+#if defined(CONFIG_4xx) || defined(CONFIG_44x) || defined(CONFIG_MPC85xx)
+#define DAR_DEAR DEAR
+#else
+#define DAR_DEAR DAR
+#endif
+
 /* Device Control Registers */
 
 #define DCRN_BEAR	0x090	/* Bus Error Address Register */
diff --git a/include/ppc_asm.tmpl b/include/ppc_asm.tmpl
index 9f4029f2af..ac8f317683 100644
--- a/include/ppc_asm.tmpl
+++ b/include/ppc_asm.tmpl
@@ -235,7 +235,7 @@
 	stw	r22,_CTR(r21);	\
 	mfspr	r20,XER;	\
 	stw	r20,_XER(r21);	\
-	mfspr	r20,DEAR;	\
+	mfspr	r20, DAR_DEAR;	\
 	stw	r20,_DAR(r21);	\
 	mfspr	r22,reg1;	\
 	mfspr	r23,reg2;	\
-- 
GitLab