diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2010-03-02 00:37:11 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-04-07 04:00:33 -0400 |
commit | d069cb4373fe0d451357c4d3769623a7564dfa9f (patch) | |
tree | ab5acf3a31b79d86d5b57bfeac72889863f4b656 | |
parent | 4afb0be7ccda0ca551cc37572bab74ba4a3c18dd (diff) |
powerpc/8xx: Don't touch ACCESSED when no SWAP.
Only the swap function cares about the ACCESSED bit in
the pte. Do not waste cycles updateting ACCESSED when swap
is not compiled into the kernel.
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.S | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 84ca1d9b9ed3..6478a9632552 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -343,10 +343,11 @@ InstructionTLBMiss: | |||
343 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ | 343 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ |
344 | lwz r10, 0(r11) /* Get the pte */ | 344 | lwz r10, 0(r11) /* Get the pte */ |
345 | 345 | ||
346 | #ifdef CONFIG_SWAP | ||
346 | andi. r11, r10, _PAGE_ACCESSED | _PAGE_PRESENT | 347 | andi. r11, r10, _PAGE_ACCESSED | _PAGE_PRESENT |
347 | cmpwi cr0, r11, _PAGE_ACCESSED | _PAGE_PRESENT | 348 | cmpwi cr0, r11, _PAGE_ACCESSED | _PAGE_PRESENT |
348 | bne- cr0, 2f | 349 | bne- cr0, 2f |
349 | 350 | #endif | |
350 | /* The Linux PTE won't go exactly into the MMU TLB. | 351 | /* The Linux PTE won't go exactly into the MMU TLB. |
351 | * Software indicator bits 21 and 28 must be clear. | 352 | * Software indicator bits 21 and 28 must be clear. |
352 | * Software indicator bits 24, 25, 26, and 27 must be | 353 | * Software indicator bits 24, 25, 26, and 27 must be |
@@ -439,10 +440,11 @@ DataStoreTLBMiss: | |||
439 | * r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5)); | 440 | * r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5)); |
440 | * r10 = (r10 & ~PRESENT) | r11; | 441 | * r10 = (r10 & ~PRESENT) | r11; |
441 | */ | 442 | */ |
443 | #ifdef CONFIG_SWAP | ||
442 | rlwinm r11, r10, 32-5, _PAGE_PRESENT | 444 | rlwinm r11, r10, 32-5, _PAGE_PRESENT |
443 | and r11, r11, r10 | 445 | and r11, r11, r10 |
444 | rlwimi r10, r11, 0, _PAGE_PRESENT | 446 | rlwimi r10, r11, 0, _PAGE_PRESENT |
445 | 447 | #endif | |
446 | /* Honour kernel RO, User NA */ | 448 | /* Honour kernel RO, User NA */ |
447 | /* 0x200 == Extended encoding, bit 22 */ | 449 | /* 0x200 == Extended encoding, bit 22 */ |
448 | rlwimi r10, r10, 32-2, 0x200 /* Copy USER to bit 22, 0x200 */ | 450 | rlwimi r10, r10, 32-2, 0x200 /* Copy USER to bit 22, 0x200 */ |