mm/page_alloc.c: calc the right pfn if page size is not 4K
authorMa Wupeng <mawupeng1@huawei.com>
Fri, 29 Apr 2022 06:16:14 +0000 (23:16 -0700)
committerakpm <akpm@linux-foundation.org>
Fri, 29 Apr 2022 06:16:14 +0000 (23:16 -0700)
commitaa282a157bf8ff79bed9164dc5e0e99f0d9e9755
tree02a7dcaf9db2775c8181fecc5c69de8a8abd626f
parent3c9fe8b8f5e3e30bfa81eeeff4bc34c0fb67b739
mm/page_alloc.c: calc the right pfn if page size is not 4K

Previous 0x100000 is used to check the 4G limit in
find_zone_movable_pfns_for_nodes().  This is right in x86 because the page
size can only be 4K.  But 16K and 64K are available in arm64.  So replace
it with PHYS_PFN(SZ_4G).

Link: https://lkml.kernel.org/r/20220414101314.1250667-8-mawupeng1@huawei.com
Signed-off-by: Ma Wupeng <mawupeng1@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c