diff options
Diffstat (limited to 'xen/include/asm-x86/io.h')
-rw-r--r-- | xen/include/asm-x86/io.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xen/include/asm-x86/io.h b/xen/include/asm-x86/io.h index 2d92fc9234..2b733e4e86 100644 --- a/xen/include/asm-x86/io.h +++ b/xen/include/asm-x86/io.h @@ -54,6 +54,15 @@ static inline void * phys_to_virt(unsigned long address) #define page_to_pfn(_page) ((unsigned long)((_page) - frame_table)) #define page_to_virt(_page) phys_to_virt(page_to_phys(_page)) +/* We don't need real ioremap() on Xen/x86. */ +#define ioremap(x,l) (__va(x)) + +#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)) /* * IO bus memory addresses are also 1:1 with the physical address |