diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-30 03:33:55 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-30 03:38:19 -0500 |
commit | a0b1131e479e5af32eefac8bc54c9742e23d638e (patch) | |
tree | bfd54384f53bd805b02fd0988be6f55038af9302 | |
parent | 2c5643b1c5c7fbb13f340d4c58944d9642f41796 (diff) |
x86: provide readq()/writeq() on 32-bit too, cleanup
Impact: cleanup
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/io.h | 17 |
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", ) | |||
55 | #define __raw_readq __readq | 55 | #define __raw_readq __readq |
56 | #define __raw_writeq writeq | 56 | #define __raw_writeq writeq |
57 | 57 | ||
58 | /* Let people know we have them */ | ||
59 | #define readq readq | ||
60 | #define writeq writeq | ||
61 | |||
62 | #else /* CONFIG_X86_32 from here */ | 58 | #else /* CONFIG_X86_32 from here */ |
63 | 59 | ||
64 | static inline __u64 readq(const volatile void __iomem *addr) | 60 | static inline __u64 readq(const volatile void __iomem *addr) |
65 | { | 61 | { |
66 | const volatile u32 __iomem *p = addr; | 62 | const volatile u32 __iomem *p = addr; |
67 | u32 l, h; | 63 | u32 low, high; |
68 | 64 | ||
69 | l = readl(p); | 65 | low = readl(p); |
70 | h = readl(p + 1); | 66 | high = readl(p + 1); |
71 | 67 | ||
72 | return l + ((u64)h << 32); | 68 | return low + ((u64)high << 32); |
73 | } | 69 | } |
74 | 70 | ||
75 | static inline void writeq(__u64 val, volatile void __iomem *addr) | 71 | static inline void writeq(__u64 val, volatile void __iomem *addr) |
@@ -78,11 +74,12 @@ static inline void writeq(__u64 val, volatile void __iomem *addr) | |||
78 | writel(val >> 32, addr+4); | 74 | writel(val >> 32, addr+4); |
79 | } | 75 | } |
80 | 76 | ||
77 | #endif | ||
78 | |||
79 | /* Let people know that we have them */ | ||
81 | #define readq readq | 80 | #define readq readq |
82 | #define writeq writeq | 81 | #define writeq writeq |
83 | 82 | ||
84 | #endif | ||
85 | |||
86 | extern int iommu_bio_merge; | 83 | extern int iommu_bio_merge; |
87 | 84 | ||
88 | #ifdef CONFIG_X86_32 | 85 | #ifdef CONFIG_X86_32 |