zephyr/arch/arc
Chuck Jordan 6c86ed85fe arc: fix stack corruption caused by firq handling
There are a few problems with the code being repaired here.
1. A seti was used to re-enable all interrupts, even though the
thread being switched to may have had certain interrupt priorities masked.
2. saved status32 already has SC bit if thats wanted, so its ok to just
restore status32 as-is w/o needing to and off anything.
3. the code is difficult to write using kflag and seti because as you
restore registers, there aren't any to use. But we can exploit a
trick where we pretend an interrupt has occured by setting a bit in
AUX_IRQ_ACT, and then use RTIE instruction to restore status32
atomically with branching to return address. Something about the way
this code was written was causing stack corruptings and crashes in an
application that uses a high rate of both FIRQ and Regular interrupts.

Change-Id: Ia7166d51f0e750c07832ab115b7151ce37ee0278
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-06-01 14:25:01 +00:00
..
core arc: fix stack corruption caused by firq handling 2016-06-01 14:25:01 +00:00
include arc: improved saving of lp_<count,start,end> using GPRs 2016-05-29 22:23:13 +00:00
soc build: Introduce concept of SoC specific build flags 2016-05-27 10:04:29 -05:00
Kbuild new SoC naming convention 2016-04-18 21:24:59 +00:00
Kconfig Cleanup whitespace in Kconfig files 2016-05-25 13:28:07 -05:00
Makefile build: Introduce concept of SoC specific build flags 2016-05-27 10:04:29 -05:00
defconfig