lkml.org 
[lkml]   [2013]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 4/6] ARM, mm: don't do arm_bootmem_init() if CONFIG_NO_BOOTMEM
Date
arm_bootmem_init() initialize a bitmap for bootmem and
it is not needed for CONFIG_NO_BOOTMEM.
So skip it when CONFIG_NO_BOOTMEM.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index ad722f1..049414a 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -149,6 +149,12 @@ static void __init find_limits(unsigned long *min, unsigned long *max_low,
*max_high = bank_pfn_end(&mi->bank[mi->nr_banks - 1]);
}

+#ifdef CONFIG_NO_BOOTMEM
+static inline void __init arm_bootmem_init(unsigned long start_pfn,
+ unsigned long end_pfn)
+{
+}
+#else
static void __init arm_bootmem_init(unsigned long start_pfn,
unsigned long end_pfn)
{
@@ -169,7 +175,6 @@ static void __init arm_bootmem_init(unsigned long start_pfn,
* Initialise the bootmem allocator, handing the
* memory banks over to bootmem.
*/
- node_set_online(0);
pgdat = NODE_DATA(0);
init_bootmem_node(pgdat, __phys_to_pfn(bitmap), start_pfn, end_pfn);

@@ -200,6 +205,7 @@ static void __init arm_bootmem_init(unsigned long start_pfn,
(end - start) << PAGE_SHIFT, BOOTMEM_DEFAULT);
}
}
+#endif

#ifdef CONFIG_ZONE_DMA

@@ -392,6 +398,7 @@ void __init bootmem_init(void)

find_limits(&min, &max_low, &max_high);

+ node_set_online(0);
arm_bootmem_init(min, max_low);

/*
--
1.7.9.5


\
 
 \ /
  Last update: 2013-03-25 05:41    [W:0.823 / U:1.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site