Re: [PATCH v6 3/4] MIPS: Ingenic: Add XBurst SMP support

From: Florian Fainelli

Date: Mon Nov 16 2026 - 12:39:36 EST


On 11/16/26 08:07, Paul Cercueil wrote:
Le vendredi 13 novembre 2026 à 11:08 -0800, Florian Fainelli a écrit :
From: 周琰杰 (Zhou Yanjie) <zhouyanjie@xxxxxxxxxxxxxx>

Add support for the second XBurst core on the JZ4780, based on Zhou
Yanjie's 2020 series and Paul Burton's original CI20 SMP implementation.
Use the CP0 mailboxes for inter-processor interrupts. Initialize CPU
presence and core IDs explicitly for generic kernels, and reject CPU
offlining until CPU teardown and restart are implemented.

XBurst stops its private cache clock when executing WAIT. Write back
the data cache before entering idle so that the other core can access
data belonging to the sleeping core. Select this wait handler only when
multiple CPUs are possible, and check pending work after the cache flush.

Enable the secondary clock outside the raw SMP lock. Use the CKSEG
aliases and pointer-sized assembly helpers for generic 64-bit builds.
Development and build/CI20 boot validation used Codex assistance; Sashiko
AI review identified the locking, topology and generic-kernel issues.

Link: https://lkml.iu.edu/hypermail/linux/kernel/2005.2/03488.html
Link: https://lists.openwall.net/linux-kernel/2020/05/13/1482
Link: https://lists.openwall.net/linux-kernel/2020/05/19/1099
Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@xxxxxxxxxxxxxx>
[florian: forward ported to latest version]
Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>

Reviewed-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx>
Tested-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx>

Good job cleaning that up.

Thanks Paul, Sashiko still had some feedback so there might be a v7, looking at the comments to decide.
--
Florian