RTEMS | RISC-V/start.S: Lwfi label can be used when not defined (#5519)

Matteo Concas (@matteo.concas) gitlab at rtems.org
Thu Mar 12 23:02:07 UTC 2026



Matteo Concas created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5519



## Summary
<!--
Please provide as much information as possible such as error messages or attaching logs
-->

Some weeks ago I added logic to park CPU cores that did not match the boot hart ID when not using SMP:

```c
#ifndef RTEMS_SMP
	li	t3, RISCV_BOOT_HARTID
	bne	a0, t3, .Lwfi
#endif
```

Today I realized that `Lwfi` is only defined when SMP is used. In this case, the label is simply replaced by the start of the memory so the program will jump there.

The CPU is still parked as it cannot progress after the instruction but it will do unnecessary operations, perhaps `Lwfi` could be moved out of the `RTEMS_SMP` block so it can be used in both cases.

<!-- Pre-set options
- milestone
-->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5519
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/20260312/c4b47da7/attachment.htm>


More information about the bugs mailing list