]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
x86: Use explicit widths for MMIO read/write, and add 64bit variants
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 22 May 2013 13:25:37 +0000 (15:25 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 22 May 2013 13:25:37 +0000 (15:25 +0200)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/include/asm-x86/io.h

index 122d0a1af252266accae255c85548d58a96f6a2f..b156f4870bca9d79498d168aa6874038c9d3fe7e 100644 (file)
@@ -5,12 +5,14 @@
 #include <xen/types.h>
 #include <asm/page.h>
 
-#define readb(x) (*(volatile char *)(x))
-#define readw(x) (*(volatile short *)(x))
-#define readl(x) (*(volatile int *)(x))
-#define writeb(d,x) (*(volatile char *)(x) = (d))
-#define writew(d,x) (*(volatile short *)(x) = (d))
-#define writel(d,x) (*(volatile int *)(x) = (d))
+#define readb(x) (*(volatile uint8_t  *)(x))
+#define readw(x) (*(volatile uint16_t *)(x))
+#define readl(x) (*(volatile uint32_t *)(x))
+#define readq(x) (*(volatile uint64_t *)(x))
+#define writeb(d,x) (*(volatile uint8_t  *)(x) = (d))
+#define writew(d,x) (*(volatile uint16_t *)(x) = (d))
+#define writel(d,x) (*(volatile uint32_t *)(x) = (d))
+#define writeq(d,x) (*(volatile uint64_t *)(x) = (d))
 
 #define __OUT1(s,x) \
 static inline void out##s(unsigned x value, unsigned short port) {