diff options
author | Alexandru Elisei <alexandru.elisei@arm.com> | 2020-01-31 16:37:23 +0000 |
---|---|---|
committer | Andrew Jones <drjones@redhat.com> | 2020-04-03 09:40:33 +0200 |
commit | 6240ec9413f179dffb588e5cffce1039023bb725 (patch) | |
tree | 7fa3a333bae6277f4a98d729532e9155746040fb | |
parent | f618b331bb8ad9aa76ac717bdae9db8f54165f83 (diff) | |
download | kvm-unit-tests-6240ec9413f179dffb588e5cffce1039023bb725.tar.gz |
arm64: timer: Make irq_received volatile
The irq_received field is modified by the interrupt handler. Make it
volatile so that the compiler doesn't reorder accesses with regard to
the instruction that will be causing the interrupt.
Suggested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
-rw-r--r-- | arm/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arm/timer.c b/arm/timer.c index e758e84..82f8911 100644 --- a/arm/timer.c +++ b/arm/timer.c @@ -109,7 +109,7 @@ static void write_ptimer_ctl(u64 val) struct timer_info { u32 irq; u32 irq_flags; - bool irq_received; + volatile bool irq_received; u64 (*read_counter)(void); u64 (*read_cval)(void); void (*write_cval)(u64); |