diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-17 11:48:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-17 11:48:04 -0700 |
commit | edb0a20009363ae787bfe0d6fd52abb504f05113 (patch) | |
tree | c13438c3fd1896a9f43af1c33894599ff70d1629 /arch/arm64/mm | |
parent | 5e2d059b52e397d9ac42f4c4d9d9a841887b5818 (diff) | |
parent | 5ad356eabc47d26a92140a0c4b20eba471c10de3 (diff) | |
download | linux-stable-edb0a20009363ae787bfe0d6fd52abb504f05113.tar.gz linux-stable-edb0a20009363ae787bfe0d6fd52abb504f05113.tar.bz2 linux-stable-edb0a20009363ae787bfe0d6fd52abb504f05113.zip |
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon:
"A couple of arm64 fixes
- Fix boot on Hikey-960 by avoiding an IPI with interrupts disabled
- Fix address truncation in pfn_valid() implementation"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: mm: check for upper PAGE_SHIFT bits in pfn_valid()
arm64: Avoid calling stop_machine() when patching jump labels
Diffstat (limited to 'arch/arm64/mm')
-rw-r--r-- | arch/arm64/mm/init.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 9abf8a1e7b25..787e27964ab9 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -287,7 +287,11 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) #ifdef CONFIG_HAVE_ARCH_PFN_VALID int pfn_valid(unsigned long pfn) { - return memblock_is_map_memory(pfn << PAGE_SHIFT); + phys_addr_t addr = pfn << PAGE_SHIFT; + + if ((addr >> PAGE_SHIFT) != pfn) + return 0; + return memblock_is_map_memory(addr); } EXPORT_SYMBOL(pfn_valid); #endif |