]> www.infradead.org Git - users/jedix/linux-maple.git/commit
powerpc/microwatt: Add SMP support
authorPaul Mackerras <paulus@ozlabs.org>
Fri, 31 Jan 2025 06:30:09 +0000 (17:30 +1100)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 26 Feb 2025 15:46:48 +0000 (21:16 +0530)
commitaca95fb6bb572a77f39d42d83ab72a965026577d
treec87238f0c1ca4b1f4215171d49c691ed0076da50
parent3d45a3d0d2e6b5cf47c6f0ab890f6ce762d9fd23
powerpc/microwatt: Add SMP support

This adds support for Microwatt systems with more than one core, and
updates the device tree for a 2-core version.

The secondary CPUs are started and sent to spin in __secondary_hold
very early on, in the platform probe function.  The reason for doing
this is so that they are there when smp_release_cpus() gets called,
which is before the platform init_smp function or even the platform
setup_arch function gets called.

Note that having two CPUs in the device tree doesn't preclude
operation with only one CPU.  The SYSCON_CPU_CTRL register has a
read-only field which indicates the number of CPU cores, so
microwatt_init_smp() will only start as many CPU cores as are present
in the system, and any extra CPU device-tree nodes will just be
ignored.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/Z5xt8aooKyXZv6Kf@thinks.paulus.ozlabs.org
arch/powerpc/boot/dts/microwatt.dts
arch/powerpc/platforms/microwatt/Kconfig
arch/powerpc/platforms/microwatt/Makefile
arch/powerpc/platforms/microwatt/microwatt.h
arch/powerpc/platforms/microwatt/setup.c
arch/powerpc/platforms/microwatt/smp.c [new file with mode: 0644]