Skip to content

Commit aa282a1

Browse files
Ma Wupengakpm00
authored andcommitted
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/[email protected] Signed-off-by: Ma Wupeng <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 3c9fe8b commit aa282a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7821,7 +7821,7 @@ static void __init find_zone_movable_pfns_for_nodes(void)
78217821

78227822
usable_startpfn = memblock_region_memory_base_pfn(r);
78237823

7824-
if (usable_startpfn < 0x100000) {
7824+
if (usable_startpfn < PHYS_PFN(SZ_4G)) {
78257825
mem_below_4gb_not_mirrored = true;
78267826
continue;
78277827
}

0 commit comments

Comments
 (0)