diff options
author | Wei Yang <richard.weiyang@gmail.com> | 2024-05-07 07:58:32 +0000 |
---|---|---|
committer | Mike Rapoport (IBM) <rppt@kernel.org> | 2024-06-05 10:22:22 +0300 |
commit | b73f6b98bbd0b4c1fdcebc0c5b926349455035bf (patch) | |
tree | 630141cc011f2e40191a76e8839840808b216fbd /mm/memblock.c | |
parent | 1eb0a28d039a479bb4adec0320592caf5bd5175b (diff) |
mm/memblock: use PAGE_ALIGN_DOWN to get pgend in free_memmap
Leverage the macro PAGE_ALIGN_DOWN to get pgend.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Link: https://lore.kernel.org/r/20240507075833.6346-7-richard.weiyang@gmail.com
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r-- | mm/memblock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index da9a6c862a69..33a8b6f7b626 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -2039,7 +2039,7 @@ static void __init free_memmap(unsigned long start_pfn, unsigned long end_pfn) * downwards. */ pg = PAGE_ALIGN(__pa(start_pg)); - pgend = __pa(end_pg) & PAGE_MASK; + pgend = PAGE_ALIGN_DOWN(__pa(end_pg)); /* * If there are free pages between these, free the section of the |