[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1 of 2] x86: Use explicit widths for MMIO read/write, and add 64bit varients



Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

diff -r 2369a9d759f0 -r 12e991b1d50b xen/include/asm-x86/io.h
--- a/xen/include/asm-x86/io.h
+++ b/xen/include/asm-x86/io.h
@@ -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) {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.