Skip to content

Commit fd3e454

Browse files
Ganapatrao Kulkarnirafaeljw
authored andcommitted
ACPI / NUMA: ia64: Parse all entries of SRAT memory affinity table
In current implementation, SRAT Memory Affinity Structure table parsing is restricted to number of maximum memblocks allowed (NR_NODE_MEMBLKS). However NR_NODE_MEMBLKS is defined individually as per architecture requirements. Hence removing the restriction of SRAT Memory Affinity Structure parsing in ACPI driver code and let architecture code check for allowed memblocks count. This check is already there in the x86 code, so do the same on ia64. Signed-off-by: Ganapatrao Kulkarni <[email protected]> Acked-by: Tony Luck <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 4fbd8d1 commit fd3e454

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

arch/ia64/kernel/acpi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,11 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
504504
if (!(ma->flags & ACPI_SRAT_MEM_ENABLED))
505505
return -1;
506506

507+
if (num_node_memblks >= NR_NODE_MEMBLKS) {
508+
pr_err("NUMA: too many memblk ranges\n");
509+
return -EINVAL;
510+
}
511+
507512
/* record this node in proximity bitmap */
508513
pxm_bit_set(pxm);
509514

drivers/acpi/numa.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,7 @@ int __init acpi_numa_init(void)
460460
srat_proc, ARRAY_SIZE(srat_proc), 0);
461461

462462
cnt = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
463-
acpi_parse_memory_affinity,
464-
NR_NODE_MEMBLKS);
463+
acpi_parse_memory_affinity, 0);
465464
}
466465

467466
/* SLIT: System Locality Information Table */

0 commit comments

Comments
 (0)