Re: [PATCH v2] mfd: loongson-se: Add multi-node support
From: Xi Ruoyao
Date: Tue Apr 28 2026 - 09:40:01 EST
On Mon, 2026-04-27 at 18:02 +0800, Huacai Chen wrote:
> On Mon, Apr 27, 2026 at 5:52 PM Qunqin Zhao <zhaoqunqin@xxxxxxxxxxx> wrote:
> >
> >
> > 在 2026/4/27 下午5:37, Huacai Chen 写道:
> > > On Mon, Apr 27, 2026 at 5:24 PM Qunqin Zhao <zhaoqunqin@xxxxxxxxxxx> wrote:
> > > >
> > > > 在 2026/4/27 下午5:02, Huacai Chen 写道:
> > > > > Hi, Qunqin,
> > > > >
> > > > > On Mon, Apr 27, 2026 at 4:55 PM Qunqin Zhao
> > > > > <zhaoqunqin@xxxxxxxxxxx> wrote:
> > > > > > On the Loongson platform, each node is equipped with a
> > > > > > security engine
> > > > > > device. However, due to a hardware flaw, only the device on
> > > > > > node 0 can
> > > > > > trigger interrupts. Therefore, interrupts from other nodes
> > > > > > are forwarded
> > > > > > by node 0. We need to check in the interrupt handler of node
> > > > > > 0 whether
> > > > > > this interrupt is intended for other nodes.
> > > > > Multi-node or multi-package? In my opinion SE has no
> > > > > relationship with
> > > > > NUMA node, so maybe package?
> > > > Here is the output of lscpu from my machine:
> > > >
> > > > [loongson@localhost ~]$ lscpu
> > > > Architecture: loongarch64
> > > > CPU op-mode(s): 32-bit, 64-bit
> > > > Address sizes: 48 bits physical, 48 bits virtual
> > > > Byte Order: Little Endian
> > > > CPU(s): 128
> > > > On-line CPU(s) list: 0-127
> > > > Model name: Loongson-3C6000/D
> > > > CPU family: Loongson-64bit
> > > > Model: 0x11
> > > > Thread(s) per core: 2
> > > > Core(s) per socket: 32
> > > > Socket(s): 2
> > > > BogoMIPS: 4200.00
> > > > Flags: cpucfg lam ual fpu lsx lasx crc32
> > > > complex crypto
> > > > lvz lbt_x86 lbt_arm lbt_mips
> > > > Caches (sum of all):
> > > > L1d: 4 MiB (64 instances)
> > > > L1i: 4 MiB (64 instances)
> > > > L2: 16 MiB (64 instances)
> > > > L3: 128 MiB (4 instances)
> > > > NUMA:
> > > > NUMA node(s): 4
> > > > NUMA node0 CPU(s): 0-31
> > > > NUMA node1 CPU(s): 32-63
> > > > NUMA node2 CPU(s): 64-95
> > > > NUMA node3 CPU(s): 96-127
> > > >
> > > > There are four SE devices in my system, one for each NUMA node.
> > > For Loongson-3C6000 node is the same as package. You should
> > > consider
> > > Loongson-3C5000L, one package contains four nodes.
> >
> > I am not familiar with the SE-related components on the 3C5000L, and
> > this driver is not compatible with the 5000 series.
> Whether it is compatible to Loongson-3C5000L is not important. The
> importance is package is not always equal to node, and we should
> consider whether SE is per-node or per-package.
For a "compatible" example, 3C6000/D has two nodes in a package.
--
Xi Ruoyao <xry111@xxxxxxxxxxx>