All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mm: avoid duplication of setup_nr_node_ids()
@ 2013-03-26 17:45 ` Cody P Schafer
  0 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:45 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linuxppc-dev, Cody P Schafer, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

In arch/powerpc, arch/x86, and mm/page_alloc code to setup nr_node_ids based on
node_possible_map is duplicated.

This patchset switches those copies to calling the function provided by page_alloc.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 0/3] mm: avoid duplication of setup_nr_node_ids()
@ 2013-03-26 17:45 ` Cody P Schafer
  0 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:45 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linuxppc-dev, Cody P Schafer, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

In arch/powerpc, arch/x86, and mm/page_alloc code to setup nr_node_ids based on
node_possible_map is duplicated.

This patchset switches those copies to calling the function provided by page_alloc.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 0/3] mm: avoid duplication of setup_nr_node_ids()
@ 2013-03-26 17:45 ` Cody P Schafer
  0 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:45 UTC (permalink / raw)
  To: linux-mm
  Cc: linuxppc-dev, linux-kernel, Ingo Molnar, Paul Mackerras,
	H. Peter Anvin, Andrew Morton, Cody P Schafer, Thomas Gleixner

In arch/powerpc, arch/x86, and mm/page_alloc code to setup nr_node_ids based on
node_possible_map is duplicated.

This patchset switches those copies to calling the function provided by page_alloc.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/3] page_alloc: make setup_nr_node_ids() usable for arch init code
  2013-03-26 17:45 ` Cody P Schafer
  (?)
@ 2013-03-26 17:46   ` Cody P Schafer
  -1 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:46 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linuxppc-dev, Cody P Schafer, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

powerpc and x86 were opencoding copies of setup_nr_node_ids(), which
page_alloc provides but makes static. Make it avaliable to the archs in
linux/mm.h.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 include/linux/mm.h | 6 ++++++
 mm/page_alloc.c    | 6 +-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7acc9dc..3405405 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1755,5 +1755,11 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; }
 static inline bool page_is_guard(struct page *page) { return false; }
 #endif /* CONFIG_DEBUG_PAGEALLOC */
 
+#if MAX_NUMNODES > 1
+void __init setup_nr_node_ids(void);
+#else
+static inline void setup_nr_node_ids(void) {}
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_H */
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8fcced7..96909bb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4710,7 +4710,7 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
 /*
  * Figure out the number of possible node ids.
  */
-static void __init setup_nr_node_ids(void)
+void __init setup_nr_node_ids(void)
 {
 	unsigned int node;
 	unsigned int highest = 0;
@@ -4719,10 +4719,6 @@ static void __init setup_nr_node_ids(void)
 		highest = node;
 	nr_node_ids = highest + 1;
 }
-#else
-static inline void setup_nr_node_ids(void)
-{
-}
 #endif
 
 /**
-- 
1.8.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 1/3] page_alloc: make setup_nr_node_ids() usable for arch init code
@ 2013-03-26 17:46   ` Cody P Schafer
  0 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:46 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linuxppc-dev, Cody P Schafer, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

powerpc and x86 were opencoding copies of setup_nr_node_ids(), which
page_alloc provides but makes static. Make it avaliable to the archs in
linux/mm.h.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 include/linux/mm.h | 6 ++++++
 mm/page_alloc.c    | 6 +-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7acc9dc..3405405 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1755,5 +1755,11 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; }
 static inline bool page_is_guard(struct page *page) { return false; }
 #endif /* CONFIG_DEBUG_PAGEALLOC */
 
+#if MAX_NUMNODES > 1
+void __init setup_nr_node_ids(void);
+#else
+static inline void setup_nr_node_ids(void) {}
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_H */
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8fcced7..96909bb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4710,7 +4710,7 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
 /*
  * Figure out the number of possible node ids.
  */
-static void __init setup_nr_node_ids(void)
+void __init setup_nr_node_ids(void)
 {
 	unsigned int node;
 	unsigned int highest = 0;
@@ -4719,10 +4719,6 @@ static void __init setup_nr_node_ids(void)
 		highest = node;
 	nr_node_ids = highest + 1;
 }
-#else
-static inline void setup_nr_node_ids(void)
-{
-}
 #endif
 
 /**
-- 
1.8.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 1/3] page_alloc: make setup_nr_node_ids() usable for arch init code
@ 2013-03-26 17:46   ` Cody P Schafer
  0 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:46 UTC (permalink / raw)
  To: linux-mm
  Cc: linuxppc-dev, linux-kernel, Ingo Molnar, Paul Mackerras,
	H. Peter Anvin, Andrew Morton, Cody P Schafer, Thomas Gleixner

powerpc and x86 were opencoding copies of setup_nr_node_ids(), which
page_alloc provides but makes static. Make it avaliable to the archs in
linux/mm.h.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 include/linux/mm.h | 6 ++++++
 mm/page_alloc.c    | 6 +-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7acc9dc..3405405 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1755,5 +1755,11 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; }
 static inline bool page_is_guard(struct page *page) { return false; }
 #endif /* CONFIG_DEBUG_PAGEALLOC */
 
+#if MAX_NUMNODES > 1
+void __init setup_nr_node_ids(void);
+#else
+static inline void setup_nr_node_ids(void) {}
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_H */
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8fcced7..96909bb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4710,7 +4710,7 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
 /*
  * Figure out the number of possible node ids.
  */
-static void __init setup_nr_node_ids(void)
+void __init setup_nr_node_ids(void)
 {
 	unsigned int node;
 	unsigned int highest = 0;
@@ -4719,10 +4719,6 @@ static void __init setup_nr_node_ids(void)
 		highest = node;
 	nr_node_ids = highest + 1;
 }
-#else
-static inline void setup_nr_node_ids(void)
-{
-}
 #endif
 
 /**
-- 
1.8.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
  2013-03-26 17:45 ` Cody P Schafer
  (?)
@ 2013-03-26 17:46   ` Cody P Schafer
  -1 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:46 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linuxppc-dev, Cody P Schafer, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 arch/x86/mm/numa.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 72fe01e..a71c4e2 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -114,14 +114,11 @@ void numa_clear_node(int cpu)
  */
 void __init setup_node_to_cpumask_map(void)
 {
-	unsigned int node, num = 0;
+	unsigned int node;
 
 	/* setup nr_node_ids if not done yet */
-	if (nr_node_ids == MAX_NUMNODES) {
-		for_each_node_mask(node, node_possible_map)
-			num = node;
-		nr_node_ids = num + 1;
-	}
+	if (nr_node_ids == MAX_NUMNODES)
+		setup_nr_node_ids();
 
 	/* allocate the map */
 	for (node = 0; node < nr_node_ids; node++)
-- 
1.8.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
@ 2013-03-26 17:46   ` Cody P Schafer
  0 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:46 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linuxppc-dev, Cody P Schafer, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 arch/x86/mm/numa.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 72fe01e..a71c4e2 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -114,14 +114,11 @@ void numa_clear_node(int cpu)
  */
 void __init setup_node_to_cpumask_map(void)
 {
-	unsigned int node, num = 0;
+	unsigned int node;
 
 	/* setup nr_node_ids if not done yet */
-	if (nr_node_ids == MAX_NUMNODES) {
-		for_each_node_mask(node, node_possible_map)
-			num = node;
-		nr_node_ids = num + 1;
-	}
+	if (nr_node_ids == MAX_NUMNODES)
+		setup_nr_node_ids();
 
 	/* allocate the map */
 	for (node = 0; node < nr_node_ids; node++)
-- 
1.8.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
@ 2013-03-26 17:46   ` Cody P Schafer
  0 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:46 UTC (permalink / raw)
  To: linux-mm
  Cc: linuxppc-dev, linux-kernel, Ingo Molnar, Paul Mackerras,
	H. Peter Anvin, Andrew Morton, Cody P Schafer, Thomas Gleixner

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 arch/x86/mm/numa.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 72fe01e..a71c4e2 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -114,14 +114,11 @@ void numa_clear_node(int cpu)
  */
 void __init setup_node_to_cpumask_map(void)
 {
-	unsigned int node, num = 0;
+	unsigned int node;
 
 	/* setup nr_node_ids if not done yet */
-	if (nr_node_ids == MAX_NUMNODES) {
-		for_each_node_mask(node, node_possible_map)
-			num = node;
-		nr_node_ids = num + 1;
-	}
+	if (nr_node_ids == MAX_NUMNODES)
+		setup_nr_node_ids();
 
 	/* allocate the map */
 	for (node = 0; node < nr_node_ids; node++)
-- 
1.8.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/3] powerpc/mm/numa: use setup_nr_node_ids() instead of opencoding.
  2013-03-26 17:45 ` Cody P Schafer
  (?)
@ 2013-03-26 17:46   ` Cody P Schafer
  -1 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:46 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linuxppc-dev, Cody P Schafer, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index bba87ca..7574ae3 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -62,14 +62,11 @@ static int distance_lookup_table[MAX_NUMNODES][MAX_DISTANCE_REF_POINTS];
  */
 static void __init setup_node_to_cpumask_map(void)
 {
-	unsigned int node, num = 0;
+	unsigned int node;
 
 	/* setup nr_node_ids if not done yet */
-	if (nr_node_ids == MAX_NUMNODES) {
-		for_each_node_mask(node, node_possible_map)
-			num = node;
-		nr_node_ids = num + 1;
-	}
+	if (nr_node_ids == MAX_NUMNODES)
+		setup_nr_node_ids()
 
 	/* allocate the map */
 	for (node = 0; node < nr_node_ids; node++)
-- 
1.8.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/3] powerpc/mm/numa: use setup_nr_node_ids() instead of opencoding.
@ 2013-03-26 17:46   ` Cody P Schafer
  0 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:46 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linuxppc-dev, Cody P Schafer, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index bba87ca..7574ae3 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -62,14 +62,11 @@ static int distance_lookup_table[MAX_NUMNODES][MAX_DISTANCE_REF_POINTS];
  */
 static void __init setup_node_to_cpumask_map(void)
 {
-	unsigned int node, num = 0;
+	unsigned int node;
 
 	/* setup nr_node_ids if not done yet */
-	if (nr_node_ids == MAX_NUMNODES) {
-		for_each_node_mask(node, node_possible_map)
-			num = node;
-		nr_node_ids = num + 1;
-	}
+	if (nr_node_ids == MAX_NUMNODES)
+		setup_nr_node_ids()
 
 	/* allocate the map */
 	for (node = 0; node < nr_node_ids; node++)
-- 
1.8.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/3] powerpc/mm/numa: use setup_nr_node_ids() instead of opencoding.
@ 2013-03-26 17:46   ` Cody P Schafer
  0 siblings, 0 replies; 18+ messages in thread
From: Cody P Schafer @ 2013-03-26 17:46 UTC (permalink / raw)
  To: linux-mm
  Cc: linuxppc-dev, linux-kernel, Ingo Molnar, Paul Mackerras,
	H. Peter Anvin, Andrew Morton, Cody P Schafer, Thomas Gleixner

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index bba87ca..7574ae3 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -62,14 +62,11 @@ static int distance_lookup_table[MAX_NUMNODES][MAX_DISTANCE_REF_POINTS];
  */
 static void __init setup_node_to_cpumask_map(void)
 {
-	unsigned int node, num = 0;
+	unsigned int node;
 
 	/* setup nr_node_ids if not done yet */
-	if (nr_node_ids == MAX_NUMNODES) {
-		for_each_node_mask(node, node_possible_map)
-			num = node;
-		nr_node_ids = num + 1;
-	}
+	if (nr_node_ids == MAX_NUMNODES)
+		setup_nr_node_ids()
 
 	/* allocate the map */
 	for (node = 0; node < nr_node_ids; node++)
-- 
1.8.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
  2013-03-26 17:46   ` Cody P Schafer
  (?)
@ 2013-03-26 17:56     ` Yinghai Lu
  -1 siblings, 0 replies; 18+ messages in thread
From: Yinghai Lu @ 2013-03-26 17:56 UTC (permalink / raw)
  To: Cody P Schafer
  Cc: linux-mm, linux-kernel, linuxppc-dev, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

On Tue, Mar 26, 2013 at 10:46 AM, Cody P Schafer
<cody@linux.vnet.ibm.com> wrote:
> Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
> ---
>  arch/x86/mm/numa.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> index 72fe01e..a71c4e2 100644
> --- a/arch/x86/mm/numa.c
> +++ b/arch/x86/mm/numa.c
> @@ -114,14 +114,11 @@ void numa_clear_node(int cpu)
>   */
>  void __init setup_node_to_cpumask_map(void)
>  {
> -       unsigned int node, num = 0;
> +       unsigned int node;
>
>         /* setup nr_node_ids if not done yet */
> -       if (nr_node_ids == MAX_NUMNODES) {
> -               for_each_node_mask(node, node_possible_map)
> -                       num = node;
> -               nr_node_ids = num + 1;
> -       }
> +       if (nr_node_ids == MAX_NUMNODES)
> +               setup_nr_node_ids();

For 1 and 2,

Acked-by: Yinghai Lu <yinghai@kernel.org>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
@ 2013-03-26 17:56     ` Yinghai Lu
  0 siblings, 0 replies; 18+ messages in thread
From: Yinghai Lu @ 2013-03-26 17:56 UTC (permalink / raw)
  To: Cody P Schafer
  Cc: linux-mm, linux-kernel, linuxppc-dev, Andrew Morton,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

On Tue, Mar 26, 2013 at 10:46 AM, Cody P Schafer
<cody@linux.vnet.ibm.com> wrote:
> Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
> ---
>  arch/x86/mm/numa.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> index 72fe01e..a71c4e2 100644
> --- a/arch/x86/mm/numa.c
> +++ b/arch/x86/mm/numa.c
> @@ -114,14 +114,11 @@ void numa_clear_node(int cpu)
>   */
>  void __init setup_node_to_cpumask_map(void)
>  {
> -       unsigned int node, num = 0;
> +       unsigned int node;
>
>         /* setup nr_node_ids if not done yet */
> -       if (nr_node_ids == MAX_NUMNODES) {
> -               for_each_node_mask(node, node_possible_map)
> -                       num = node;
> -               nr_node_ids = num + 1;
> -       }
> +       if (nr_node_ids == MAX_NUMNODES)
> +               setup_nr_node_ids();

For 1 and 2,

Acked-by: Yinghai Lu <yinghai@kernel.org>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
@ 2013-03-26 17:56     ` Yinghai Lu
  0 siblings, 0 replies; 18+ messages in thread
From: Yinghai Lu @ 2013-03-26 17:56 UTC (permalink / raw)
  To: Cody P Schafer
  Cc: linux-kernel, linux-mm, Ingo Molnar, Paul Mackerras,
	H. Peter Anvin, Andrew Morton, linuxppc-dev, Thomas Gleixner

On Tue, Mar 26, 2013 at 10:46 AM, Cody P Schafer
<cody@linux.vnet.ibm.com> wrote:
> Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
> ---
>  arch/x86/mm/numa.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> index 72fe01e..a71c4e2 100644
> --- a/arch/x86/mm/numa.c
> +++ b/arch/x86/mm/numa.c
> @@ -114,14 +114,11 @@ void numa_clear_node(int cpu)
>   */
>  void __init setup_node_to_cpumask_map(void)
>  {
> -       unsigned int node, num = 0;
> +       unsigned int node;
>
>         /* setup nr_node_ids if not done yet */
> -       if (nr_node_ids == MAX_NUMNODES) {
> -               for_each_node_mask(node, node_possible_map)
> -                       num = node;
> -               nr_node_ids = num + 1;
> -       }
> +       if (nr_node_ids == MAX_NUMNODES)
> +               setup_nr_node_ids();

For 1 and 2,

Acked-by: Yinghai Lu <yinghai@kernel.org>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
  2013-03-26 17:56     ` Yinghai Lu
  (?)
@ 2013-03-27 19:32       ` H. Peter Anvin
  -1 siblings, 0 replies; 18+ messages in thread
From: H. Peter Anvin @ 2013-03-27 19:32 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Cody P Schafer, linux-mm, linux-kernel, linuxppc-dev,
	Andrew Morton, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

On 03/26/2013 10:56 AM, Yinghai Lu wrote:
> 
> For 1 and 2,
> 
> Acked-by: Yinghai Lu <yinghai@kernel.org>
> 

Similarly:

Acked-by: H. Peter Anvin <hpa@linux.intel.com>

	-hpa


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
@ 2013-03-27 19:32       ` H. Peter Anvin
  0 siblings, 0 replies; 18+ messages in thread
From: H. Peter Anvin @ 2013-03-27 19:32 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Cody P Schafer, linux-mm, linux-kernel, linuxppc-dev,
	Andrew Morton, Ingo Molnar, Thomas Gleixner, Paul Mackerras,
	Benjamin Herrenschmidt

On 03/26/2013 10:56 AM, Yinghai Lu wrote:
> 
> For 1 and 2,
> 
> Acked-by: Yinghai Lu <yinghai@kernel.org>
> 

Similarly:

Acked-by: H. Peter Anvin <hpa@linux.intel.com>

	-hpa

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
@ 2013-03-27 19:32       ` H. Peter Anvin
  0 siblings, 0 replies; 18+ messages in thread
From: H. Peter Anvin @ 2013-03-27 19:32 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Cody P Schafer, linux-kernel, linux-mm, Ingo Molnar,
	Paul Mackerras, Andrew Morton, linuxppc-dev, Thomas Gleixner

On 03/26/2013 10:56 AM, Yinghai Lu wrote:
> 
> For 1 and 2,
> 
> Acked-by: Yinghai Lu <yinghai@kernel.org>
> 

Similarly:

Acked-by: H. Peter Anvin <hpa@linux.intel.com>

	-hpa

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-03-27 20:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-26 17:45 [PATCH 0/3] mm: avoid duplication of setup_nr_node_ids() Cody P Schafer
2013-03-26 17:45 ` Cody P Schafer
2013-03-26 17:45 ` Cody P Schafer
2013-03-26 17:46 ` [PATCH 1/3] page_alloc: make setup_nr_node_ids() usable for arch init code Cody P Schafer
2013-03-26 17:46   ` Cody P Schafer
2013-03-26 17:46   ` Cody P Schafer
2013-03-26 17:46 ` [PATCH 2/3] x86/mm/numa: use setup_nr_node_ids() instead of opencoding Cody P Schafer
2013-03-26 17:46   ` Cody P Schafer
2013-03-26 17:46   ` Cody P Schafer
2013-03-26 17:56   ` Yinghai Lu
2013-03-26 17:56     ` Yinghai Lu
2013-03-26 17:56     ` Yinghai Lu
2013-03-27 19:32     ` H. Peter Anvin
2013-03-27 19:32       ` H. Peter Anvin
2013-03-27 19:32       ` H. Peter Anvin
2013-03-26 17:46 ` [PATCH 3/3] powerpc/mm/numa: " Cody P Schafer
2013-03-26 17:46   ` Cody P Schafer
2013-03-26 17:46   ` Cody P Schafer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.