aboutsummaryrefslogtreecommitdiff
path: root/util/cacheinfo.c
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2018-09-10 19:27:42 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-02 18:47:55 +0200
commit782da5b2921c4d18777d5d5bd9385b9f7beae360 (patch)
tree6de1058555048bccfe1ec19a3de9ac0c3167c2b4 /util/cacheinfo.c
parent5fe21034292a2758639d6e66822a53770c7bcc0d (diff)
util: add atomic64
This introduces read/set accessors for int64_t and uint64_t. Signed-off-by: Emilio G. Cota <cota@braap.org> Message-Id: <20180910232752.31565-3-cota@braap.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/cacheinfo.c')
-rw-r--r--util/cacheinfo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/cacheinfo.c b/util/cacheinfo.c
index 6c8fe797bf..3cd080b83d 100644
--- a/util/cacheinfo.c
+++ b/util/cacheinfo.c
@@ -8,6 +8,7 @@
#include "qemu/osdep.h"
#include "qemu/host-utils.h"
+#include "qemu/atomic.h"
int qemu_icache_linesize = 0;
int qemu_icache_linesize_log;
@@ -182,4 +183,6 @@ static void __attribute__((constructor)) init_cache_info(void)
qemu_icache_linesize_log = ctz32(isize);
qemu_dcache_linesize = dsize;
qemu_dcache_linesize_log = ctz32(dsize);
+
+ atomic64_init();
}