diff options
author | Tyler Baker <tyler.baker@linaro.org> | 2015-09-19 10:58:10 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-09-19 10:58:10 +0300 |
commit | ae4f976968896f8f41b3a7aa21be6146492211e5 (patch) | |
tree | f6c0c419fa28b53a1921f49c4cd54a0bf5653772 | |
parent | ba8fe0f85e15d047686caf8a42463b592c63c98c (diff) | |
download | linux-ae4f976968896f8f41b3a7aa21be6146492211e5.tar.xz |
mm: fix type cast in __pfn_to_phys()
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>
-rw-r--r-- | include/asm-generic/memory_model.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index f20f407ce45d..4b4b056a6eb0 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h @@ -73,7 +73,7 @@ * Convert a physical address to a Page Frame Number and back */ #define __phys_to_pfn(paddr) ((unsigned long)((paddr) >> PAGE_SHIFT)) -#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) +#define __pfn_to_phys(pfn) PFN_PHYS(pfn) #define page_to_pfn __page_to_pfn #define pfn_to_page __pfn_to_page |