Skip to contentSkip to conversation

powerpc32/8xx: invert _PAGE_RW bit in PTE accessors

PATCH In review Christophe Leroy 1 participant 1 message Dec 10, 2014 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 powerpc32/8xx: invert _PAGE_RW bit in PTE accessors

The 8xx inverts _PAGE_RW. Lets to it in PTE accessors.

---
 arch/powerpc/include/asm/pte-8xx.h | 1 +
 arch/powerpc/kernel/head_8xx.S     | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/include/asm/pte-8xx.h +1 -0
index daa4616..57bad0a 100644
@@ -57,6 +57,7 @@
 #define _PMD_PAGE_8M	0x000c
 
 #define _PTE_NONE_MASK _PAGE_KNLRO
+#define _PTE_HW_INVERTED	_PAGE_RW
 
 /* Until my rework is finished, 8xx still needs atomic PTE updates */
 #define PTE_ATOMIC_UPDATES	1
arch/powerpc/kernel/head_8xx.S +0 -3
index 3d4b8ee..807b0db 100644
@@ -441,9 +441,6 @@ DataStoreTLBMiss:
 	and	r11, r11, r10
 	rlwimi	r10, r11, 0, _PAGE_PRESENT
 #endif
-	/* invert RW */
-	xori	r10, r10, _PAGE_RW
-
 	/* The Linux PTE won't go exactly into the MMU TLB.
 	 * Software indicator bits 22 and 28 must be clear.
 	 * Software indicator bits 24, 25, 26, and 27 must be
Signature · 1 line
2.1.0