[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>
This commit is contained in:
parent
2e8ad43ec0
commit
05d1fa4bf6
|
@ -25,6 +25,8 @@ static nodemask_t nodes_found __initdata;
|
||||||
static struct node nodes[MAX_NUMNODES] __initdata;
|
static struct node nodes[MAX_NUMNODES] __initdata;
|
||||||
static __u8 pxm2node[256] = { [0 ... 255] = 0xff };
|
static __u8 pxm2node[256] = { [0 ... 255] = 0xff };
|
||||||
|
|
||||||
|
static int node_to_pxm(int n);
|
||||||
|
|
||||||
int pxm_to_node(int pxm)
|
int pxm_to_node(int pxm)
|
||||||
{
|
{
|
||||||
if ((unsigned)pxm >= 256)
|
if ((unsigned)pxm >= 256)
|
||||||
|
@ -53,9 +55,9 @@ static __init int conflicting_nodes(unsigned long start, unsigned long end)
|
||||||
if (nd->start == nd->end)
|
if (nd->start == nd->end)
|
||||||
continue;
|
continue;
|
||||||
if (nd->end > start && nd->start < end)
|
if (nd->end > start && nd->start < end)
|
||||||
return 1;
|
return i;
|
||||||
if (nd->end == end && nd->start == start)
|
if (nd->end == end && nd->start == start)
|
||||||
return 1;
|
return i;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -139,10 +141,15 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
|
||||||
printk(KERN_INFO "SRAT: hot plug zone found %lx - %lx \n",
|
printk(KERN_INFO "SRAT: hot plug zone found %lx - %lx \n",
|
||||||
start, end);
|
start, end);
|
||||||
i = conflicting_nodes(start, end);
|
i = conflicting_nodes(start, end);
|
||||||
if (i >= 0) {
|
if (i == node) {
|
||||||
|
printk(KERN_WARNING
|
||||||
|
"SRAT: Warning: PXM %d (%lx-%lx) overlaps with itself (%Lx-%Lx)\n",
|
||||||
|
pxm, start, end, nodes[i].start, nodes[i].end);
|
||||||
|
} else if (i >= 0) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"SRAT: pxm %d overlap %lx-%lx with node %d(%Lx-%Lx)\n",
|
"SRAT: PXM %d (%lx-%lx) overlaps with PXM %d (%Lx-%Lx)\n",
|
||||||
pxm, start, end, i, nodes[i].start, nodes[i].end);
|
pxm, start, end, node_to_pxm(i),
|
||||||
|
nodes[i].start, nodes[i].end);
|
||||||
bad_srat();
|
bad_srat();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -197,7 +204,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int node_to_pxm(int n)
|
static int node_to_pxm(int n)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
if (pxm2node[n] == n)
|
if (pxm2node[n] == n)
|
||||||
|
|
Loading…
Reference in New Issue