[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1273484339-28911-17-git-send-email-benh@kernel.crashing.org>
Date: Mon, 10 May 2010 19:38:50 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, tglx@...uxtronix.de, mingo@...e.hu,
davem@...emloft.net, lethal@...ux-sh.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: [PATCH 16/25] lmb: Move lmb_init() to the bottom of the file
It's a real PITA to have to search for it in the middle
Signed-off-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>
---
lib/lmb.c | 54 +++++++++++++++++++++++++++---------------------------
1 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/lib/lmb.c b/lib/lmb.c
index 9fd0145..141d4ab 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -107,33 +107,6 @@ static void lmb_coalesce_regions(struct lmb_type *type,
lmb_remove_region(type, r2);
}
-void __init lmb_init(void)
-{
- /* Hookup the initial arrays */
- lmb.memory.regions = lmb_memory_init_regions;
- lmb.memory.max = INIT_LMB_REGIONS;
- lmb.reserved.regions = lmb_reserved_init_regions;
- lmb.reserved.max = INIT_LMB_REGIONS;
-
- /* Write a marker in the unused last array entry */
- lmb.memory.regions[INIT_LMB_REGIONS].base = (phys_addr_t)RED_INACTIVE;
- lmb.reserved.regions[INIT_LMB_REGIONS].base = (phys_addr_t)RED_INACTIVE;
-
- /* Create a dummy zero size LMB which will get coalesced away later.
- * This simplifies the lmb_add() code below...
- */
- lmb.memory.regions[0].base = 0;
- lmb.memory.regions[0].size = 0;
- lmb.memory.cnt = 1;
-
- /* Ditto. */
- lmb.reserved.regions[0].base = 0;
- lmb.reserved.regions[0].size = 0;
- lmb.reserved.cnt = 1;
-
- lmb.current_limit = LMB_ALLOC_ANYWHERE;
-}
-
void __init lmb_analyze(void)
{
int i;
@@ -517,3 +490,30 @@ void __init lmb_set_current_limit(phys_addr_t limit)
lmb.current_limit = limit;
}
+void __init lmb_init(void)
+{
+ /* Hookup the initial arrays */
+ lmb.memory.regions = lmb_memory_init_regions;
+ lmb.memory.max = INIT_LMB_REGIONS;
+ lmb.reserved.regions = lmb_reserved_init_regions;
+ lmb.reserved.max = INIT_LMB_REGIONS;
+
+ /* Write a marker in the unused last array entry */
+ lmb.memory.regions[INIT_LMB_REGIONS].base = (phys_addr_t)RED_INACTIVE;
+ lmb.reserved.regions[INIT_LMB_REGIONS].base = (phys_addr_t)RED_INACTIVE;
+
+ /* Create a dummy zero size LMB which will get coalesced away later.
+ * This simplifies the lmb_add() code below...
+ */
+ lmb.memory.regions[0].base = 0;
+ lmb.memory.regions[0].size = 0;
+ lmb.memory.cnt = 1;
+
+ /* Ditto. */
+ lmb.reserved.regions[0].base = 0;
+ lmb.reserved.regions[0].size = 0;
+ lmb.reserved.cnt = 1;
+
+ lmb.current_limit = LMB_ALLOC_ANYWHERE;
+}
+
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists