Commit 990d89c6 authored by Joakim Tjernlund's avatar Joakim Tjernlund Committed by Benjamin Herrenschmidt

powerpc/8xx: DTLB Miss cleanup

Use symbolic constant for PRESENT and avoid branching.
Signed-off-by: default avatarJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 2321f337
...@@ -438,15 +438,20 @@ DataStoreTLBMiss: ...@@ -438,15 +438,20 @@ DataStoreTLBMiss:
* r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5)); * r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5));
* r10 = (r10 & ~PRESENT) | r11; * r10 = (r10 & ~PRESENT) | r11;
*/ */
rlwinm r11, r10, 32-5, 31, 31 rlwinm r11, r10, 32-5, _PAGE_PRESENT
and r11, r11, r10 and r11, r11, r10
rlwimi r10, r11, 0, 31, 31 rlwimi r10, r11, 0, _PAGE_PRESENT
/* Honour kernel RO, User NA */ /* Honour kernel RO, User NA */
andi. r11, r10, _PAGE_USER | _PAGE_RW /* 0x200 == Extended encoding, bit 22 */
bne- cr0, 5f /* r11 = (r10 & _PAGE_USER) >> 2 */
ori r10,r10, 0x200 /* Extended encoding, bit 22 */ rlwinm r11, r10, 32-2, 0x200
5: xori r10, r10, _PAGE_RW /* invert RW bit */ 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. /* The Linux PTE won't go exactly into the MMU TLB.
* Software indicator bits 22 and 28 must be clear. * Software indicator bits 22 and 28 must be clear.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment