diff options
author | Thomas Renninger <trenn@suse.de> | 2012-07-31 11:41:09 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-08-03 00:15:53 -0400 |
commit | 095adbb6441172985f5ddc3b9e88cb3191bdeac4 (patch) | |
tree | 60c21d962efe921e98f308e2d40edf5260fe57c1 /drivers/acpi | |
parent | f3946fb6e50b750d34f445188fa6746d14596afa (diff) |
ACPI: Only count valid srat memory structures
Otherwise you could run into:
WARN_ON in numa_register_memblks(), because node_possible_map is zero
References: https://bugzilla.novell.com/show_bug.cgi?id=757888
On this machine (ProLiant ML570 G3) the SRAT table contains:
- No processor affinities
- One memory affinity structure (which is set disabled)
CC: Per Jessen <per@opensuse.org>
CC: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/numa.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 2a6399345c85..cb31298ca684 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -237,6 +237,8 @@ acpi_parse_processor_affinity(struct acpi_subtable_header *header, | |||
237 | return 0; | 237 | return 0; |
238 | } | 238 | } |
239 | 239 | ||
240 | static int __initdata parsed_numa_memblks; | ||
241 | |||
240 | static int __init | 242 | static int __init |
241 | acpi_parse_memory_affinity(struct acpi_subtable_header * header, | 243 | acpi_parse_memory_affinity(struct acpi_subtable_header * header, |
242 | const unsigned long end) | 244 | const unsigned long end) |
@@ -250,8 +252,8 @@ acpi_parse_memory_affinity(struct acpi_subtable_header * header, | |||
250 | acpi_table_print_srat_entry(header); | 252 | acpi_table_print_srat_entry(header); |
251 | 253 | ||
252 | /* let architecture-dependent part to do it */ | 254 | /* let architecture-dependent part to do it */ |
253 | acpi_numa_memory_affinity_init(memory_affinity); | 255 | if (!acpi_numa_memory_affinity_init(memory_affinity)) |
254 | 256 | parsed_numa_memblks++; | |
255 | return 0; | 257 | return 0; |
256 | } | 258 | } |
257 | 259 | ||
@@ -306,7 +308,7 @@ int __init acpi_numa_init(void) | |||
306 | 308 | ||
307 | if (cnt < 0) | 309 | if (cnt < 0) |
308 | return cnt; | 310 | return cnt; |
309 | else if (cnt == 0) | 311 | else if (!parsed_numa_memblks) |
310 | return -ENOENT; | 312 | return -ENOENT; |
311 | return 0; | 313 | return 0; |
312 | } | 314 | } |