aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-09-12 12:49:24 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-12 13:50:56 -0400
commit05d1fa4bf6a1528e4d4e39fa537f11e6cfca4720 (patch)
tree198f9a3f51306730c5f5cd713c3c8576e8c64161 /arch
parent2e8ad43ec07545780ce7992cb18e2d82c7abd24c (diff)
[PATCH] x86-64: Improve error handling for overlapping PXMs in SRAT.
- Report PXMs instead of nodes - Report the correct PXM, not always the one of node 1. - Only warn for the case of a PXM overlapping by itself Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/mm/srat.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
index db6b073a149f..36bc7be9afb9 100644
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -25,6 +25,8 @@ static nodemask_t nodes_found __initdata;
25static struct node nodes[MAX_NUMNODES] __initdata; 25static struct node nodes[MAX_NUMNODES] __initdata;
26static __u8 pxm2node[256] = { [0 ... 255] = 0xff }; 26static __u8 pxm2node[256] = { [0 ... 255] = 0xff };
27 27
28static int node_to_pxm(int n);
29
28int pxm_to_node(int pxm) 30int pxm_to_node(int pxm)
29{ 31{
30 if ((unsigned)pxm >= 256) 32 if ((unsigned)pxm >= 256)
@@ -53,9 +55,9 @@ static __init int conflicting_nodes(unsigned long start, unsigned long end)
53 if (nd->start == nd->end) 55 if (nd->start == nd->end)
54 continue; 56 continue;
55 if (nd->end > start && nd->start < end) 57 if (nd->end > start && nd->start < end)
56 return 1; 58 return i;
57 if (nd->end == end && nd->start == start) 59 if (nd->end == end && nd->start == start)
58 return 1; 60 return i;
59 } 61 }
60 return -1; 62 return -1;
61} 63}
@@ -139,10 +141,15 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
139 printk(KERN_INFO "SRAT: hot plug zone found %lx - %lx \n", 141 printk(KERN_INFO "SRAT: hot plug zone found %lx - %lx \n",
140 start, end); 142 start, end);
141 i = conflicting_nodes(start, end); 143 i = conflicting_nodes(start, end);
142 if (i >= 0) { 144 if (i == node) {
145 printk(KERN_WARNING
146 "SRAT: Warning: PXM %d (%lx-%lx) overlaps with itself (%Lx-%Lx)\n",
147 pxm, start, end, nodes[i].start, nodes[i].end);
148 } else if (i >= 0) {
143 printk(KERN_ERR 149 printk(KERN_ERR
144 "SRAT: pxm %d overlap %lx-%lx with node %d(%Lx-%Lx)\n", 150 "SRAT: PXM %d (%lx-%lx) overlaps with PXM %d (%Lx-%Lx)\n",
145 pxm, start, end, i, nodes[i].start, nodes[i].end); 151 pxm, start, end, node_to_pxm(i),
152 nodes[i].start, nodes[i].end);
146 bad_srat(); 153 bad_srat();
147 return; 154 return;
148 } 155 }
@@ -197,7 +204,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
197 return 0; 204 return 0;
198} 205}
199 206
200int node_to_pxm(int n) 207static int node_to_pxm(int n)
201{ 208{
202 int i; 209 int i;
203 if (pxm2node[n] == n) 210 if (pxm2node[n] == n)