public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mm/srat_64.c: nodes_parsed should include all nodes detected by ACPI.
@ 2010-01-15  7:42 Haicheng Li
  2010-01-17  2:22 ` Haicheng Li
  2010-01-17 21:53 ` David Rientjes
  0 siblings, 2 replies; 26+ messages in thread
From: Haicheng Li @ 2010-01-15  7:42 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner
  Cc: x86, Andi Kleen, linux-kernel

This is to fix the bug discussed in email thread: http://patchwork.kernel.org/patch/69499/.

Currently node_possible_map won't include the offlined node that has neither CPU onlined nor MEM 
onlined at booting time. As a result, nr_node_ids won't be equal to possible nodes.

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: H. Peter Anvin <hpa@zytor.com>
CC: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
---
  arch/x86/mm/srat_64.c |   10 ++--------
  1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index a271241..a5bc297 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -238,7 +238,7 @@ update_nodes_add(int node, unsigned long start, unsigned long end)
  void __init
  acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
  {
-	struct bootnode *nd, oldnode;
+	struct bootnode *nd;
  	unsigned long start, end;
  	int node, pxm;
  	int i;
@@ -277,7 +277,6 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
  		return;
  	}
  	nd = &nodes[node];
-	oldnode = *nd;
  	if (!node_test_and_set(node, nodes_parsed)) {
  		nd->start = start;
  		nd->end = end;
@@ -291,13 +290,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
  	printk(KERN_INFO "SRAT: Node %u PXM %u %lx-%lx\n", node, pxm,
  	       start, end);

-	if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) {
+	if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)
  		update_nodes_add(node, start, end);
-		/* restore nodes[node] */
-		*nd = oldnode;
-		if ((nd->start | nd->end) == 0)
-			node_clear(node, nodes_parsed);
-	}

  	node_memblk_range[num_node_memblks].start = start;
  	node_memblk_range[num_node_memblks].end = end;

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

end of thread, other threads:[~2010-01-23  6:52 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15  7:42 [PATCH] x86/mm/srat_64.c: nodes_parsed should include all nodes detected by ACPI Haicheng Li
2010-01-17  2:22 ` Haicheng Li
2010-01-17 21:53 ` David Rientjes
2010-01-18  6:30   ` Yinghai Lu
2010-01-18 10:43     ` David Rientjes
2010-01-19 11:08       ` Haicheng Li
2010-01-19 11:29         ` Haicheng Li
2010-01-19 23:30         ` David Rientjes
2010-01-20 16:40           ` Haicheng Li
2010-01-20 20:10             ` [patch] x86: set hotpluggable nodes in nodes_possible_map David Rientjes
2010-01-20 22:45               ` Yinghai Lu
2010-01-20 23:32                 ` David Rientjes
2010-01-21  3:00                 ` Haicheng Li
2010-01-21  2:58               ` Haicheng Li
2010-01-21  6:58                 ` David Rientjes
2010-01-21  7:31                   ` Haicheng Li
2010-01-21  7:50                     ` David Rientjes
2010-01-21  8:33                       ` Haicheng Li
2010-01-21 23:12                         ` David Rientjes
2010-01-22  4:06                           ` [PATCH] x86/mm/srat_64.c: make node_possible_map include hotpluggable node Haicheng Li
2010-01-22  7:33                             ` H. Peter Anvin
2010-01-22  8:43                               ` Haicheng Li
2010-01-22 10:14                                 ` H. Peter Anvin
2010-01-22 10:35                                   ` Haicheng Li
2010-01-22 11:15               ` [tip:x86/urgent] x86: Set hotpluggable nodes in nodes_possible_map tip-bot for David Rientjes
2010-01-23  6:51               ` tip-bot for David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox