* [PATCH 19/23] mips: Use HAVE_MEMBLOCK_NODE_MAP
[not found] <1311694534-5161-1-git-send-email-tj@kernel.org>
@ 2011-07-26 15:35 ` Tejun Heo
2011-08-03 16:17 ` Ralf Baechle
0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2011-07-26 15:35 UTC (permalink / raw)
To: benh, yinghai, hpa, tony.luck, ralf, schwidefsky, liqin.chen,
lethal, davem, linux-kernel, linux-arch
Cc: mingo, Tejun Heo, linux-mips
mips 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.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
---
Only compile tested. Thanks.
arch/mips/Kconfig | 3 +++
arch/mips/kernel/setup.c | 3 ++-
arch/mips/sgi-ip27/ip27-memory.c | 5 +++--
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 653da62..368b2ec 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -24,6 +24,9 @@ config MIPS
select GENERIC_IRQ_PROBE
select GENERIC_IRQ_SHOW
select HAVE_ARCH_JUMP_LABEL
+ select HAVE_MEMBLOCK
+ select HAVE_MEMBLOCK_NODE_MAP
+ select ARCH_DISCARD_MEMBLOCK
menu "Machine selection"
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 8ad1d56..c25bce4 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -14,6 +14,7 @@
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/screen_info.h>
+#include <linux/memblock.h>
#include <linux/bootmem.h>
#include <linux/initrd.h>
#include <linux/root_dev.h>
@@ -352,7 +353,7 @@ static void __init bootmem_init(void)
continue;
#endif
- add_active_range(0, start, end);
+ memblock_add_node(PFN_PHYS(start), PFN_PHYS(end - start), 0);
}
/*
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index bc12971..b105eca 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -12,6 +12,7 @@
*/
#include <linux/init.h>
#include <linux/kernel.h>
+#include <linux/memblock.h>
#include <linux/mm.h>
#include <linux/mmzone.h>
#include <linux/module.h>
@@ -381,8 +382,8 @@ static void __init szmem(void)
continue;
}
num_physpages += slot_psize;
- add_active_range(node, slot_getbasepfn(node, slot),
- slot_getbasepfn(node, slot) + slot_psize);
+ memblock_add_node(PFN_PHYS(slot_getbasepfn(node, slot)),
+ PFN_PHYS(slot_psize), node);
}
}
}
--
1.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 19/23] mips: Use HAVE_MEMBLOCK_NODE_MAP
2011-07-26 15:35 ` [PATCH 19/23] mips: Use HAVE_MEMBLOCK_NODE_MAP Tejun Heo
@ 2011-08-03 16:17 ` Ralf Baechle
2011-08-03 16:26 ` Tejun Heo
0 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2011-08-03 16:17 UTC (permalink / raw)
To: Tejun Heo
Cc: benh, yinghai, hpa, tony.luck, schwidefsky, liqin.chen, lethal,
davem, linux-kernel, linux-arch, mingo, linux-mips
On Tue, Jul 26, 2011 at 05:35:30PM +0200, Tejun Heo wrote:
> mips 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.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Yinghai Lu <yinghai@kernel.org>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> ---
> Only compile tested. Thanks.
>
> arch/mips/Kconfig | 3 +++
> arch/mips/kernel/setup.c | 3 ++-
> arch/mips/sgi-ip27/ip27-memory.c | 5 +++--
> 3 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 653da62..368b2ec 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -24,6 +24,9 @@ config MIPS
> select GENERIC_IRQ_PROBE
> select GENERIC_IRQ_SHOW
> select HAVE_ARCH_JUMP_LABEL
> + select HAVE_MEMBLOCK
This means <linux/memblock.h> will include <asm/memblock.h> which does
not exist for MIPS. Did you accidentally not post this new file?
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 19/23] mips: Use HAVE_MEMBLOCK_NODE_MAP
2011-08-03 16:17 ` Ralf Baechle
@ 2011-08-03 16:26 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2011-08-03 16:26 UTC (permalink / raw)
To: Ralf Baechle
Cc: benh, yinghai, hpa, tony.luck, schwidefsky, liqin.chen, lethal,
davem, linux-kernel, linux-arch, mingo, linux-mips
On Wed, Aug 03, 2011 at 05:17:45PM +0100, Ralf Baechle wrote:
> On Tue, Jul 26, 2011 at 05:35:30PM +0200, Tejun Heo wrote:
>
> > mips 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.
> >
> > Signed-off-by: Tejun Heo <tj@kernel.org>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Yinghai Lu <yinghai@kernel.org>
> > Cc: Ralf Baechle <ralf@linux-mips.org>
> > Cc: linux-mips@linux-mips.org
> > ---
> > Only compile tested. Thanks.
> >
> > arch/mips/Kconfig | 3 +++
> > arch/mips/kernel/setup.c | 3 ++-
> > arch/mips/sgi-ip27/ip27-memory.c | 5 +++--
> > 3 files changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> > index 653da62..368b2ec 100644
> > --- a/arch/mips/Kconfig
> > +++ b/arch/mips/Kconfig
> > @@ -24,6 +24,9 @@ config MIPS
> > select GENERIC_IRQ_PROBE
> > select GENERIC_IRQ_SHOW
> > select HAVE_ARCH_JUMP_LABEL
> > + select HAVE_MEMBLOCK
>
> This means <linux/memblock.h> will include <asm/memblock.h> which does
> not exist for MIPS. Did you accidentally not post this new file?
Nope, earlier commit 24aa07882b and its fix patch (patch 0.5 in this
series) removes asm/memblock.h from all archs and drops it from
linux/memblock.h.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 19/23] mips: Use HAVE_MEMBLOCK_NODE_MAP
[not found] <1322508685-32532-1-git-send-email-tj@kernel.org>
@ 2011-11-28 19:31 ` Tejun Heo
2011-12-08 16:19 ` Ralf Baechle
0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2011-11-28 19:31 UTC (permalink / raw)
To: benh, yinghai, hpa, tony.luck, ralf, schwidefsky, liqin.chen,
lethal, davem, linux-kernel, linux-arch, mingo, jonas, lennox.wu
Cc: Tejun Heo, linux-mips
mips 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.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
---
arch/mips/Kconfig | 3 +++
arch/mips/kernel/setup.c | 3 ++-
arch/mips/sgi-ip27/ip27-memory.c | 5 +++--
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d46f1da..b789847 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -25,6 +25,9 @@ config MIPS
select GENERIC_IRQ_SHOW
select HAVE_ARCH_JUMP_LABEL
select IRQ_FORCED_THREADING
+ select HAVE_MEMBLOCK
+ select HAVE_MEMBLOCK_NODE_MAP
+ select ARCH_DISCARD_MEMBLOCK
menu "Machine selection"
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 84af26a..b1cb8f8 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -14,6 +14,7 @@
#include <linux/ioport.h>
#include <linux/export.h>
#include <linux/screen_info.h>
+#include <linux/memblock.h>
#include <linux/bootmem.h>
#include <linux/initrd.h>
#include <linux/root_dev.h>
@@ -352,7 +353,7 @@ static void __init bootmem_init(void)
continue;
#endif
- add_active_range(0, start, end);
+ memblock_add_node(PFN_PHYS(start), PFN_PHYS(end - start), 0);
}
/*
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index bc12971..b105eca 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -12,6 +12,7 @@
*/
#include <linux/init.h>
#include <linux/kernel.h>
+#include <linux/memblock.h>
#include <linux/mm.h>
#include <linux/mmzone.h>
#include <linux/module.h>
@@ -381,8 +382,8 @@ static void __init szmem(void)
continue;
}
num_physpages += slot_psize;
- add_active_range(node, slot_getbasepfn(node, slot),
- slot_getbasepfn(node, slot) + slot_psize);
+ memblock_add_node(PFN_PHYS(slot_getbasepfn(node, slot)),
+ PFN_PHYS(slot_psize), node);
}
}
}
--
1.7.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 19/23] mips: Use HAVE_MEMBLOCK_NODE_MAP
2011-11-28 19:31 ` Tejun Heo
@ 2011-12-08 16:19 ` Ralf Baechle
0 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2011-12-08 16:19 UTC (permalink / raw)
To: Tejun Heo
Cc: benh, yinghai, hpa, tony.luck, schwidefsky, liqin.chen, lethal,
davem, linux-kernel, linux-arch, mingo, jonas, lennox.wu,
linux-mips
On Mon, Nov 28, 2011 at 11:31:21AM -0800, Tejun Heo wrote:
> mips 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.
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Thanks,
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-08 16:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1311694534-5161-1-git-send-email-tj@kernel.org>
2011-07-26 15:35 ` [PATCH 19/23] mips: Use HAVE_MEMBLOCK_NODE_MAP Tejun Heo
2011-08-03 16:17 ` Ralf Baechle
2011-08-03 16:26 ` Tejun Heo
[not found] <1322508685-32532-1-git-send-email-tj@kernel.org>
2011-11-28 19:31 ` Tejun Heo
2011-12-08 16:19 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox