From: Ralf Baechle <ralf@linux-mips.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Dave Johnson <djohnson+linux-mips@sw.starentnetworks.com>,
linux-mips@linux-mips.org
Subject: Re: wrong SP restored after DBE exception
Date: Thu, 28 Sep 2006 15:28:40 +0100 [thread overview]
Message-ID: <20060928142840.GB3394@linux-mips.org> (raw)
In-Reply-To: <Pine.LNX.4.64N.0609281448310.3949@blysk.ds.pg.gda.pl>
On Thu, Sep 28, 2006 at 02:56:29PM +0100, Maciej W. Rozycki wrote:
> > If we take a DBE exception in this code we're in trouble and I've seen
> > systems delivering DBEs highly asynchronously. Afar the Broadcom SOCs
> > fall into that class.
> >
> > So the interesting part is if we take a data bus exception between
> > the stack pointer adjustment and and before EXL is cleared. We're taking
> > a nested exception so c0_epc and c0_cause.bd will not be updated. So
> > when the bus error handler will save the $sp value it saw on entry but
> > will return to the EPC of the first exception, that is only one stack
> > frame will be popped. Whops ...
>
> It looks like a design issue -- further asynchronous bus error exceptions
> should be blocked till one currenly being handled has been acked. In fact
> if they are asynchronous, then it really makes no sense to use the
> exception and a general interrupt should be used instead -- the whole
> point of using an exception here is the ability to stop a data corrupting
> transaction, as unlike an interropt, an exception can be precise.
I would suggest to disable interrupts around accesses that potencially
could result in DB exceptions and just to make sure he is not getting
trapped by a non-blocking load by making some use of any value read
from the device. Writes could be posted depending on bus type. So
having a read from the same device would force the write to complete.
Ralf
next prev parent reply other threads:[~2006-09-28 14:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 19:53 wrong SP restored after DBE exception Dave Johnson
2006-09-28 13:09 ` Ralf Baechle
2006-09-28 13:56 ` Maciej W. Rozycki
2006-09-28 14:28 ` Ralf Baechle [this message]
2006-09-28 14:34 ` Dave Johnson
2006-09-28 17:55 ` Dave Johnson
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=20060928142840.GB3394@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=djohnson+linux-mips@sw.starentnetworks.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.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.