diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2013-05-22 15:25:37 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-05-22 15:25:37 +0200 |
commit | fbf7a46dae7f18a313f9317bbf9afc2249941a95 (patch) | |
tree | 603da568a5191002dde3d45b70f4b363e09f31be | |
parent | 3a4a1d297766c0617129fb9eeef164293926ae89 (diff) | |
download | xen-fbf7a46dae7f18a313f9317bbf9afc2249941a95.tar.gz xen-fbf7a46dae7f18a313f9317bbf9afc2249941a95.tar.bz2 xen-fbf7a46dae7f18a313f9317bbf9afc2249941a95.zip |
x86: Use explicit widths for MMIO read/write, and add 64bit variants
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
-rw-r--r-- | xen/include/asm-x86/io.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/xen/include/asm-x86/io.h b/xen/include/asm-x86/io.h index 122d0a1af2..b156f4870b 100644 --- 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) { |