aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/srat.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-04-26 12:11:30 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-04-26 12:11:30 +0100
commitefaca454ab76878603ed9c2ce61b94e9bba0fe35 (patch)
treef679df1292a8740f74233f0ec6de66e83f6a3744 /xen/arch/x86/srat.c
parent6b19626a0ed860773df316e8cacf15017fd9c470 (diff)
downloadxen-efaca454ab76878603ed9c2ce61b94e9bba0fe35.tar.gz
xen-efaca454ab76878603ed9c2ce61b94e9bba0fe35.tar.bz2
xen-efaca454ab76878603ed9c2ce61b94e9bba0fe35.zip
x86: make pxm_to_node() return sane values when disabling NUMA internally
Otherwise, pass-through code may call memory allocation functions with invalid node IDs, causing the allocations to fail. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/srat.c')
-rw-r--r--xen/arch/x86/srat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
index b89c58805e..5caeb6a683 100644
--- a/xen/arch/x86/srat.c
+++ b/xen/arch/x86/srat.c
@@ -25,7 +25,7 @@ static struct acpi_table_slit *__read_mostly acpi_slit;
static nodemask_t nodes_parsed __initdata;
static nodemask_t nodes_found __initdata;
static struct node nodes[MAX_NUMNODES] __initdata;
-static u8 __read_mostly pxm2node[256] = { [0 ... 255] = 0xff };
+static u8 __read_mostly pxm2node[256] = { [0 ... 255] = NUMA_NO_NODE };
static int num_node_memblks;
@@ -112,6 +112,8 @@ 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 < ARRAY_SIZE(pxm2node); i++)
+ pxm2node[i] = NUMA_NO_NODE;
}
#ifdef CONFIG_X86_64