Subject: Re: Apparent kernel bug with GDB on ppc405

From: Benjamin Herrenschmidt <[email-masked]>
Date: Fri, 26 Oct 2007 11:52:10 +1000

On Wed, 2007-10-24 at 13:34 -0700, David Daney wrote:
> First of all I have never used a similar configuration so this may be 
> totally off base.  But...
> 
> If the icache is virtually indexed, then I think there are only two
> ways 
> to invalidate it.  The first is from the context of the debugged
> process 
> where the page is mapped at the location the target program will see
> it. 
>    If you try to invalidate from the context of the debugger, the
> page 
> will most likely not be mapped at the virtual address of the target 
> program so you might have to invalidate the *entire* icache.

Yup, sounds likely. We don't handle that virtual icache well at all in
linux. Things tend to work by mere luck. I have various ideas to fix
that but haven't actually implemented them.

Ben.