[PATCH 06/11] powerpc/8xx: Remove duplicated code in set_context()

Christophe Leroy christophe.leroy at c-s.fr
Wed Dec 17 02:03:39 AEDT 2014


Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>

---
 arch/powerpc/kernel/head_8xx.S | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index aa45225..b227902e 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -848,23 +848,21 @@ _GLOBAL(set_context)
 
 	li	r5, (swapper_pg_dir-PAGE_OFFSET)@l
 	sub	r4, r4, r5
+	tophys	(r4, r4)
 #ifdef CONFIG_8xx_CPU6
 	lis	r6, cpu6_errata_word at h
 	ori	r6, r6, cpu6_errata_word at l
-	tophys	(r4, r4)
 	li	r7, 0x3f80
 	stw	r7, 12(r6)
 	lwz	r7, 12(r6)
+#endif
         mtspr   SPRN_M_TW, r4               /* Update MMU base address */
+#ifdef CONFIG_8xx_CPU6
 	li	r7, 0x3380
 	stw	r7, 12(r6)
 	lwz	r7, 12(r6)
-        mtspr   SPRN_M_CASID, r3             /* Update context */
-#else
-        mtspr   SPRN_M_CASID,r3		/* Update context */
-	tophys	(r4, r4)
-	mtspr	SPRN_M_TW, r4		/* and pgd */
 #endif
+        mtspr   SPRN_M_CASID, r3             /* Update context */
 	SYNC
 	blr
 
-- 
2.1.0



More information about the Linuxppc-dev mailing list