diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2010-03-02 00:37:09 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-04-07 04:00:31 -0400 |
commit | fe1691e3f49d41452832f5aee2b952bd201ccab1 (patch) | |
tree | 632eb38bf3e600fc85beb92e6bd46973db7b8188 /arch/powerpc/kernel/head_8xx.S | |
parent | 43b5fefc24157def813154d1867d2960cefff837 (diff) |
powerpc/8xx: Optimze TLB Miss handlers
This removes a couple of insn's from the TLB Miss
handlers whithout changing functionality.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/head_8xx.S')
-rw-r--r-- | arch/powerpc/kernel/head_8xx.S | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 3ef743fa5d7c..ecc4a02277e3 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -343,17 +343,14 @@ InstructionTLBMiss: | |||
343 | cmpwi cr0, r11, _PAGE_ACCESSED | _PAGE_PRESENT | 343 | cmpwi cr0, r11, _PAGE_ACCESSED | _PAGE_PRESENT |
344 | bne- cr0, 2f | 344 | bne- cr0, 2f |
345 | 345 | ||
346 | /* Clear PP lsb, 0x400 */ | ||
347 | rlwinm r10, r10, 0, 22, 20 | ||
348 | |||
349 | /* The Linux PTE won't go exactly into the MMU TLB. | 346 | /* The Linux PTE won't go exactly into the MMU TLB. |
350 | * Software indicator bits 22 and 28 must be clear. | 347 | * Software indicator bits 21 and 28 must be clear. |
351 | * Software indicator bits 24, 25, 26, and 27 must be | 348 | * Software indicator bits 24, 25, 26, and 27 must be |
352 | * set. All other Linux PTE bits control the behavior | 349 | * set. All other Linux PTE bits control the behavior |
353 | * of the MMU. | 350 | * of the MMU. |
354 | */ | 351 | */ |
355 | li r11, 0x00f0 | 352 | li r11, 0x00f0 |
356 | rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */ | 353 | rlwimi r10, r11, 0, 0x07f8 /* Set 24-27, clear 21-23,28 */ |
357 | DO_8xx_CPU6(0x2d80, r3) | 354 | DO_8xx_CPU6(0x2d80, r3) |
358 | mtspr SPRN_MI_RPN, r10 /* Update TLB entry */ | 355 | mtspr SPRN_MI_RPN, r10 /* Update TLB entry */ |
359 | 356 | ||
@@ -444,9 +441,7 @@ DataStoreTLBMiss: | |||
444 | 441 | ||
445 | /* Honour kernel RO, User NA */ | 442 | /* Honour kernel RO, User NA */ |
446 | /* 0x200 == Extended encoding, bit 22 */ | 443 | /* 0x200 == Extended encoding, bit 22 */ |
447 | /* r11 = (r10 & _PAGE_USER) >> 2 */ | 444 | rlwimi r10, r10, 32-2, 0x200 /* Copy USER to bit 22, 0x200 */ |
448 | rlwinm r11, r10, 32-2, 0x200 | ||
449 | or r10, r11, r10 | ||
450 | /* r11 = (r10 & _PAGE_RW) >> 1 */ | 445 | /* r11 = (r10 & _PAGE_RW) >> 1 */ |
451 | rlwinm r11, r10, 32-1, 0x200 | 446 | rlwinm r11, r10, 32-1, 0x200 |
452 | or r10, r11, r10 | 447 | or r10, r11, r10 |