[PATCH] powerpc: Fix call to flush_ptrace_hw_breakpoint()

K.Prasad prasad at linux.vnet.ibm.com
Mon Feb 7 15:52:30 EST 2011


On Mon, Feb 07, 2011 at 02:10:39PM +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2011-02-07 at 08:26 +0530, K.Prasad wrote:
> > On Mon, Feb 07, 2011 at 09:54:13AM +1100, Benjamin Herrenschmidt wrote:
> > > A typo in the #ifdef statement makes us never call it
> > > in flush_thread()
> > >
> > 
> > I wish it never compiled for such typos :-)
> > 
> >  
> > > Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> > Acked-by: K.Prasad <prasad at linux.vnet.ibm.com>
> 
> Interestingly, that 'fix' now breaks the build:
> 
> cc1: warnings being treated as errors
> /home/benh/linux-powerpc-test/arch/powerpc/kernel/process.c:356: error:
> 'set_debug_reg_defaults' defined but not used 
> 
> This file is is becoming an absolute mess of ifdef's in large part due
> to the new BookE debug stuff and your HW breakpoint stuff... Any chance
> you and Shaggy see if you can improve that situation a bit ?
> 
> Cheers,
> Ben.
> 
> 

Okay! Another wrapper of "#ifndef CONFIG_HAVE_HW_BREAKPOINT" around the
definition of 'set_debug_reg_defaults'.

There's indeed too much sprinkling of #ifdefs in the code, but most of
it would go away when the BookE code also uses the generic hw-breakpoint
interfaces. Given the advanced debug features that BookE supports, it's
unfortunately not that straight-forward (needs additions to generic
hw-breakpoint infrastructure).

Thanks,
K.Prasad



More information about the Linuxppc-dev mailing list