Re: [RFC PATCH V1 14/33] powerpc/mm: Use helper for finding pte bits mapping I/O area

2016-01-12 Thread Benjamin Herrenschmidt
On Wed, 2016-01-13 at 11:37 +0530, Aneesh Kumar K.V wrote: > Benjamin Herrenschmidt writes: > > > On Tue, 2016-01-12 at 10:42 +0300, Denis Kirjanov wrote: > > > > +static inline unsigned long pte_io_cache_bits(void) > > > > +{ > > > > + return _PAGE_NO_CACHE | _PAGE_GUARDED; > > > > +} > > >

Re: [RFC PATCH V1 14/33] powerpc/mm: Use helper for finding pte bits mapping I/O area

2016-01-12 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Tue, 2016-01-12 at 10:42 +0300, Denis Kirjanov wrote: >> > +static inline unsigned long pte_io_cache_bits(void) >> > +{ >> > + return _PAGE_NO_CACHE | _PAGE_GUARDED; >> > +} >> This could be just plain #define > > Or just use pgprot_noncached() > #define pg

Re: [RFC PATCH V1 14/33] powerpc/mm: Use helper for finding pte bits mapping I/O area

2016-01-12 Thread Benjamin Herrenschmidt
On Tue, 2016-01-12 at 10:42 +0300, Denis Kirjanov wrote: > > +static inline unsigned long pte_io_cache_bits(void) > > +{ > > + return _PAGE_NO_CACHE | _PAGE_GUARDED; > > +} > This could be just plain #define Or just use pgprot_noncached() Cheers, Ben.

Re: [RFC PATCH V1 14/33] powerpc/mm: Use helper for finding pte bits mapping I/O area

2016-01-12 Thread Denis Kirjanov
On 1/12/16, Aneesh Kumar K.V wrote: > We will have different values for hash and radix. Hence we > cannot use #define constants. Add helper > > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/include/asm/book3s/32/pgtable.h | 5 + > arch/powerpc/include/asm/book3s/64/hash.h| 5 +

[RFC PATCH V1 14/33] powerpc/mm: Use helper for finding pte bits mapping I/O area

2016-01-11 Thread Aneesh Kumar K.V
We will have different values for hash and radix. Hence we cannot use #define constants. Add helper Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/32/pgtable.h | 5 + arch/powerpc/include/asm/book3s/64/hash.h| 5 + arch/powerpc/include/asm/nohash/pgtable.h| 5