]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hexagon: move initialization of init_mm.context init to paging_init()
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Thu, 13 Mar 2025 13:49:53 +0000 (15:49 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Mar 2025 05:06:51 +0000 (22:06 -0700)
This will help with pulling out memblock_free_all() to the generic
code and reducing code duplication in arch::mem_init().

Link: https://lkml.kernel.org/r/20250313135003.836600-4-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Betkov <bp@alien8.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: Guo Ren (csky) <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: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russel King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleinxer <tglx@linutronix.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/hexagon/mm/init.c

index 3458f39ca2ac20862b2a5e8168fe227fa0cb6a79..508bb6a8dcc9057cb471834858e6d2ad95777d2f 100644 (file)
@@ -59,14 +59,6 @@ void __init mem_init(void)
         *  To-Do:  someone somewhere should wipe out the bootmem map
         *  after we're done?
         */
-
-       /*
-        * This can be moved to some more virtual-memory-specific
-        * initialization hook at some point.  Set the init_mm
-        * descriptors "context" value to point to the initial
-        * kernel segment table's physical address.
-        */
-       init_mm.context.ptbase = __pa(init_mm.pgd);
 }
 
 void sync_icache_dcache(pte_t pte)
@@ -103,6 +95,12 @@ static void __init paging_init(void)
 
        free_area_init(max_zone_pfn);  /*  sets up the zonelists and mem_map  */
 
+       /*
+        * Set the init_mm descriptors "context" value to point to the
+        * initial kernel segment table's physical address.
+        */
+       init_mm.context.ptbase = __pa(init_mm.pgd);
+
        /*
         * Start of high memory area.  Will probably need something more
         * fancy if we...  get more fancy.