arm: Fix irq offload inline asm memory ordering.

Add a "memory" clobber to inline asm SVC call to ensure the compiler
does not reorder the instruction relative to other memory accesses.

Issue found by inspect the source code.  There is no evidence to
suggest that this bug will manifest for any current ARM target using a
current compiler.

Change-Id: I32b1e5ede02a6dbea02bb8f98729fff1cca1ef2a
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This commit is contained in:
Marcus Shawcroft 2016-12-08 22:13:32 +00:00 committed by Anas Nashif
commit 362fb9e62b

View file

@ -38,7 +38,7 @@ void irq_offload(irq_offload_routine_t routine, void *parameter)
offload_routine = routine;
offload_param = parameter;
__asm__ volatile ("svc #1");
__asm__ volatile ("svc #1" : : : "memory");
irq_unlock(key);
}