mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> CC: Andi Kleen <[email protected]> Signed-off-by: Thomas Renninger <[email protected]> Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
f3946fb6e5
commit
095adbb644
4 changed files with 17 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue