-
Notifications
You must be signed in to change notification settings - Fork 7.6k
soc: riscv: Remove redundant __soc_is_irq implementations #92696
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
base: main
Are you sure you want to change the base?
Conversation
The __soc_is_irq function is only used when CONFIG_RISCV_SOC_EXCEPTION_FROM_IRQ is enabled, which is not the case for any WCH SoC. The implementation is therefore dead code. Additionally, the implementation matches the default fallback behavior, so no functional change would occur even if the config were enabled. Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
ping @tswaehn as the bot didn't add you as a reviewer. Maybe MAINTAINERS.yml should be fixed ? |
Looks reasonable |
This should be unecessary for BFLB, next update already removes this entirely: #91977 |
The sy1xx SoC enabled CONFIG_RISCV_SOC_EXCEPTION_FROM_IRQ and provided its own __soc_is_irq implementation. However, the behavior matches the default implementation, making the override unnecessary. This commit removes the custom implementation and disables the config option to remove unnecessary code. Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Okay, I removed the commit for BFLB. |
|
checked in more detail. disagree. |
Is there a difference between __soc_is_irq and the fallback that I missed ? |
alright. checked again. and you are correct. pls commit as suggested. |
Remove __soc_is_irq from WCH, Bouffalolab, and Sensry Ganymed SoCs.
For WCH and Bouffalolab SoCs, CONFIG_RISCV_SOC_EXCEPTION_FROM_IRQ is
not enabled, so the function is never used. In both cases, the
implementation matches the default fallback (though the Bouffalolab
version is more complex).
For Sensry Ganymed (SY1xx), the config is enabled, but the function's
logic is identical to the default fallback, making it redundant.
I only tested with a WCH SoC (ch32v303), but for bouffalobab the code was dead and for ganymed SoCs the behaviour should be the exact same.