[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1311694534-5161-22-git-send-email-tj@kernel.org>
Date: Tue, 26 Jul 2011 17:35:32 +0200
From: Tejun Heo <tj@...nel.org>
To: benh@...nel.crashing.org, yinghai@...nel.org, hpa@...or.com,
tony.luck@...el.com, ralf@...ux-mips.org, schwidefsky@...ibm.com,
liqin.chen@...plusct.com, lethal@...ux-sh.org, davem@...emloft.net,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Cc: mingo@...hat.com, Tejun Heo <tj@...nel.org>,
Lennox Wu <lennox.wu@...il.com>
Subject: [PATCH 21/23] score: Use HAVE_MEMBLOCK_NODE_MAP
score used early_node_map[] just to prime free_area_init_nodes(). Now
memblock can be used for the same purpose and early_node_map[] is
scheduled to be dropped. Use memblock instead.
While at it, replace 7 space indentations w/ tabs.
Signed-off-by: Tejun Heo <tj@...nel.org>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Yinghai Lu <yinghai@...nel.org>
Cc: Chen Liqin <liqin.chen@...plusct.com>
Cc: Lennox Wu <lennox.wu@...il.com>
---
Sorry, not even compile tested. Couldn't find working cross compiler.
arch/score/Kconfig | 9 ++++++---
arch/score/kernel/setup.c | 4 +++-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 288add8..bbd0f91 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -1,9 +1,12 @@
menu "Machine selection"
config SCORE
- def_bool y
- select HAVE_GENERIC_HARDIRQS
- select GENERIC_IRQ_SHOW
+ def_bool y
+ select HAVE_GENERIC_HARDIRQS
+ select GENERIC_IRQ_SHOW
+ select HAVE_MEMBLOCK
+ select HAVE_MEMBLOCK_NODE_MAP
+ select ARCH_DISCARD_MEMBLOCK
choice
prompt "System type"
diff --git a/arch/score/kernel/setup.c b/arch/score/kernel/setup.c
index 6f898c0..b48459a 100644
--- a/arch/score/kernel/setup.c
+++ b/arch/score/kernel/setup.c
@@ -26,6 +26,7 @@
#include <linux/bootmem.h>
#include <linux/initrd.h>
#include <linux/ioport.h>
+#include <linux/memblock.h>
#include <linux/mm.h>
#include <linux/seq_file.h>
#include <linux/screen_info.h>
@@ -54,7 +55,8 @@ static void __init bootmem_init(void)
/* Initialize the boot-time allocator with low memory only. */
bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
min_low_pfn, max_low_pfn);
- add_active_range(0, min_low_pfn, max_low_pfn);
+ memblock_add_node(PFN_PHYS(min_low_pfn),
+ PFN_PHYS(max_low_pfn - min_low_pfn), 0);
free_bootmem(PFN_PHYS(start_pfn),
(max_low_pfn - start_pfn) << PAGE_SHIFT);
--
1.7.6
--
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