-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: intc: plic: implement riscv_plic_irq_set_pending()
#78611
drivers: intc: plic: implement riscv_plic_irq_set_pending()
#78611
Conversation
Thank you for this PR, Andes platform works with this change. I plan to rework the mbox_andes_plic_sw driver after this PR is merged. But I think not all PLIC implementation support software-triggered interrupt. Andes PLIC describes it as an enhanced feature
Maybe use |
c1ca2ac
to
f9c0050
Compare
@jimmyzhe thanks for pointing that out, that made a lot of sense to me. I've updated the patch accordingly to compile the feature only for NCEPLIC100 with Kconfig
Could you probably comment your plan in #78917, so that Andes mbox works alongside SMP? I can be reached with the same handle on Discord as well. |
f9c0050
to
deee99b
Compare
Add a new `andestech,nceplic100` binding that inherits from the `sifive,plic-1.0.0` binding. This is so that the Kconfig `DT_HAS_ANDESTECH_NCEPLIC100_ENABLED` would be generated during build. Signed-off-by: Yong Cong Sin <[email protected]> Signed-off-by: Yong Cong Sin <[email protected]>
Implement `riscv_plic_irq_set_pending()` to trigger a software-generated interrupt. The "4. Interrupt Pending Bits" of the riscv-plic specs described the reading of the pending bits, but not the writing Since not all PLIC implementations support software-generated interrupt, the function is compiled only when `CONFIG_PLIC_SUPPORTS_SOFT_INTERRUPT` is enabled on PLIC that supports it, such as the Andes' NCEPLIC100. Signed-off-by: Yong Cong Sin <[email protected]> Signed-off-by: Yong Cong Sin <[email protected]>
Convert the compilation of the trigger type feature to depend on Kconfig, following the same pattern of software-triggered interrupt. Signed-off-by: Yong Cong Sin <[email protected]> Signed-off-by: Yong Cong Sin <[email protected]>
deee99b
to
2d7c8d8
Compare
🙌 |
Set an interrupt line as pending for PLIC that supports software-generated interrupt. Currently, this is only supported by Andes NCEPLIC100 (
"andestech,nceplic100"
), other PLICs can be supported by updating the Kconfig.For more info, see #78611 (comment)
For context, this can be used for SMP IPI / mailbox