]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/numa: Limit possible nodes to within num_possible_nodes
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Fri, 24 Jul 2020 10:58:09 +0000 (16:28 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 26 Jul 2020 13:34:25 +0000 (23:34 +1000)
commit9f7125a4439ff8890b129cfe1b257f993aed0c1b
treefdb5a776e7cbae7c5de828b8e687c345983e39b1
parent6e9001cc10e7dde4d1192e353666f28e65f844c6
powerpc/numa: Limit possible nodes to within num_possible_nodes

MAX_NUMNODES is a theoretical maximum number of nodes thats is
supported by the kernel. Device tree properties exposes the number of
possible nodes on the current platform. The kernel would detected this
and would use it for most of its resource allocations. If the platform
now increases the nodes to over what was already exposed, then it may
lead to inconsistencies. Hence limit it to the already exposed nodes.

Suggested-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200724105809.24733-1-srikar@linux.vnet.ibm.com
arch/powerpc/mm/numa.c