RTEMS | cpukit/score/cpu/mips: Add thread-local storage (!1401)

Kinsey Moore (@opticron) gitlab at rtems.org
Thu Sep 3 22:18:19 UTC 2026




Kinsey Moore commented on a discussion on bsps/mips/shared/irq/vectorexceptions.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1401#note_158689

 >  {
 > -  (void) frame;
 > -
 >    uint32_t   cause;
 >    uint32_t   exc;
 >  
 >    mips_get_cause( cause );
 >    exc = (cause >> 2) & 0x1f;
 >  
 > +  if ( exc == MIPS_EXCEPTION_RI && mips_emulate_rdhwr_ulr( frame ) ) {
 > +    return;
 > +  }
 > +
 >    mips_exception_frame = frame;
 >    bsp_interrupt_handler_dispatch( exc );
 >    mips_exception_frame = NULL;

Yes, setting a global like that to pass a hidden argument into bsp_interrupt_handler_dispatch() is poor design and will have to be reworked if we ever get support for a SMP MIPS chip, but that comment should really just result in an issue being created to address it.

Can we instead change our default TLS model such that GCC emits __tls_get_addr() instead of taking a trip through the IRQ/exception handling code?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1401#note_158689
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-8355t4lomwu75ubswm8zgwvp6-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/20260903/2d22e1b1/attachment-0001.htm>


More information about the bugs mailing list