All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Matt Mackall <mpm@selenic.com>
Cc: gdb@sourceware.org, linuxppc-embedded@ozlabs.org
Subject: Re: Apparent kernel bug with GDB on ppc405
Date: Sat, 27 Oct 2007 11:30:53 +1000	[thread overview]
Message-ID: <1193448653.18243.9.camel@pasglop> (raw)
In-Reply-To: <20071026144134.GW19691@waste.org>


On Fri, 2007-10-26 at 09:41 -0500, Matt Mackall wrote:
> On Fri, Oct 26, 2007 at 01:23:25PM +1000, Benjamin Herrenschmidt
> wrote:
> > 
> > > This is actually 405.  Does that have the same issue?
> > 
> > hrm... I don't remember :-) There -is- something fishy about the
> icache
> > on 405 but I don't remember for sure. Try sticking an iccci in there
> and
> > tell us if that helps.
> 
> I did. I stuck an iccci -and- a dccci loop in. I threw in the tlbia
> when I ran out of other ideas. And the tlbia + existing
> flush_icache_range appears to be sufficient (tested on a non-trivial
> app).
> 
> According to my docs, the 405fx's icache is virtually
> indexed/physically mapped, while the dcache is phys/phys.

I think there is a bug in the 40x/44x support at this stage, it only
doing invalidations for the current PID. That means that a process
trying to invalidate TLB entries of another address space will fail to
do so ... oops.

That can be fixed by adding a pid argument to to _tlbie, and using it in
the assembly. In the 40x case, probably by switching SPRN_PID to that
and then back, in the 44x case, by using that value instead of SPRN_PID
for the MMUCR register.

It's part of a patche I have around taking dirt that rework signficantly
the 44x (though not the 40x yet) TLB handling, cleaning things and
fixing bugs (such as this one, I remember it now). I need to spend a bit
of time to clean it up, remove some experimental stuff from it, and
submit it.

I'll try to do that early next week, and maybe come up with a fix for
that specific bug today or tomorrow.

Ben.

  reply	other threads:[~2007-10-27  1:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 19:46 Apparent kernel bug with GDB on ppc405 Matt Mackall
2007-10-24 20:28 ` Grant Likely
2007-10-24 20:42   ` Matt Mackall
2007-10-24 20:46     ` Grant Likely
2007-10-24 21:54     ` Matt Mackall
2007-10-24 22:27       ` Grant Likely
2007-10-24 22:32         ` Matt Mackall
2007-10-24 22:39           ` Grant Likely
2007-10-24 22:40             ` Grant Likely
2007-10-26  1:50               ` Benjamin Herrenschmidt
2007-10-24 22:41           ` Daniel Jacobowitz
2007-10-26  1:51             ` Benjamin Herrenschmidt
2007-10-26 20:41               ` Josh Boyer
2007-10-27  1:36                 ` Benjamin Herrenschmidt
2007-10-27  1:27                   ` Josh Boyer
2007-10-24 20:34 ` David Daney
2007-10-26  1:52   ` Benjamin Herrenschmidt
2007-10-26  1:46 ` Benjamin Herrenschmidt
2007-10-26  2:45   ` Grant Likely
2007-10-26  3:23     ` Benjamin Herrenschmidt
2007-10-26 14:41       ` Matt Mackall
2007-10-27  1:30         ` Benjamin Herrenschmidt [this message]
2007-10-27  7:32           ` [PATCH/RFC] powerpc: Pass PID argument to _tlbie (WAS: Apparent kernel bug with GDB on ppc405) Benjamin Herrenschmidt
2007-10-29 12:08             ` Josh Boyer
2007-10-29 20:15               ` Josh Boyer
2007-10-29 20:35                 ` Benjamin Herrenschmidt
2007-10-29 21:13                   ` Matt Mackall

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=1193448653.18243.9.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=gdb@sourceware.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=mpm@selenic.com \
    /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.