Skip to content

Commit a0b1131

Browse files
author
Ingo Molnar
committed
x86: provide readq()/writeq() on 32-bit too, cleanup
Impact: cleanup Signed-off-by: Ingo Molnar <[email protected]>
1 parent 2c5643b commit a0b1131

File tree

1 file changed

+7
-10
lines changed
  • arch/x86/include/asm

1 file changed

+7
-10
lines changed

arch/x86/include/asm/io.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,17 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
5555
#define __raw_readq __readq
5656
#define __raw_writeq writeq
5757

58-
/* Let people know we have them */
59-
#define readq readq
60-
#define writeq writeq
61-
6258
#else /* CONFIG_X86_32 from here */
6359

6460
static inline __u64 readq(const volatile void __iomem *addr)
6561
{
6662
const volatile u32 __iomem *p = addr;
67-
u32 l, h;
63+
u32 low, high;
6864

69-
l = readl(p);
70-
h = readl(p + 1);
65+
low = readl(p);
66+
high = readl(p + 1);
7167

72-
return l + ((u64)h << 32);
68+
return low + ((u64)high << 32);
7369
}
7470

7571
static inline void writeq(__u64 val, volatile void __iomem *addr)
@@ -78,11 +74,12 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
7874
writel(val >> 32, addr+4);
7975
}
8076

77+
#endif
78+
79+
/* Let people know that we have them */
8180
#define readq readq
8281
#define writeq writeq
8382

84-
#endif
85-
8683
extern int iommu_bio_merge;
8784

8885
#ifdef CONFIG_X86_32

0 commit comments

Comments
 (0)