Files
Jessica Liu b330fbfd34 irqchip/riscv-aplic: Register syscore operations only once
Since commit 95a8ddde36 ("irqchip/riscv-aplic: Preserve APLIC
states across suspend/resume"), when multiple NUMA nodes exist
and AIA is not configured as "none", aplic_probe() is called
multiple times. This leads to register_syscore(&aplic_syscore)
being invoked repeatedly, causing the following Oops:

 list_add double add: new=ffffffffb91461f0, prev=ffffffffb91461f0, next=ffffffffb915c408.
 [<ffffffffb7b5c8ca>] __list_add_valid_or_report+0x60/0xc0
 [<ffffffffb7cc3236>] register_syscore+0x3e/0x70
 [<ffffffffb7b8d61c>] aplic_probe+0xc6/0x112

Fix this by registering syscore operations only once, using a static
variable aplic_syscore_registered to track registration.

[ tglx: Trim backtrace properly ]

Fixes: 95a8ddde36 ("irqchip/riscv-aplic: Preserve APLIC states across suspend/resume")
Signed-off-by: Jessica Liu <liu.xuemei1@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260310141731145xMwLsyvXl9Gw-m6A4VRYj@zte.com.cn
2026-03-10 18:42:34 +01:00
..
2025-06-12 15:08:12 +02:00
2025-06-12 15:08:12 +02:00
2025-06-12 15:08:12 +02:00
2025-06-12 15:08:12 +02:00
2025-06-12 15:08:12 +02:00