Commit 2925229a authored by Tyler Baker's avatar Tyler Baker Committed by Mark Salyzyn
Browse files

UPSTREAM: mm: fix type cast in __pfn_to_phys()



(cherry pick from commit ae4f9769)

The various definitions of __pfn_to_phys() have been consolidated to
use a generic macro in include/asm-generic/memory_model.h. This hit
mainline in the form of 012dcef3 "mm: move __phys_to_pfn and
__pfn_to_phys to asm/generic/memory_model.h". When the generic macro
was implemented the type cast to phys_addr_t was dropped which caused
boot regressions on ARM platforms with more than 4GB of memory and
LPAE enabled.

It was suggested to use PFN_PHYS() defined in include/linux/pfn.h
as provides the correct logic and avoids further duplication.

Reported-by: default avatarkernelci.org bot <bot@kernelci.org>
Suggested-by: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarTyler Baker <tyler.baker@linaro.org>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
Bug: 20045882
Bug: 19198045
Change-Id: I74aa50caf723055328d782bfc90dd4f417ab6fe8
parent 087c1b23
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment