diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-01-18 16:52:20 -0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-01-18 16:52:20 -0800 |
commit | bd86d2ea369be2e768b58cba590e70b8bdc6f86a (patch) | |
tree | 4cd68e21041237c0a4d7e0299f9bb3eeb1ac1e2c /mm | |
parent | 19fa92fb72f8bc542f1673862058f3b078114004 (diff) | |
parent | 5dc4c995db9eb45f6373a956eb1f69460e69e6d4 (diff) |
Sync with v6.2-rc4
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memblock.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index d036c7861310..685e30e6d27c 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1640,7 +1640,13 @@ void __init memblock_free_late(phys_addr_t base, phys_addr_t size) end = PFN_DOWN(base + size); for (; cursor < end; cursor++) { - memblock_free_pages(pfn_to_page(cursor), cursor, 0); + /* + * Reserved pages are always initialized by the end of + * memblock_free_all() (by memmap_init() and, if deferred + * initialization is enabled, memmap_init_reserved_pages()), so + * these pages can be released directly to the buddy allocator. + */ + __free_pages_core(pfn_to_page(cursor), 0); totalram_pages_inc(); } } |