summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/io.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-30 09:33:55 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-30 09:38:19 +0100
commita0b1131e479e5af32eefac8bc54c9742e23d638e (patch)
treebfd54384f53bd805b02fd0988be6f55038af9302 /arch/x86/include/asm/io.h
parent2c5643b1c5c7fbb13f340d4c58944d9642f41796 (diff)
downloadblackbird-obmc-linux-a0b1131e479e5af32eefac8bc54c9742e23d638e.tar.gz
blackbird-obmc-linux-a0b1131e479e5af32eefac8bc54c9742e23d638e.zip
x86: provide readq()/writeq() on 32-bit too, cleanup
Impact: cleanup 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.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 25946449df4f..3ccfaf610c89 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -55,21 +55,17 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
#define __raw_readq __readq
#define __raw_writeq writeq
-/* Let people know we have them */
-#define readq readq
-#define writeq writeq
-
#else /* CONFIG_X86_32 from here */
static inline __u64 readq(const volatile void __iomem *addr)
{
const volatile u32 __iomem *p = addr;
- u32 l, h;
+ u32 low, high;
- l = readl(p);
- h = readl(p + 1);
+ low = readl(p);
+ high = readl(p + 1);
- return l + ((u64)h << 32);
+ return low + ((u64)high << 32);
}
static inline void writeq(__u64 val, volatile void __iomem *addr)
@@ -78,11 +74,12 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
writel(val >> 32, addr+4);
}
+#endif
+
+/* Let people know that we have them */
#define readq readq
#define writeq writeq
-#endif
-
extern int iommu_bio_merge;
#ifdef CONFIG_X86_32
OpenPOWER on IntegriCloud