aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/mm
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:49:55 -0400
commit0b07e984fc7a51b1a7c75e1bfdcf59d1ad065353 (patch)
tree84477039c897553359694020e767638a830f4f15 /arch/x86_64/mm
parentf1f4e83fd9b5ce77d05825586d0426a54b8f3a68 (diff)
[PATCH] x86-64: Don't assign CPU numbers in SRAT parsing
Do that later when the CPU boots. SRAT just stores the APIC<->Node mapping node. This fixes problems on systems where the order of SRAT entries does not match the MADT. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/mm')
-rw-r--r--arch/x86_64/mm/numa.c3
-rw-r--r--arch/x86_64/mm/srat.c17
2 files changed, 6 insertions, 14 deletions
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
index 04f7a33e144c..5b1518629893 100644
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -29,6 +29,9 @@ int memnode_shift;
29u8 memnodemap[NODEMAPSIZE]; 29u8 memnodemap[NODEMAPSIZE];
30 30
31unsigned char cpu_to_node[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = NUMA_NO_NODE }; 31unsigned char cpu_to_node[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = NUMA_NO_NODE };
32unsigned char apicid_to_node[256] __cpuinitdata = {
33 [0 ... NR_CPUS-1] = NUMA_NO_NODE
34};
32cpumask_t node_to_cpumask[MAX_NUMNODES] __read_mostly; 35cpumask_t node_to_cpumask[MAX_NUMNODES] __read_mostly;
33 36
34int numa_off __initdata; 37int numa_off __initdata;
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
index 8e3d097a9ddd..92f6ec79b232 100644
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -20,9 +20,6 @@
20 20
21static struct acpi_table_slit *acpi_slit; 21static struct acpi_table_slit *acpi_slit;
22 22
23/* Internal processor count */
24static unsigned int __initdata num_processors = 0;
25
26static nodemask_t nodes_parsed __initdata; 23static nodemask_t nodes_parsed __initdata;
27static nodemask_t nodes_found __initdata; 24static nodemask_t nodes_found __initdata;
28static struct node nodes[MAX_NUMNODES] __initdata; 25static struct node nodes[MAX_NUMNODES] __initdata;
@@ -104,18 +101,10 @@ acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa)
104 bad_srat(); 101 bad_srat();
105 return; 102 return;
106 } 103 }
107 if (num_processors >= NR_CPUS) { 104 apicid_to_node[pa->apic_id] = node;
108 printk(KERN_ERR "SRAT: Processor #%d (lapic %u) INVALID. (Max ID: %d).\n",
109 num_processors, pa->apic_id, NR_CPUS);
110 bad_srat();
111 return;
112 }
113 cpu_to_node[num_processors] = node;
114 acpi_numa = 1; 105 acpi_numa = 1;
115 printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> CPU %u -> Node %u\n", 106 printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
116 pxm, pa->apic_id, num_processors, node); 107 pxm, pa->apic_id, node);
117
118 num_processors++;
119} 108}
120 109
121/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ 110/* Callback for parsing of the Proximity Domain <-> Memory Area mappings */