mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
sparc: introduce arch_zone_limits_init()
Move calculations of zone limits to a dedicated arch_zone_limits_init() function. Later MM core will use this function as an architecture specific callback during nodes and zones initialization and thus there won't be a need to call free_area_init() from every architecture. Link: https://lkml.kernel.org/r/20260111082105.290734-20-rppt@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Acked-by: Andreas Larsson <andreas@gaisler.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Alex Shi <alexs@kernel.org> Cc: "Borislav Petkov (AMD)" <bp@alien8.de> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: David Hildenbrand <david@kernel.org> Cc: David S. Miller <davem@davemloft.net> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Guo Ren <guoren@kernel.org> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Helge Deller <deller@gmx.de> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Klara Modin <klarasmodin@gmail.com> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Magnus Lindholm <linmag7@gmail.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Hocko <mhocko@suse.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Muchun Song <muchun.song@linux.dev> Cc: Oscar Salvador <osalvador@suse.de> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Pratyush Yadav <pratyush@kernel.org> Cc: Richard Weinberger <richard@nod.at> Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Stafford Horne <shorne@gmail.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Vineet Gupta <vgupta@kernel.org> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
8bfa6c2259
commit
6ad7ea22cf
|
|
@ -2279,6 +2279,11 @@ static void __init reduce_memory(phys_addr_t limit_ram)
|
|||
memblock_enforce_memory_limit(limit_ram);
|
||||
}
|
||||
|
||||
void __init arch_zone_limits_init(unsigned long *max_zone_pfns)
|
||||
{
|
||||
max_zone_pfns[ZONE_NORMAL] = last_valid_pfn;
|
||||
}
|
||||
|
||||
void __init paging_init(void)
|
||||
{
|
||||
unsigned long end_pfn, shift, phys_base;
|
||||
|
|
@ -2461,6 +2466,7 @@ void __init paging_init(void)
|
|||
|
||||
max_zone_pfns[ZONE_NORMAL] = end_pfn;
|
||||
|
||||
arch_zone_limits_init(max_zone_pfns);
|
||||
free_area_init(max_zone_pfns);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -884,6 +884,13 @@ static void __init map_kernel(void)
|
|||
|
||||
void (*poke_srmmu)(void) = NULL;
|
||||
|
||||
void __init arch_zone_limits_init(unsigned long *max_zone_pfns)
|
||||
{
|
||||
max_zone_pfns[ZONE_DMA] = max_low_pfn;
|
||||
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
|
||||
max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
|
||||
}
|
||||
|
||||
void __init srmmu_paging_init(void)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -967,10 +974,7 @@ void __init srmmu_paging_init(void)
|
|||
{
|
||||
unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
|
||||
|
||||
max_zone_pfn[ZONE_DMA] = max_low_pfn;
|
||||
max_zone_pfn[ZONE_NORMAL] = max_low_pfn;
|
||||
max_zone_pfn[ZONE_HIGHMEM] = highend_pfn;
|
||||
|
||||
arch_zone_limits_init(max_zone_pfn);
|
||||
free_area_init(max_zone_pfn);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user