diff options
Diffstat (limited to 'arch/x86_64/mm/srat.c')
-rw-r--r-- | arch/x86_64/mm/srat.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index 5d01b31472e1..8e3d097a9ddd 100644 --- a/arch/x86_64/mm/srat.c +++ b/arch/x86_64/mm/srat.c | |||
@@ -20,6 +20,9 @@ | |||
20 | 20 | ||
21 | static struct acpi_table_slit *acpi_slit; | 21 | static struct acpi_table_slit *acpi_slit; |
22 | 22 | ||
23 | /* Internal processor count */ | ||
24 | static unsigned int __initdata num_processors = 0; | ||
25 | |||
23 | static nodemask_t nodes_parsed __initdata; | 26 | static nodemask_t nodes_parsed __initdata; |
24 | static nodemask_t nodes_found __initdata; | 27 | static nodemask_t nodes_found __initdata; |
25 | static struct node nodes[MAX_NUMNODES] __initdata; | 28 | static struct node nodes[MAX_NUMNODES] __initdata; |
@@ -101,16 +104,18 @@ acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) | |||
101 | bad_srat(); | 104 | bad_srat(); |
102 | return; | 105 | return; |
103 | } | 106 | } |
104 | if (pa->apic_id >= NR_CPUS) { | 107 | if (num_processors >= NR_CPUS) { |
105 | printk(KERN_ERR "SRAT: lapic %u too large.\n", | 108 | printk(KERN_ERR "SRAT: Processor #%d (lapic %u) INVALID. (Max ID: %d).\n", |
106 | pa->apic_id); | 109 | num_processors, pa->apic_id, NR_CPUS); |
107 | bad_srat(); | 110 | bad_srat(); |
108 | return; | 111 | return; |
109 | } | 112 | } |
110 | cpu_to_node[pa->apic_id] = node; | 113 | cpu_to_node[num_processors] = node; |
111 | acpi_numa = 1; | 114 | acpi_numa = 1; |
112 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", | 115 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> CPU %u -> Node %u\n", |
113 | pxm, pa->apic_id, node); | 116 | pxm, pa->apic_id, num_processors, node); |
117 | |||
118 | num_processors++; | ||
114 | } | 119 | } |
115 | 120 | ||
116 | /* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ | 121 | /* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ |
@@ -124,7 +129,6 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | |||
124 | 129 | ||
125 | if (srat_disabled() || ma->flags.enabled == 0) | 130 | if (srat_disabled() || ma->flags.enabled == 0) |
126 | return; | 131 | return; |
127 | /* hotplug bit is ignored for now */ | ||
128 | pxm = ma->proximity_domain; | 132 | pxm = ma->proximity_domain; |
129 | node = setup_node(pxm); | 133 | node = setup_node(pxm); |
130 | if (node < 0) { | 134 | if (node < 0) { |
@@ -134,6 +138,10 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | |||
134 | } | 138 | } |
135 | start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32); | 139 | start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32); |
136 | end = start + (ma->length_lo | ((u64)ma->length_hi << 32)); | 140 | end = start + (ma->length_lo | ((u64)ma->length_hi << 32)); |
141 | /* It is fine to add this area to the nodes data it will be used later*/ | ||
142 | if (ma->flags.hot_pluggable == 1) | ||
143 | printk(KERN_INFO "SRAT: hot plug zone found %lx - %lx \n", | ||
144 | start, end); | ||
137 | i = conflicting_nodes(start, end); | 145 | i = conflicting_nodes(start, end); |
138 | if (i >= 0) { | 146 | if (i >= 0) { |
139 | printk(KERN_ERR | 147 | printk(KERN_ERR |