From: Marc-André Lureau marcandre.lureau@redhat.com
Signed-off-by: Marc-André Lureau marcandre.lureau@redhat.com Reviewed-by: Stefan Berger stefanb@linux.vnet.ibm.com Tested-by: Stefan Berger stefanb@linux.vnet.ibm.com --- src/x86.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/src/x86.h b/src/x86.h index 4aea65c..c7bb60d 100644 --- a/src/x86.h +++ b/src/x86.h @@ -211,6 +211,11 @@ static inline void writeb(void *addr, u8 val) { barrier(); *(volatile u8 *)addr = val; } +static inline u64 readq(const void *addr) { + u64 val = *(volatile const u64 *)addr; + barrier(); + return val; +} static inline u32 readl(const void *addr) { u32 val = *(volatile const u32 *)addr; barrier();