From: "Mike Rapoport (Microsoft)" <r...@kernel.org>

This will help with pulling out memblock_free_all() to the generic
code and reducing code duplication in arch::mem_init().

Signed-off-by: Mike Rapoport (Microsoft) <r...@kernel.org>
---
 arch/hexagon/mm/init.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/hexagon/mm/init.c b/arch/hexagon/mm/init.c
index 3458f39ca2ac..508bb6a8dcc9 100644
--- a/arch/hexagon/mm/init.c
+++ b/arch/hexagon/mm/init.c
@@ -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.
-- 
2.47.2


Reply via email to