diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-30 04:20:20 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-30 04:26:18 -0500 |
commit | 93093d099e5dd0c258fd530c12668e828c20df41 (patch) | |
tree | 7cdf1edac6655fcbd2eee245d4349d876e15287a /arch/x86/include/asm/io.h | |
parent | a0b1131e479e5af32eefac8bc54c9742e23d638e (diff) |
x86: provide readq()/writeq() on 32-bit too, complete
if HAVE_READQ/HAVE_WRITEQ are defined, the full range of readq/writeq
APIs has to be provided to drivers:
drivers/infiniband/hw/amso1100/c2.c: In function 'c2_tx_ring_alloc':
drivers/infiniband/hw/amso1100/c2.c:133: error: implicit declaration of function '__raw_writeq'
So provide them on 32-bit as well. Also, map all the APIs to the
strongest ordering variant. It's way too easy to mess such details
up in drivers and the difference between "memory" and "" constrained
asm() constructs is in the noise range.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/io.h')
-rw-r--r-- | arch/x86/include/asm/io.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 3ccfaf610c89..33513b9a67f3 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h | |||
@@ -46,16 +46,11 @@ build_mmio_write(__writel, "l", unsigned int, "r", ) | |||
46 | #define mmiowb() barrier() | 46 | #define mmiowb() barrier() |
47 | 47 | ||
48 | #ifdef CONFIG_X86_64 | 48 | #ifdef CONFIG_X86_64 |
49 | |||
49 | build_mmio_read(readq, "q", unsigned long, "=r", :"memory") | 50 | build_mmio_read(readq, "q", unsigned long, "=r", :"memory") |
50 | build_mmio_read(__readq, "q", unsigned long, "=r", ) | ||
51 | build_mmio_write(writeq, "q", unsigned long, "r", :"memory") | 51 | build_mmio_write(writeq, "q", unsigned long, "r", :"memory") |
52 | build_mmio_write(__writeq, "q", unsigned long, "r", ) | ||
53 | |||
54 | #define readq_relaxed(a) __readq(a) | ||
55 | #define __raw_readq __readq | ||
56 | #define __raw_writeq writeq | ||
57 | 52 | ||
58 | #else /* CONFIG_X86_32 from here */ | 53 | #else |
59 | 54 | ||
60 | static inline __u64 readq(const volatile void __iomem *addr) | 55 | static inline __u64 readq(const volatile void __iomem *addr) |
61 | { | 56 | { |
@@ -76,9 +71,14 @@ static inline void writeq(__u64 val, volatile void __iomem *addr) | |||
76 | 71 | ||
77 | #endif | 72 | #endif |
78 | 73 | ||
74 | #define readq_relaxed(a) readq(a) | ||
75 | |||
76 | #define __raw_readq(a) readq(a) | ||
77 | #define __raw_writeq(val, addr) writeq(val, addr) | ||
78 | |||
79 | /* Let people know that we have them */ | 79 | /* Let people know that we have them */ |
80 | #define readq readq | 80 | #define readq readq |
81 | #define writeq writeq | 81 | #define writeq writeq |
82 | 82 | ||
83 | extern int iommu_bio_merge; | 83 | extern int iommu_bio_merge; |
84 | 84 | ||