]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: fix type cast in __pfn_to_phys()
authorTyler Baker <tyler.baker@linaro.org>
Sat, 19 Sep 2015 07:58:10 +0000 (03:58 -0400)
committerDan Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:19:56 +0000 (12:19 -0500)
commite3b813658a576f8b9a0f526664e448ce18c5fcb6
treeb794acd381033851dd944b97aa3fe02e740e34b5
parente5b365f9660124bc355b197180b85a5440595d26
mm: fix type cast in __pfn_to_phys()

Orabug: 22913653

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 012dcef3f058 "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: kernelci.org bot <bot@kernelci.org>
Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
(cherry picked from commit ae4f976968896f8f41b3a7aa21be6146492211e5)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
include/asm-generic/memory_model.h