Skip to content

[PW_SID:1065084] irqchip/riscv-aplic: fix PM for multi-aplic system#1594

Closed
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1065084
Closed

[PW_SID:1065084] irqchip/riscv-aplic: fix PM for multi-aplic system#1594
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1065084

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1065084 applied to workflow__riscv__fixes

Name: irqchip/riscv-aplic: fix PM for multi-aplic system
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1065084
Version: 1

The aplic_syscore is a singleton and should be registered once.
If it is registered from the driver probe, register_syscore()
called multiple times for the system having multiple aplic instances.
This results in double registration of the same syscore. Warning
triggered:

[    0.553569] ------------[ cut here ]------------
[    0.553572] list_add double add: new=ffffffff81314a68, prev=ffffffff81314a68, next=ffffffff8131f588.
[    0.553643] WARNING: lib/list_debug.c:35 at __list_add_valid_or_report+0x4e/0xe8, CPU#23: swapper/0/1
[    0.553660] Modules linked in:
[    0.553668] CPU: 23 UID: 0 PID: 1 Comm: swapper/0 Not tainted 7.0.0-rc1 #2 PREEMPT_RT
[    0.553675] Hardware name: EyeQ7 evaluation board (DT)
[    0.553679] epc : __list_add_valid_or_report+0x4e/0xe8
[    0.553685]  ra : __list_add_valid_or_report+0x4e/0xe8
[    0.553691] epc : ffffffff80443e72 ra : ffffffff80443e72 sp : ffffffc6000dbaf0
[    0.553696]  gp : ffffffff81391b48 tp : ffffffd6007d9b00 t0 : ffffffd9efbc4318
[    0.553700]  t1 : 0000000000000004 t2 : 2d2d2d2d2d2d2d2d s0 : ffffffc6000dbb20
[    0.553704]  s1 : ffffffff8131f588 a0 : 0000000000000058 a1 : ffffffff80089b9a
[    0.553708]  a2 : ffffffd9effab4d0 a3 : 0000000000000000 a4 : 0000000000000000
[    0.553711]  a5 : 0000000000000000 a6 : ffffffff80da4889 a7 : ffffffffffffffff
[    0.553715]  s2 : ffffffff8131f558 s3 : ffffffff81314a68 s4 : ffffffff8131f588
[    0.553719]  s5 : ffffffff81367d40 s6 : ffffffff80a00db8 s7 : ffffffff80a00d78
[    0.553722]  s8 : ffffffff80e4ac38 s9 : ffffffff80a1c430 s10: 0000000000000008
[    0.553726]  s11: ffffffff808000c4 t3 : 0000000000000002 t4 : ffffffd9efca3bfc
[    0.553730]  t5 : ffffffd9efca3bd8 t6 : ffffffc6000db828 ssp : 0000000000000000
[    0.553734] status: 0000000200000120 badaddr: ffffffff80443e72 cause: 0000000000000003
[    0.553738] [<ffffffff80443e72>] __list_add_valid_or_report+0x4e/0xe8
[    0.553745] [<ffffffff804f1c3a>] register_syscore+0x3a/0x6c
[    0.553754] [<ffffffff80009cd8>] aplic_probe+0xd8/0xe8
[    0.553765] [<ffffffff804f350e>] platform_probe+0x3e/0x7c
[    0.553772] [<ffffffff804f0d5e>] really_probe+0x98/0x34a
[    0.553779] [<ffffffff804f10ba>] __driver_probe_device+0xaa/0xf6
[    0.553785] [<ffffffff804f11d0>] driver_probe_device+0x36/0xc4
[    0.553791] [<ffffffff804f1470>] __driver_attach+0x108/0x1ec
[    0.553797] [<ffffffff804eebde>] bus_for_each_dev+0x58/0xa4
[    0.553803] [<ffffffff804f0608>] driver_attach+0x1a/0x22
[    0.553809] [<ffffffff804eff32>] bus_add_driver+0xe2/0x204
[    0.553814] [<ffffffff804f1f82>] driver_register+0x3e/0xd8
[    0.553820] [<ffffffff804f3204>] __platform_driver_register+0x1e/0x26
[    0.553827] [<ffffffff8082be50>] aplic_driver_init+0x1a/0x22
[    0.553837] [<ffffffff8000e910>] do_one_initcall+0x44/0x286
[    0.553843] [<ffffffff8080171c>] kernel_init_freeable+0x262/0x2e8
[    0.553853] [<ffffffff8073cd98>] kernel_init+0x28/0x14c
[    0.553863] [<ffffffff800101fa>] ret_from_fork_kernel+0x1a/0x15c
[    0.553870] [<ffffffff807493ae>] ret_from_fork_kernel_asm+0x16/0x18
[    0.553877] ---[ end trace 0000000000000000 ]---

Move syscore registration to the driver init

Fixes: 95a8ddd ("irqchip/riscv-aplic: Preserve APLIC states across suspend/resume")
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 137.99 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1111.35 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1633.10 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 27.06 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.79 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 83.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
kdoc
Desc: Detects for kdoc errors
Duration: 0.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.39 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "irqchip/riscv-aplic: fix PM for multi-aplic system"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.67 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1065084 branch March 18, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants