]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/smp: Implement cpu_to_coregroup_id
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Mon, 10 Aug 2020 07:18:34 +0000 (12:48 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Sep 2020 12:13:32 +0000 (22:13 +1000)
commit5a6992195c25063e27eb43fdc5cf1d19db124cd7
treeaa4bfaf136f56b604e54cdebb9ab16f7a2239d06
parent41746e14204aa2cad992b64c6fca3a867beb0750
powerpc/smp: Implement cpu_to_coregroup_id

Lookup the coregroup id from the associativity array.

If unable to detect the coregroup id, fallback on the core id.
This way, ensure sched_domain degenerates and an extra sched domain is
not created.

Ideally this function should have been implemented in
arch/powerpc/kernel/smp.c. However if its implemented in mm/numa.c, we
don't need to find the primary domain again.

If the device-tree mentions more than one coregroup, then kernel
implements only the last or the smallest coregroup, which currently
corresponds to the penultimate domain in the device-tree.

Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200810071834.92514-11-srikar@linux.vnet.ibm.com
arch/powerpc/mm/numa.c