[PATCH 2/3] powerpc/mm: Preserve CFAR value on SLB miss caused by access to bogus address

Paul Mackerras paulus at ozlabs.org
Wed Sep 7 15:52:24 AEST 2016


On Sun, Sep 04, 2016 at 05:00:13PM +0530, Aneesh Kumar K.V wrote:
[snip]
> > @@ -1389,6 +1393,7 @@ unrecover_mce:
> >   * r3 has the faulting address
> >   * r9 - r13 are saved in paca->exslb.
> >   * r3 is saved in paca->slb_r3
> > + * cr6.eq is set for a D-SLB miss, clear for a I-SLB miss
> >   * We assume we aren't going to take any exceptions during this procedure.
> >   */
> >  slb_miss_realmode:
> > @@ -1399,29 +1404,31 @@ slb_miss_realmode:
> >  
> >  	stw	r9,PACA_EXSLB+EX_CCR(r13)	/* save CR in exc. frame */
> >  	std	r10,PACA_EXSLB+EX_LR(r13)	/* save LR */
> > +	std	r3,PACA_EXSLB+EX_DAR(r13)
> 
> 
> We already have that in EX_R3(r13) right ? Any specific reason we can't

No, what's in EX_R3(r13) is the original value of r3.  What's in r3
now is the faulting address.  We save that here so we can put it in
regs->dar later on.

Paul.


More information about the Linuxppc-dev mailing list