Re: [patch 02/11] x86 architecture implementation of HardwareBreakpoint interfaces

From: Benjamin Herrenschmidt
Date: Fri Mar 13 2009 - 23:52:36 EST


On Wed, 2009-03-11 at 19:46 -0700, Roland McGrath wrote:
>
> I think it would be illustrative to have a second arch implementation to
> compare to the x86 one. Ingo has a tendency to pretend everything is an
> x86 until shown the concrete evidence. The obvious choice is powerpc.
> Its facility is very simple, so the arch-specific part of the
> implementation should be trivial--it's the "base case" of simplest
> available hw_breakpoint arch, really. Also, it happens that Prasad's
> employer is interested in having that support.
>
> For example, a sensible powerpc implementation would clearly demonstrate
> why you need accessors or at least either pre-registration setters or
> explicit type/len arguments in registration calls.

Well, we happen to be just in the middle of implementing support for
BookE HW debug facilities :-) (which have more HW breakpoints &
watchpoints than server PPCs along with fancy features like ranged
breakpoints or value compare) so it's a right time to give that a try.

I'm Ccing David Gibson and Torez Smith who both have been working on the
infrastructure to control the debug regs. For now we are just giving
pretty much direct access to the debug regs from ptrace (since they are
somewhat architected they are very similar if not identical between a
whole bunch of embedded powerpc's) but a more abstract interface would
be nice.

Ben.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/