Skip to content

Commit 93093d0

Browse files
author
Ingo Molnar
committed
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 <[email protected]>
1 parent a0b1131 commit 93093d0

File tree

1 file changed

+9
-9
lines changed
  • arch/x86/include/asm

1 file changed

+9
-9
lines changed

arch/x86/include/asm/io.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,11 @@ build_mmio_write(__writel, "l", unsigned int, "r", )
4646
#define mmiowb() barrier()
4747

4848
#ifdef CONFIG_X86_64
49+
4950
build_mmio_read(readq, "q", unsigned long, "=r", :"memory")
50-
build_mmio_read(__readq, "q", unsigned long, "=r", )
5151
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
5752

58-
#else /* CONFIG_X86_32 from here */
53+
#else
5954

6055
static inline __u64 readq(const volatile void __iomem *addr)
6156
{
@@ -76,9 +71,14 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
7671

7772
#endif
7873

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+
7979
/* Let people know that we have them */
80-
#define readq readq
81-
#define writeq writeq
80+
#define readq readq
81+
#define writeq writeq
8282

8383
extern int iommu_bio_merge;
8484

0 commit comments

Comments
 (0)