diff options
-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 */ |