diff options
author | Thomas Renninger <trenn@suse.de> | 2012-07-31 19:41:09 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-08-03 08:15:53 +0400 |
commit | 095adbb6441172985f5ddc3b9e88cb3191bdeac4 (patch) | |
tree | 60c21d962efe921e98f308e2d40edf5260fe57c1 /drivers/acpi/numa.c | |
parent | f3946fb6e50b750d34f445188fa6746d14596afa (diff) | |
download | linux-095adbb6441172985f5ddc3b9e88cb3191bdeac4.tar.xz |
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/numa.c')
-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, return 0; } +static int __initdata parsed_numa_memblks; + static int __init acpi_parse_memory_affinity(struct acpi_subtable_header * header, const unsigned long end) @@ -250,8 +252,8 @@ acpi_parse_memory_affinity(struct acpi_subtable_header * header, acpi_table_print_srat_entry(header); /* let architecture-dependent part to do it */ - acpi_numa_memory_affinity_init(memory_affinity); - + if (!acpi_numa_memory_affinity_init(memory_affinity)) + parsed_numa_memblks++; return 0; } @@ -306,7 +308,7 @@ int __init acpi_numa_init(void) if (cnt < 0) return cnt; - else if (cnt == 0) + else if (!parsed_numa_memblks) return -ENOENT; return 0; } |