[PATCH v3] powerpc: Use PFN_PHYS() to avoid truncating the physical address

Michael Ellerman mpe at ellerman.id.au
Fri Mar 27 10:45:05 AEDT 2015


On Thu, 2015-03-26 at 10:31 -0500, Emil Medve wrote:
> Hello Kumar,
> 
> 
> On 03/26/2015 10:18 AM, Kumar Gala wrote:
> > Why no commit message with what issue this change was trying to fix?
> 
> A while back, when I attempted to remove bootmem (in favor of just plain
> memblock as in powerpc land bootmem was just a wrapper to memblock
> anyway) I run at some point into a problem with an intermediate address
> value because of this '<< PAGE_SHIFT' on the wrong width variable. Using
> PFN_PHYS() took care of it (it has a cast) so I decided to get this
> defensive patch applied. Since, I dropped my bootmem/memblock patches in
> favor to Anton's (Blanchard) work so my concrete issue example is
> somewhat gone

I'm not a big fan of it unless it's actually fixing an issue. It's a lot of
churn and the end result is less readable IMHO.

cheers




More information about the Linuxppc-dev mailing list