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

From: Emil Medve <[email-masked]>
Date: Thu, 26 Mar 2015 10:31:22 -0500

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

Cheers,

> - k
> 
> On Mar 25, 2015, at 8:49 AM, Emil Medve <[email-masked]> wrote:
> 
>> Signed-off-by: Emil Medve <[email-masked]>
>> ---
>>
>> v3: Rebased and updated due to upstream changes since v2
>>
>> v2: Rebased and updated due to upstream changes since v1
>>
>> arch/powerpc/include/asm/io.h          | 2 +-
>> arch/powerpc/include/asm/page.h        | 2 +-
>> arch/powerpc/include/asm/pgalloc-32.h  | 2 +-
>> arch/powerpc/include/asm/rtas.h        | 3 ++-
>> arch/powerpc/kernel/crash_dump.c       | 2 +-
>> arch/powerpc/kernel/eeh.c              | 4 +---
>> arch/powerpc/kernel/io-workarounds.c   | 2 +-
>> arch/powerpc/kernel/pci-common.c       | 2 +-
>> arch/powerpc/kernel/vdso.c             | 6 +++---
>> arch/powerpc/kvm/book3s_64_mmu_host.c  | 2 +-
>> arch/powerpc/kvm/book3s_64_mmu_hv.c    | 2 +-
>> arch/powerpc/kvm/book3s_hv_rm_mmu.c    | 4 ++--
>> arch/powerpc/kvm/e500_mmu_host.c       | 5 ++---
>> arch/powerpc/mm/hugepage-hash64.c      | 2 +-
>> arch/powerpc/mm/hugetlbpage-book3e.c   | 2 +-
>> arch/powerpc/mm/hugetlbpage-hash64.c   | 2 +-
>> arch/powerpc/mm/mem.c                  | 9 ++++-----
>> arch/powerpc/mm/numa.c                 | 5 ++---
>> arch/powerpc/platforms/powernv/opal.c  | 2 +-
>> arch/powerpc/platforms/pseries/iommu.c | 8 ++++----
>> 20 files changed, 32 insertions(+), 36 deletions(-)