PSR register not getting updated

Daniel Cederman cederman at gaisler.com
Thu Nov 12 10:43:21 UTC 2015


When I think a bit more of it, one probably should update the PSR after 
the heir has been acquired, as the task could potentially be acquired 
and released again with a new PSR by another core before the swap.

On 2015-11-12 11:27, Daniel Cederman wrote:
> Hello,
>
> I experienced a bug when using 4.11 SMP on a LEON4 system. One of the
> tasks in my program suddenly lost the FPU enable bit in the PSR register
> after a task switch. I tracked down the problem being due to the task
> switching code not updating the PSR if the heir changes during the
> switch (which happens if the original heir gets scheduled on another
> CPU). I am submitting a patch that updates the PSR register to match the
> value for the new heir. It can probably be improved by moving the PSR
> update to after the heir has been acquired, but I wanted to change as
> little as possible.
>

-- 
Daniel Cederman
Software Engineer
Cobham Gaisler
T : +46 (0) 31 775 8665
F : +46 (0) 31 421407
daniel.cederman at gaisler.com

Cobham Gaisler AB, Kungsgatan 12, SE-411 19, GÖTEBORG, Sweden.
+46 (0) 31 775 8650, www.cobham.com/gaisler


More information about the devel mailing list