Skip to content

Commit d069cb4

Browse files
joakim-tjernlundozbenh
authored andcommitted
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 <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent 4afb0be commit d069cb4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/powerpc/kernel/head_8xx.S

+4-2
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,11 @@ InstructionTLBMiss:
343343
mfspr r11, SPRN_MD_TWC /* ....and get the pte address */
344344
lwz r10, 0(r11) /* Get the pte */
345345

346+
#ifdef CONFIG_SWAP
346347
andi. r11, r10, _PAGE_ACCESSED | _PAGE_PRESENT
347348
cmpwi cr0, r11, _PAGE_ACCESSED | _PAGE_PRESENT
348349
bne- cr0, 2f
349-
350+
#endif
350351
/* The Linux PTE won't go exactly into the MMU TLB.
351352
* Software indicator bits 21 and 28 must be clear.
352353
* Software indicator bits 24, 25, 26, and 27 must be
@@ -439,10 +440,11 @@ DataStoreTLBMiss:
439440
* r11 = ((r10 & PRESENT) & ((r10 & ACCESSED) >> 5));
440441
* r10 = (r10 & ~PRESENT) | r11;
441442
*/
443+
#ifdef CONFIG_SWAP
442444
rlwinm r11, r10, 32-5, _PAGE_PRESENT
443445
and r11, r11, r10
444446
rlwimi r10, r11, 0, _PAGE_PRESENT
445-
447+
#endif
446448
/* Honour kernel RO, User NA */
447449
/* 0x200 == Extended encoding, bit 22 */
448450
rlwimi r10, r10, 32-2, 0x200 /* Copy USER to bit 22, 0x200 */

0 commit comments

Comments
 (0)