Vince, I think I figured out what the bug is, can you test the
following patch?  If we set %g5 with the fault address here, we have
to set %g4 too.  This allows to correctly handle a DTLB-PROT trap for
a window spill during trap entry for another top-level fault.  The
non-Niagara DTLB-PROT code does this properly, it's just the sun4v
side that had the bug.

This is why in your logs the address was in the stack, but the fault
code was I-TLB :-)

Thanks a lot!

diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S 
b/arch/sparc64/kernel/sun4v_tlb_miss.S
index b731881..9871dbb 100644
--- a/arch/sparc64/kernel/sun4v_tlb_miss.S
+++ b/arch/sparc64/kernel/sun4v_tlb_miss.S
@@ -142,9 +142,9 @@ sun4v_dtlb_prot:
        rdpr    %tl, %g1
        cmp     %g1, 1
        bgu,pn  %xcc, winfix_trampoline
-        nop
-       ba,pt   %xcc, sparc64_realfault_common
         mov    FAULT_CODE_DTLB | FAULT_CODE_WRITE, %g4
+       ba,pt   %xcc, sparc64_realfault_common
+        nop
 
        /* Called from trap table:
         * %g4: vaddr
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to