[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201101170454.9567-5-rppt@kernel.org>
Date: Sun, 1 Nov 2020 19:04:45 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Greg Ungerer <gerg@...ux-m68k.org>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
Jonathan Corbet <corbet@....net>,
Matt Turner <mattst88@...il.com>, Meelis Roos <mroos@...ux.ee>,
Michael Schmitz <schmitzmic@...il.com>,
Mike Rapoport <rppt@...nel.org>,
Mike Rapoport <rppt@...ux.ibm.com>,
Russell King <linux@...linux.org.uk>,
Tony Luck <tony.luck@...el.com>,
Vineet Gupta <vgupta@...opsys.com>,
Will Deacon <will@...nel.org>, linux-alpha@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-ia64@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-mm@...ck.org, linux-snps-arc@...ts.infradead.org
Subject: [PATCH v2 04/13] ia64: discontig: paging_init(): remove local max_pfn calculation
From: Mike Rapoport <rppt@...ux.ibm.com>
The maximal PFN in the system is calculated during find_memory() time and
it is stored at max_low_pfn then.
Use this value in paging_init() and remove the redundant detection of
max_pfn in that function.
Signed-off-by: Mike Rapoport <rppt@...ux.ibm.com>
---
arch/ia64/mm/discontig.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index d255596f52c6..f41dcf75887b 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -594,7 +594,6 @@ void __init paging_init(void)
{
unsigned long max_dma;
unsigned long pfn_offset = 0;
- unsigned long max_pfn = 0;
int node;
unsigned long max_zone_pfns[MAX_NR_ZONES];
@@ -616,13 +615,11 @@ void __init paging_init(void)
#ifdef CONFIG_VIRTUAL_MEM_MAP
NODE_DATA(node)->node_mem_map = vmem_map + pfn_offset;
#endif
- if (mem_data[node].max_pfn > max_pfn)
- max_pfn = mem_data[node].max_pfn;
}
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
max_zone_pfns[ZONE_DMA32] = max_dma;
- max_zone_pfns[ZONE_NORMAL] = max_pfn;
+ max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
free_area_init(max_zone_pfns);
zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page));
--
2.28.0
Powered by blists - more mailing lists