summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-01-19 01:52:20 +0100
committerAndrew Morton <akpm@linux-foundation.org>2023-01-19 01:52:20 +0100
commitbd86d2ea369be2e768b58cba590e70b8bdc6f86a (patch)
tree4cd68e21041237c0a4d7e0299f9bb3eeb1ac1e2c /mm
parentinit/Kconfig: fix typo (usafe -> unsafe) (diff)
parentLinux 6.2-rc4 (diff)
downloadlinux-bd86d2ea369be2e768b58cba590e70b8bdc6f86a.tar.xz
linux-bd86d2ea369be2e768b58cba590e70b8bdc6f86a.zip
Sync with v6.2-rc4
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'mm')
-rw-r--r--mm/memblock.c8
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();
}
}