diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2009-11-19 19:21:11 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:10:37 -0500 |
commit | 990d89c6636c1be300a4f2f914b95200b237d017 (patch) | |
tree | fc0bf651eb383b3f7fe5b14bff23b81c23b7bc36 /arch/powerpc | |
parent | 2321f33790a6c5b80322d907a92d5739e7521a13 (diff) |
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/head_8xx.S | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index f2de8e8a825c..678f98cd5e64 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -438,15 +438,20 @@ DataStoreTLBMiss: | |||
438 | * r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5)); | 438 | * r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5)); |
439 | * r10 = (r10 & ~PRESENT) | r11; | 439 | * r10 = (r10 & ~PRESENT) | r11; |
440 | */ | 440 | */ |
441 | rlwinm r11, r10, 32-5, 31, 31 | 441 | rlwinm r11, r10, 32-5, _PAGE_PRESENT |
442 | and r11, r11, r10 | 442 | and r11, r11, r10 |
443 | rlwimi r10, r11, 0, 31, 31 | 443 | rlwimi r10, r11, 0, _PAGE_PRESENT |
444 | 444 | ||
445 | /* Honour kernel RO, User NA */ | 445 | /* Honour kernel RO, User NA */ |
446 | andi. r11, r10, _PAGE_USER | _PAGE_RW | 446 | /* 0x200 == Extended encoding, bit 22 */ |
447 | bne- cr0, 5f | 447 | /* r11 = (r10 & _PAGE_USER) >> 2 */ |
448 | ori r10,r10, 0x200 /* Extended encoding, bit 22 */ | 448 | rlwinm r11, r10, 32-2, 0x200 |
449 | 5: xori r10, r10, _PAGE_RW /* invert RW bit */ | 449 | or r10, r11, r10 |
450 | /* r11 = (r10 & _PAGE_RW) >> 1 */ | ||
451 | rlwinm r11, r10, 32-1, 0x200 | ||
452 | or r10, r11, r10 | ||
453 | /* invert RW and 0x200 bits */ | ||
454 | xori r10, r10, _PAGE_RW | 0x200 | ||
450 | 455 | ||
451 | /* The Linux PTE won't go exactly into the MMU TLB. | 456 | /* The Linux PTE won't go exactly into the MMU TLB. |
452 | * Software indicator bits 22 and 28 must be clear. | 457 | * Software indicator bits 22 and 28 must be clear. |