diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/mm/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index e769d2726f4e..ddcd39ef4346 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -62,6 +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 int order; struct page *page; int i; @@ -70,7 +71,7 @@ static void __init setup_zero_pages(void) order = 7; /* Limit number of empty zero pages for small memory sizes */ - while (order > 2 && (totalram_pages() >> 10) < (1UL << order)) + while (order > 2 && (total_pages >> 10) < (1UL << order)) order--; empty_zero_page = __get_free_pages(GFP_KERNEL | __GFP_ZERO, order); |