Subject: Re: [PATCH 09/31] powerpc/mm: Don't use pte_val as lvalue

From: Scott Wood <[email-masked]>
Date: Tue, 22 Sep 2015 01:46:48 -0500

On Tue, 2015-09-22 at 12:14 +0530, Aneesh Kumar K.V wrote:
> Scott Wood <[email-masked]> writes:
> 
> > On Mon, Sep 21, 2015 at 12:10:36PM +0530, Aneesh Kumar K.V wrote:
> > > +static inline pte_t pte_mkwrite(pte_t pte)
> > > +{
> > > + pte_basic_t ptev;
> > > +
> > > + ptev = pte_val(pte) & ~_PAGE_RO;
> > > + ptev |= _PAGE_RW;
> > > + return __pte(pte);
> > > +}
> > 
> > s/__pte(pte)/__pte(ptev)/
> > 
> > ...to fix an endless handle_mm_fault() loop.
> > 
> > CONFIG_STRICT_MM_TYPECHECKS would have caught this.
> > 
> 
> Thanks will update the patch. As you noticied the patch series was not
> tested on anything other than power7 and power8 (BE/LE). So any testing
> on other platforms is going to be really useful. Now I did compile test
> this with large number of configs. I guess none of them enable
> STRICT_MM_TYPES.
> 
> Did the series boot fine on the platform after the above fix ?

Yes, I booted on e500v2 (with and without 64-bit physical addresses), e500mc, 
and e6500.

-Scott