diff options
Diffstat (limited to 'drivers/acpi/numa.c')
-rw-r--r-- | drivers/acpi/numa.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 5718566e00f9..d9926afec110 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -275,13 +275,23 @@ acpi_table_parse_srat(enum acpi_srat_type id, | |||
275 | int __init acpi_numa_init(void) | 275 | int __init acpi_numa_init(void) |
276 | { | 276 | { |
277 | int ret = 0; | 277 | int ret = 0; |
278 | int nr_cpu_entries = nr_cpu_ids; | ||
279 | |||
280 | #ifdef CONFIG_X86 | ||
281 | /* | ||
282 | * Should not limit number with cpu num that is from NR_CPUS or nr_cpus= | ||
283 | * SRAT cpu entries could have different order with that in MADT. | ||
284 | * So go over all cpu entries in SRAT to get apicid to node mapping. | ||
285 | */ | ||
286 | nr_cpu_entries = MAX_LOCAL_APIC; | ||
287 | #endif | ||
278 | 288 | ||
279 | /* SRAT: Static Resource Affinity Table */ | 289 | /* SRAT: Static Resource Affinity Table */ |
280 | if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { | 290 | if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { |
281 | acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY, | 291 | acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY, |
282 | acpi_parse_x2apic_affinity, nr_cpu_ids); | 292 | acpi_parse_x2apic_affinity, nr_cpu_entries); |
283 | acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY, | 293 | acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY, |
284 | acpi_parse_processor_affinity, nr_cpu_ids); | 294 | acpi_parse_processor_affinity, nr_cpu_entries); |
285 | ret = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY, | 295 | ret = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY, |
286 | acpi_parse_memory_affinity, | 296 | acpi_parse_memory_affinity, |
287 | NR_NODE_MEMBLKS); | 297 | NR_NODE_MEMBLKS); |