diff options
-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. |