Subject: Re: [RFC Patch 1/2] PPC64-HWBKPT: Disable interrupts for data breakpoint exceptions

From: Benjamin Herrenschmidt <[email-masked]>
Date: Tue, 30 Mar 2010 16:32:25 +1100

On Tue, 2010-03-30 at 16:24 +1100, Paul Mackerras wrote:
> On Tue, Mar 23, 2010 at 07:37:02PM +0530, K.Prasad wrote:
> 
> > Index: linux-2.6.ppc64_test/arch/powerpc/kernel/exceptions-64s.S
> > ===================================================================
> > --- linux-2.6.ppc64_test.orig/arch/powerpc/kernel/exceptions-64s.S
> > +++ linux-2.6.ppc64_test/arch/powerpc/kernel/exceptions-64s.S
> > @@ -735,6 +735,9 @@ _STATIC(do_hash_page)
> >  	std	r3,_DAR(r1)
> >  	std	r4,_DSISR(r1)
> >  
> > +	andis.  r0,r4,0x0040		/* Data Address Breakpoint match? */
> 
> Minor comment: why not DSISR_DABRMATCH@h instead of 0x0040?
> 
> > +	bne-    handle_dabr_fault
> > +
> >  	andis.	r0,r4,0xa450		/* weird error? */
> >  	bne-	handle_page_fault	/* if not, try to insert a HPTE */
> >  BEGIN_FTR_SECTION
> > @@ -823,6 +826,15 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISER
> >  	bl	.raw_local_irq_restore
> >  	b	11f

I would move your new test to the "weird error" case (ie, after the bne-
handle_page_fault) to avoid hitting the fast path.

Cheers,
Ben.