mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
memblock: Allow memblock_init to be called early
The Xen setup code needs to call memblock_x86_reserve_range() very early, so allow it to initialize the memblock subsystem before doing so. The second memblock_init() is ignored. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
This commit is contained in:
parent
153db80f8c
commit
236260b90d
2 changed files with 9 additions and 0 deletions
|
|
@ -752,6 +752,12 @@ void __init memblock_analyze(void)
|
|||
|
||||
void __init memblock_init(void)
|
||||
{
|
||||
static int init_done __initdata = 0;
|
||||
|
||||
if (init_done)
|
||||
return;
|
||||
init_done = 1;
|
||||
|
||||
/* Hookup the initial arrays */
|
||||
memblock.memory.regions = memblock_memory_init_regions;
|
||||
memblock.memory.max = INIT_MEMBLOCK_REGIONS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue