On Sat, Dec 07 2024 at 17:11, Huacai Chen wrote: > On Sat, Dec 7, 2024 at 11:31 AM Tianyang Zhang > <zhangtianyang@xxxxxxxxxxx> wrote: >> >> This patch enables the advanced interrupt controller function under >> multiple-node of 3C600. The topology of the advanced interrupt controller >> is consistent with NUMA node. We check the enable status of the node where >> each CPU is located once when it goes online, which may cause some >> additional operations, but it can ensure that the advanced interrupt >> controller can still be used in situations where some CPUs cannot start > The whole can be reworded: > > Currently we only enable one chip's advanced interrupt controller > (AVEC) in hardware, so multi-chip machines with Loongson-3C6000 don't > work. This patch enables it for every chip (In theory every chip needs > to be enabled only once, but for simplicity we enable it on every core > in the CPU online hooks). It want's to be reworded without 'we' and 'this patch': avecintc_init() enables the Advanced Interrupt Controller (AVEC) of the boot CPU node, but nothing enables the AVEC on secondary nodes. Move the enablement to the CPU hotplug callback so that secondary nodes get the AVEC enabled too. In theory enabling it once per node would be sufficient, but redundant enabling does no hard, so keep the code simple and do it unconditionally. Thanks, tglx