powerpc/smp: Rework CPU topology construction
authorOliver O'Halloran <oohall@gmail.com>
Thu, 29 Jun 2017 07:12:54 +0000 (17:12 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 31 Aug 2017 04:26:51 +0000 (14:26 +1000)
commitdf52f6714071c49a1fb1f541d4c4ff929bd4594d
tree6433af245d729eaac3a6c38d65c7b1dcd917a6df
parente3d8b67e2c60dcd35661d34df249f20d20463f0c
powerpc/smp: Rework CPU topology construction

The CPU scheduler topology is constructed from a number of per-cpu
cpumasks which describe which sets of logical CPUs are related in some
fashion. Current code that handles constructing these masks when CPUs
are hot(un)plugged can be simplified a bit by exploiting the fact that
the scheduler requires higher levels of the toplogy (e.g package level
groupings) to be supersets of the lower levels (e.g.  threas in a core).
This patch reworks the cpumask construction to be simpler and easier to
extend with extra topology levels.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[mpe: Fix CONFIG_HOTPLUG_CPU=n build]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/smp.c