RTEMS | Draft: bsps/riscv: add Smrnmi extension support (!1391)

Gedare Bloom (@gedare) gitlab at rtems.org
Wed Aug 26 16:57:54 UTC 2026




Gedare Bloom started a new discussion on bsps/riscv/riscv/irq/rnmi.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1391#note_158072

 > +void __attribute__((weak))
 > +riscv_rnmi_deferred_work_dispatch(uintptr_t mncause, uintptr_t mnepc)
 > +{
 > +  printk("RNMI: mncause=0x%016" PRIxPTR " mnepc=0x%016" PRIxPTR "\n",
 > +         mncause, mnepc);
 > +}
 > +
 > +void _RISCV_RNMI_deferred(void)
 > +{
 > +  /* mnscratch == 0 disables deferred processing */
 > +  RISCV_RNMI_Context *ctx = (RISCV_RNMI_Context *)(uintptr_t)read_csr(0x740);
 > +
 > +  if (!ctx)
 > +    return;
 > +
 > +  uintptr_t mncause = __atomic_exchange_n(&ctx->mncause, 0, __ATOMIC_RELAXED);

prefer to declare all variables at the start of the scope

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1391#note_158072
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-chc1bih5i1dx60et1x3l7lmy1-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260826/dfda0822/attachment-0001.htm>


More information about the bugs mailing list