debuggers.hg
changeset 21280:d01ea51fc929
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>
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>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Apr 26 12:11:30 2010 +0100 (2010-04-26) |
parents | f766f2142a85 |
children | 3ce824963dc4 |
files | xen/arch/x86/srat.c |
line diff
1.1 --- a/xen/arch/x86/srat.c Mon Apr 26 06:52:44 2010 +0100 1.2 +++ b/xen/arch/x86/srat.c Mon Apr 26 12:11:30 2010 +0100 1.3 @@ -25,7 +25,7 @@ static struct acpi_table_slit *__read_mo 1.4 static nodemask_t nodes_parsed __initdata; 1.5 static nodemask_t nodes_found __initdata; 1.6 static struct node nodes[MAX_NUMNODES] __initdata; 1.7 -static u8 __read_mostly pxm2node[256] = { [0 ... 255] = 0xff }; 1.8 +static u8 __read_mostly pxm2node[256] = { [0 ... 255] = NUMA_NO_NODE }; 1.9 1.10 1.11 static int num_node_memblks; 1.12 @@ -112,6 +112,8 @@ static __init void bad_srat(void) 1.13 acpi_numa = -1; 1.14 for (i = 0; i < MAX_LOCAL_APIC; i++) 1.15 apicid_to_node[i] = NUMA_NO_NODE; 1.16 + for (i = 0; i < ARRAY_SIZE(pxm2node); i++) 1.17 + pxm2node[i] = NUMA_NO_NODE; 1.18 } 1.19 1.20 #ifdef CONFIG_X86_64