Skip to content

Commit de4cf3d

Browse files
ozbenhmpe
authored andcommitted
powerpc: Move 64-bit memory reserves to setup_arch()
There is really no need to do them that early, early_setup() runs before MMU is on, we should do the strict minimum there to get the MMU going. Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent c4bd6cb commit de4cf3d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

arch/powerpc/kernel/setup_64.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -295,16 +295,6 @@ void __init early_setup(unsigned long dt_ptr)
295295
*/
296296
cpu_ready_for_interrupts();
297297

298-
/* Reserve large chunks of memory for use by CMA for KVM */
299-
kvm_cma_reserve();
300-
301-
/*
302-
* Reserve any gigantic pages requested on the command line.
303-
* memblock needs to have been initialized by the time this is
304-
* called since this will reserve memory.
305-
*/
306-
reserve_hugetlb_gpages();
307-
308298
DBG(" <- early_setup()\n");
309299

310300
#ifdef CONFIG_PPC_EARLY_DEBUG_BOOTX
@@ -687,6 +677,17 @@ void __init setup_arch(char **cmdline_p)
687677
dcache_bsize = ppc64_caches.dline_size;
688678
icache_bsize = ppc64_caches.iline_size;
689679

680+
681+
/* Reserve large chunks of memory for use by CMA for KVM */
682+
kvm_cma_reserve();
683+
684+
/*
685+
* Reserve any gigantic pages requested on the command line.
686+
* memblock needs to have been initialized by the time this is
687+
* called since this will reserve memory.
688+
*/
689+
reserve_hugetlb_gpages();
690+
690691
if (ppc_md.panic)
691692
setup_panic();
692693

@@ -711,7 +712,6 @@ void __init setup_arch(char **cmdline_p)
711712
#ifdef CONFIG_DUMMY_CONSOLE
712713
conswitchp = &dummy_con;
713714
#endif
714-
715715
if (ppc_md.setup_arch)
716716
ppc_md.setup_arch();
717717

0 commit comments

Comments
 (0)