summary refs log tree commit diff stats
path: root/hw/i2c/omap_i2c.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2018-08-14 09:31:58 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2018-08-23 18:46:25 +0200
commitc1ff073cd88eddce5a0870791431878b96d08157 (patch)
treeffe953a1e92d208a9151bdf3c67cee4ea10a9a45 /hw/i2c/omap_i2c.c
parent900610e631c0371070aad4d9482fd42915166948 (diff)
downloadfocaccia-qemu-c1ff073cd88eddce5a0870791431878b96d08157.tar.gz
focaccia-qemu-c1ff073cd88eddce5a0870791431878b96d08157.zip
cpus: protect all icount computation with seqlock
Move the icount->ns computation to cpu_get_icount, and make
cpu_get_icount_locked return the raw value.  This makes the
atomic_read__nocheck safe, because it now happens always inside a
seqlock and any torn reads will be retried.  qemu_icount_bias and
icount_time_shift also need to be accessed with atomics.  At the
same time, however, you don't need atomic_read within the writer,
because no concurrent writes are possible.

The fix to vmstate lets us keep the struct nicely packed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i2c/omap_i2c.c')
0 files changed, 0 insertions, 0 deletions