powerpc/xive: Do not skip CPU-less nodes when creating the IPIs
authorCédric Le Goater <clg@kaod.org>
Sat, 7 Aug 2021 07:20:57 +0000 (09:20 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 12 Aug 2021 12:31:41 +0000 (22:31 +1000)
commitcbc06f051c524dcfe52ef0d1f30647828e226d30
tree57abf82dc04848a192f4d14be44bc401d70398f7
parent01fcac8e4dfc112f420dcaeb70056a74e326cacf
powerpc/xive: Do not skip CPU-less nodes when creating the IPIs

On PowerVM, CPU-less nodes can be populated with hot-plugged CPUs at
runtime. Today, the IPI is not created for such nodes, and hot-plugged
CPUs use a bogus IPI, which leads to soft lockups.

We can not directly allocate and request the IPI on demand because
bringup_up() is called under the IRQ sparse lock. The alternative is
to allocate the IPIs for all possible nodes at startup and to request
the mapping on demand when the first CPU of a node is brought up.

Fixes: 7dcc37b3eff9 ("powerpc/xive: Map one IPI interrupt per node")
Cc: stable@vger.kernel.org # v5.13
Reported-by: Geetika Moolchandani <Geetika.Moolchandani1@ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210807072057.184698-1-clg@kaod.org
arch/powerpc/sysdev/xive/common.c