summaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorGanapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>2017-11-15 22:59:02 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-11-27 01:19:52 +0100
commitfd3e454366603c8e35b31c52195b1ea8798a8fff (patch)
tree1a727c9bd55672e5a612557f0f124ab2e7900883 /arch/ia64
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff)
downloadlinux-fd3e454366603c8e35b31c52195b1ea8798a8fff.tar.gz
linux-fd3e454366603c8e35b31c52195b1ea8798a8fff.tar.bz2
linux-fd3e454366603c8e35b31c52195b1ea8798a8fff.zip
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 <ganapatrao.kulkarni@cavium.com> Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/acpi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 1d29b2f8726b..1dacbf5e9e09 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -504,6 +504,11 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
if (!(ma->flags & ACPI_SRAT_MEM_ENABLED))
return -1;
+ if (num_node_memblks >= NR_NODE_MEMBLKS) {
+ pr_err("NUMA: too many memblk ranges\n");
+ return -EINVAL;
+ }
+
/* record this node in proximity bitmap */
pxm_bit_set(pxm);