RTEMS | bsps/sparc/leon3: Fix GPTIMER timer index logic (!532)

Matteo Concas (@matteo.concas) gitlab at rtems.org
Mon Jun 23 07:28:54 UTC 2025



Matteo Concas created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/532

Project:Branches: matteo.concas/rtems-gaisler:matteo/backport-6-fix-mp-leon3 to rtems/rtos/rtems:6
Author:   Matteo Concas




## Summary

bsps/sparc/leon3: Fix GPTIMER timer index logic

The old logic would lead to an error when multiprocessing was enabled and `LEON3_GPTIMER_BASE` was defined due to `leon3_timer_core_index` being undefined.

The new logic fixes this and keeps the same intent:

- If multiprocessing is not enabled, the timer index is 0
- If multiprocessing is enabled and `LEON3_GPTIMER_BASE` is defined, the timer index is twice the CPU boot index
- If multiprocessing is enabled and `LEON3_GPTIMER_BASE` is not defined, we fallback to the old logic using the GPTIMER core index.

<!--Default settings, if it is a dropdown it will set after submission-->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/532
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250623/5fcbe49c/attachment.htm>


More information about the bugs mailing list