@@ -221,7 +221,11 @@ DataAccess:
mr r5,r20
mfspr r4,DAR
stw r4,_DAR(r21)
- li r20,0x00f0
+ /* invalidate ~PRESENT TLBs, 8xx MMU don't do this */
+ andis. r20,r5,0x4000
+ beq+ 1f
+ tlbie r4
+1: li r20,0x00f0
mtspr DAR,r20 /* Tag DAR */
addi r3,r1,STACK_FRAME_OVERHEAD
li r20,MSR_KERNEL
@@ -238,7 +242,11 @@ InstructionAccess:
addi r3,r1,STACK_FRAME_OVERHEAD
mr r4,r22
mr r5,r23
- li r20,MSR_KERNEL
+ /* invalidate ~PRESENT TLBs, 8xx MMU don't do this */
+ andis. r20,r5,0x4000
+ beq+ 1f
+ tlbie r4
+1: li r20,MSR_KERNEL
rlwimi r20,r23,0,16,16 /* copy EE bit from saved MSR */
FINISH_EXCEPTION(do_page_fault)
@@ -116,13 +116,6 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
else
is_write = error_code & 0x02000000;
#endif /* CONFIG_4xx || CONFIG_BOOKE */
-#if defined(CONFIG_8xx)
- /* 8xx does no invalidate TLBs that are ~PRESENT,
- * do it here.
- */
- if (error_code & 0x40000000)
- _tlbie(address);
-#endif
#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
if (debugger_fault_handler && regs->trap == 0x300) {
debugger_fault_handler(regs);
8xx does not invalidate ~PRESENT TLBs, move the workaround in mm/fault.c here to keep 8xx quirks localized. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> --- arch/ppc/kernel/head_8xx.S | 12 ++++++++++-- arch/ppc/mm/fault.c | 7 ------- 2 files changed, 10 insertions(+), 9 deletions(-)