Skip to content

[PW_SID:1053521] irqchip/sifive-plic: Fix frozen interrupt due to affinity setting#1469

Closed
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1053521
Closed

[PW_SID:1053521] irqchip/sifive-plic: Fix frozen interrupt due to affinity setting#1469
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1053521

Conversation

@linux-riscv-bot
Copy link

PR for series 1053521 applied to workflow__riscv__fixes

Name: irqchip/sifive-plic: Fix frozen interrupt due to affinity setting
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1053521
Version: 1

PLIC ignores interrupt completion message for disabled interrupt, explained
by the specification:

    The PLIC signals it has completed executing an interrupt handler by
    writing the interrupt ID it received from the claim to the
    claim/complete register. The PLIC does not check whether the completion
    ID is the same as the last claim ID for that target. If the completion
    ID does not match an interrupt source that is currently enabled for
    the target, the completion is silently ignored.

This caused problem in the past, because an interrupt can be disabled while
still being handled and plic_irq_eoi() had no effect. That was fixed by
checking if the interrupt is disabled, and if so enable it, before sending
the completion message. That check is done with irqd_irq_disabled().

However, that is not sufficient because the enable bit for the handling
hart can be zero despite irqd_irq_disabled(d) being false. This can happen
when affinity setting is changed while a hart is still handling the
interrupt.

This problem is easily reproducible by dumping a large file to uart (which
generates lots of interrupts) and at the same time keep changing the uart
interrupt's affinity setting. The uart port becomes frozen almost
jnstantly.

Fix by checking PLIC's enable bit instead of irqd_irq_disabled().

Fixes: cc9f04f ("irqchip/sifive-plic: Implement irq_set_affinity() for SMP host")
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.73 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1223.65 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1684.66 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 24.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.18 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 81.57 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
kdoc
Desc: Detects for kdoc errors
Duration: 0.95 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "irqchip/sifive-plic: Fix frozen interrupt due to affinity setting"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1053521 branch February 20, 2026 01:21
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