summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2009-11-20 00:21:11 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 17:10:37 +1100
commit990d89c6636c1be300a4f2f914b95200b237d017 (patch)
treefc0bf651eb383b3f7fe5b14bff23b81c23b7bc36
parent2321f33790a6c5b80322d907a92d5739e7521a13 (diff)
downloadop-kernel-dev-990d89c6636c1be300a4f2f914b95200b237d017.zip
op-kernel-dev-990d89c6636c1be300a4f2f914b95200b237d017.tar.gz
powerpc/8xx: DTLB Miss cleanup
Use symbolic constant for PRESENT and avoid branching. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/kernel/head_8xx.S17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index f2de8e8..678f98c 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -438,15 +438,20 @@ DataStoreTLBMiss:
* r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5));
* r10 = (r10 & ~PRESENT) | r11;
*/
- rlwinm r11, r10, 32-5, 31, 31
+ rlwinm r11, r10, 32-5, _PAGE_PRESENT
and r11, r11, r10
- rlwimi r10, r11, 0, 31, 31
+ rlwimi r10, r11, 0, _PAGE_PRESENT
/* Honour kernel RO, User NA */
- andi. r11, r10, _PAGE_USER | _PAGE_RW
- bne- cr0, 5f
- ori r10,r10, 0x200 /* Extended encoding, bit 22 */
-5: xori r10, r10, _PAGE_RW /* invert RW bit */
+ /* 0x200 == Extended encoding, bit 22 */
+ /* r11 = (r10 & _PAGE_USER) >> 2 */
+ rlwinm r11, r10, 32-2, 0x200
+ or r10, r11, r10
+ /* r11 = (r10 & _PAGE_RW) >> 1 */
+ rlwinm r11, r10, 32-1, 0x200
+ or r10, r11, r10
+ /* invert RW and 0x200 bits */
+ xori r10, r10, _PAGE_RW | 0x200
/* The Linux PTE won't go exactly into the MMU TLB.
* Software indicator bits 22 and 28 must be clear.
OpenPOWER on IntegriCloud