Skip to content
Commit 0ca24ced authored by Chuck Jordan's avatar Chuck Jordan Committed by Anas Nashif
Browse files

arc: trap handler, used by irq_offload, now handles thread switch



It was found that the test latency_measure, when compiled
for microkernel, would fail on the ARC. This because the
trap handler, used by irq_offload, wasn't supporting thread switching.
This submission adds the code to do that, and the code size is
bigger only when CONFIG_MICROKERNEL is defined.

To keep code a bit smaller, there is a trick exploited here where
the AE bit is cleared in the STATUS32 register and in AUX_IRQ_ACT,
bit 1 is set, to make it appear as if the machine has interrupted
at priority 1 level. It then can jump into some common interrupt
exit code for regular interrupts and perform an RTIE instruction
to switch into the new thread.

test/latency_measure/microkernel now passes.

Change-Id: I1872a80bb09a259814540567f51721203201679a
Signed-off-by: default avatarChuck Jordan <cjordan@synopsys.com>
parent 4c7a5667
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment