summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2024-08-08 02:14:15 +0200
committerMike Rapoport (Microsoft) <rppt@kernel.org>2024-08-11 18:19:07 +0200
commitcb088e38aab4c7e9ce711c18c66e851c8f4227bb (patch)
treede02ccc76de2f61d6a93fffbf1d71fc22002d617 /arch
parentkernel/fork.c: get estimated free pages by memblock api (diff)
downloadlinux-cb088e38aab4c7e9ce711c18c66e851c8f4227bb.tar.xz
linux-cb088e38aab4c7e9ce711c18c66e851c8f4227bb.zip
s390/mm: get estimated free pages by memblock api
Instead of getting estimated free pages from memblock directly, we have introduced an API, memblock_estimated_nr_free_pages(), which is more friendly for users. Just replace it with new API, no functional change. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> CC: Mike Rapoport <rppt@kernel.org> CC: David Hildenbrand <david@redhat.com> Acked-by: David Hildenbrand <david@redhat.com> Link: https://lore.kernel.org/r/20240808001415.6298-3-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/mm/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index e3d258f9e726..651344206294 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -62,7 +62,7 @@ EXPORT_SYMBOL(zero_page_mask);
static void __init setup_zero_pages(void)
{
- unsigned long total_pages = PHYS_PFN(memblock_phys_mem_size() - memblock_reserved_size());
+ unsigned long total_pages = memblock_estimated_nr_free_pages();
unsigned int order;
struct page *page;
int i;