All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sparclinux@vger.kernel.org
Subject: Re: kernel BUG at arch/sparc64/mm/fault.c:413!
Date: Fri, 26 Jan 2007 11:01:51 +0000	[thread overview]
Message-ID: <20070126.030151.92583388.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0701181328230.8124@pianoman.cluster.toy>


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

  parent reply	other threads:[~2007-01-26 11:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-18 18:33 kernel BUG at arch/sparc64/mm/fault.c:413! Vince Weaver
2007-01-24  5:25 ` David Miller
2007-01-25  3:00 ` Vince Weaver
2007-01-25 22:02 ` David Miller
2007-01-25 23:26 ` David Miller
2007-01-25 23:48 ` David Miller
2007-01-26  3:21 ` Vince Weaver
2007-01-26  8:39 ` David Miller
2007-01-26 11:01 ` David Miller [this message]
2007-01-26 19:44 ` Vince Weaver
2007-01-26 21:05 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070126.030151.92583388.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.