diff options
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/io.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h index bf5d629b3a39..0f954dc89cb3 100644 --- a/include/asm-x86/io.h +++ b/include/asm-x86/io.h | |||
@@ -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 | ||