RE: [PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro

2016-11-29 Thread Yuriy Kolerov
; Subject: Re: [PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro > > Hi Yuriy, > > Really nice catch! > Though a couple of nitpicks below. > > On Mon, 2016-11-28 at 07:07 +0300, Yuriy Kolerov wrote: > > Originally pfn_pte(pfn, prot) macro had this de

Re: [PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro

2016-11-28 Thread Vineet Gupta
Hi Yuriy, Indeed good find. My nits and not-quite-nits below :-) On 11/27/2016 08:07 PM, Yuriy Kolerov wrote: > Originally pfn_pte(pfn, prot) macro had this definition: > > __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) > > The value of pfn (Page Frame Number) is shifted to the left to get

Re: [PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro

2016-11-28 Thread Alexey Brodkin
Hi Yuriy, Really nice catch! Though a couple of nitpicks below. On Mon, 2016-11-28 at 07:07 +0300, Yuriy Kolerov wrote: > Originally pfn_pte(pfn, prot) macro had this definition: > > __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) > > The value of pfn (Page Frame Number) is shifted to the l

[PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro

2016-11-27 Thread Yuriy Kolerov
Originally pfn_pte(pfn, prot) macro had this definition: __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) The value of pfn (Page Frame Number) is shifted to the left to get the value of pte (Page Table Entry). Usually a 4-byte value is passed to this macro as value of pfn. However if Linux is