[PATCH] powerpc: Fix possible unrecoverable exception caused by '70fe3d9'

Michael Ellerman mpe at ellerman.id.au
Thu Mar 17 13:52:59 AEDT 2016


On Wed, 2016-03-16 at 22:45 +1100, Benjamin Herrenschmidt wrote:

> On Wed, 2016-03-16 at 13:29 +1100, Cyril Bur wrote:

> > +#ifdef CONFIG_PPC_BOOK3S
> > +       ld      r10,PACAKMSR(r13)
> > +       li      r9,MSR_RI
> > +       andc    r11,r10,r9 /* Re-clear RI */
> > +       mtmsrd  r11,1
> > +#endif
>
> Do you need that ? IE, mtmsrd with "1" will only update RI and EE, is
> the value of EE in PACAMSR variable ?

Yeah that's a bit brain dead when you look at it. But in Cyril's defence he
just copied it from the existing code.

PACAKMSR does not include EE, so the code is correct, just suboptimal.

I've already merged it though in my rush to get my next branch working. Cyril
is looking at reworking the EE/RI clearing in there so we'll fix it up as part
of that.

cheers



More information about the Linuxppc-dev mailing list