Skip to contentSkip to conversation

Fix bad_srat() to clear all state

PATCH In review Andi Kleen 1 participant 2 messages Jul 18, 2009 – Jul 22, 2009

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Fix bad_srat() to clear all state

Fix bad_srat() to clear all state

Need to clear both nodes and nodes_add state for start/end.

---
 arch/x86/mm/srat_64.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/x86/mm/srat_64.c +4 -2
Index: linux-2.6.31-rc3-ak/arch/x86/mm/srat_64.c
===================================================================
@@ -85,8 +85,10 @@ static __init void bad_srat(void)
 	acpi_numa = -1;
 	for (i = 0; i < MAX_LOCAL_APIC; i++)
 		apicid_to_node[i] = NUMA_NO_NODE;
-	for (i = 0; i < MAX_NUMNODES; i++)
-		nodes_add[i].start = nodes[i].end = 0;
+	for (i = 0; i < MAX_NUMNODES; i++) {
+		nodes[i].start = nodes[i].end = 0;
+		nodes_add[i].start = nodes_add[i].end = 0;
+	}
 	remove_all_active_ranges();
 }
 
#1 lore raw

[tip:x86/urgent] x86-64: Fix bad_srat() to clear all state

Commit-ID:  429b2b319af3987e808c18f6b81313104caf782c
Gitweb:     http://git.kernel.org/tip/429b2b319af3987e808c18f6b81313104caf782c
Author:     Andi Kleen <[email protected]>
AuthorDate: Sat, 18 Jul 2009 08:56:57 +0200
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Tue, 21 Jul 2009 15:20:01 -0700

x86-64: Fix bad_srat() to clear all state

Need to clear both nodes and nodes_add state for start/end.

LKML-Reference: <[email protected]>

---
 arch/x86/mm/srat_64.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/x86/mm/srat_64.c +4 -2
index 2dfcbf9..dbb5381 100644
@@ -79,8 +79,10 @@ static __init void bad_srat(void)
 	acpi_numa = -1;
 	for (i = 0; i < MAX_LOCAL_APIC; i++)
 		apicid_to_node[i] = NUMA_NO_NODE;
-	for (i = 0; i < MAX_NUMNODES; i++)
-		nodes_add[i].start = nodes[i].end = 0;
+	for (i = 0; i < MAX_NUMNODES; i++) {
+		nodes[i].start = nodes[i].end = 0;
+		nodes_add[i].start = nodes_add[i].end = 0;
+	}
 	remove_all_active_ranges();
 }