diff options
Diffstat (limited to 'include/asm-x86/io.h')
-rw-r--r-- | include/asm-x86/io.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h index bf5d629b3a39..72b7719523bf 100644 --- a/include/asm-x86/io.h +++ b/include/asm-x86/io.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X86_IO_H | 1 | #ifndef ASM_X86__IO_H |
2 | #define _ASM_X86_IO_H | 2 | #define ASM_X86__IO_H |
3 | 3 | ||
4 | #define ARCH_HAS_IOREMAP_WC | 4 | #define ARCH_HAS_IOREMAP_WC |
5 | 5 | ||
@@ -21,7 +21,7 @@ extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | |||
21 | 21 | ||
22 | #define build_mmio_read(name, size, type, reg, barrier) \ | 22 | #define build_mmio_read(name, size, type, reg, barrier) \ |
23 | static inline type name(const volatile void __iomem *addr) \ | 23 | static inline type name(const volatile void __iomem *addr) \ |
24 | { type ret; asm volatile("mov" size " %1,%0":"=" reg (ret) \ | 24 | { type ret; asm volatile("mov" size " %1,%0":reg (ret) \ |
25 | :"m" (*(volatile type __force *)addr) barrier); return ret; } | 25 | :"m" (*(volatile type __force *)addr) barrier); return ret; } |
26 | 26 | ||
27 | #define build_mmio_write(name, size, type, reg, barrier) \ | 27 | #define build_mmio_write(name, size, type, reg, barrier) \ |
@@ -29,13 +29,13 @@ static inline void name(type val, volatile void __iomem *addr) \ | |||
29 | { asm volatile("mov" size " %0,%1": :reg (val), \ | 29 | { asm volatile("mov" size " %0,%1": :reg (val), \ |
30 | "m" (*(volatile type __force *)addr) barrier); } | 30 | "m" (*(volatile type __force *)addr) barrier); } |
31 | 31 | ||
32 | build_mmio_read(readb, "b", unsigned char, "q", :"memory") | 32 | build_mmio_read(readb, "b", unsigned char, "=q", :"memory") |
33 | build_mmio_read(readw, "w", unsigned short, "r", :"memory") | 33 | build_mmio_read(readw, "w", unsigned short, "=r", :"memory") |
34 | build_mmio_read(readl, "l", unsigned int, "r", :"memory") | 34 | build_mmio_read(readl, "l", unsigned int, "=r", :"memory") |
35 | 35 | ||
36 | build_mmio_read(__readb, "b", unsigned char, "q", ) | 36 | build_mmio_read(__readb, "b", unsigned char, "=q", ) |
37 | build_mmio_read(__readw, "w", unsigned short, "r", ) | 37 | build_mmio_read(__readw, "w", unsigned short, "=r", ) |
38 | build_mmio_read(__readl, "l", unsigned int, "r", ) | 38 | build_mmio_read(__readl, "l", unsigned int, "=r", ) |
39 | 39 | ||
40 | build_mmio_write(writeb, "b", unsigned char, "q", :"memory") | 40 | build_mmio_write(writeb, "b", unsigned char, "q", :"memory") |
41 | build_mmio_write(writew, "w", unsigned short, "r", :"memory") | 41 | build_mmio_write(writew, "w", unsigned short, "r", :"memory") |
@@ -59,8 +59,8 @@ build_mmio_write(__writel, "l", unsigned int, "r", ) | |||
59 | #define mmiowb() barrier() | 59 | #define mmiowb() barrier() |
60 | 60 | ||
61 | #ifdef CONFIG_X86_64 | 61 | #ifdef CONFIG_X86_64 |
62 | build_mmio_read(readq, "q", unsigned long, "r", :"memory") | 62 | build_mmio_read(readq, "q", unsigned long, "=r", :"memory") |
63 | build_mmio_read(__readq, "q", unsigned long, "r", ) | 63 | build_mmio_read(__readq, "q", unsigned long, "=r", ) |
64 | build_mmio_write(writeq, "q", unsigned long, "r", :"memory") | 64 | build_mmio_write(writeq, "q", unsigned long, "r", :"memory") |
65 | build_mmio_write(__writeq, "q", unsigned long, "r", ) | 65 | build_mmio_write(__writeq, "q", unsigned long, "r", ) |
66 | 66 | ||
@@ -73,6 +73,8 @@ build_mmio_write(__writeq, "q", unsigned long, "r", ) | |||
73 | #define writeq writeq | 73 | #define writeq writeq |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | extern int iommu_bio_merge; | ||
77 | |||
76 | #ifdef CONFIG_X86_32 | 78 | #ifdef CONFIG_X86_32 |
77 | # include "io_32.h" | 79 | # include "io_32.h" |
78 | #else | 80 | #else |
@@ -99,4 +101,4 @@ extern void early_iounmap(void *addr, unsigned long size); | |||
99 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | 101 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); |
100 | 102 | ||
101 | 103 | ||
102 | #endif /* _ASM_X86_IO_H */ | 104 | #endif /* ASM_X86__IO_H */ |