diff options
Diffstat (limited to 'arch/x86/mm/srat.c')
-rw-r--r-- | arch/x86/mm/srat.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 4599c3e8bcb6..4ddf497ca65b 100644 --- a/arch/x86/mm/srat.c +++ b/arch/x86/mm/srat.c | |||
@@ -142,23 +142,23 @@ static inline int save_add_info(void) {return 0;} | |||
142 | #endif | 142 | #endif |
143 | 143 | ||
144 | /* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ | 144 | /* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ |
145 | void __init | 145 | int __init |
146 | acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) | 146 | acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) |
147 | { | 147 | { |
148 | u64 start, end; | 148 | u64 start, end; |
149 | int node, pxm; | 149 | int node, pxm; |
150 | 150 | ||
151 | if (srat_disabled()) | 151 | if (srat_disabled()) |
152 | return; | 152 | return -1; |
153 | if (ma->header.length != sizeof(struct acpi_srat_mem_affinity)) { | 153 | if (ma->header.length != sizeof(struct acpi_srat_mem_affinity)) { |
154 | bad_srat(); | 154 | bad_srat(); |
155 | return; | 155 | return -1; |
156 | } | 156 | } |
157 | if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0) | 157 | if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0) |
158 | return; | 158 | return -1; |
159 | 159 | ||
160 | if ((ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) && !save_add_info()) | 160 | if ((ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) && !save_add_info()) |
161 | return; | 161 | return -1; |
162 | start = ma->base_address; | 162 | start = ma->base_address; |
163 | end = start + ma->length; | 163 | end = start + ma->length; |
164 | pxm = ma->proximity_domain; | 164 | pxm = ma->proximity_domain; |
@@ -168,12 +168,12 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) | |||
168 | if (node < 0) { | 168 | if (node < 0) { |
169 | printk(KERN_ERR "SRAT: Too many proximity domains.\n"); | 169 | printk(KERN_ERR "SRAT: Too many proximity domains.\n"); |
170 | bad_srat(); | 170 | bad_srat(); |
171 | return; | 171 | return -1; |
172 | } | 172 | } |
173 | 173 | ||
174 | if (numa_add_memblk(node, start, end) < 0) { | 174 | if (numa_add_memblk(node, start, end) < 0) { |
175 | bad_srat(); | 175 | bad_srat(); |
176 | return; | 176 | return -1; |
177 | } | 177 | } |
178 | 178 | ||
179 | node_set(node, numa_nodes_parsed); | 179 | node_set(node, numa_nodes_parsed); |
@@ -181,6 +181,7 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) | |||
181 | printk(KERN_INFO "SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]\n", | 181 | printk(KERN_INFO "SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]\n", |
182 | node, pxm, | 182 | node, pxm, |
183 | (unsigned long long) start, (unsigned long long) end - 1); | 183 | (unsigned long long) start, (unsigned long long) end - 1); |
184 | return 0; | ||
184 | } | 185 | } |
185 | 186 | ||
186 | void __init acpi_numa_arch_fixup(void) {} | 187 | void __init acpi_numa_arch_fixup(void) {} |