提交 a0b1131e 编写于 作者: I Ingo Molnar

x86: provide readq()/writeq() on 32-bit too, cleanup

Impact: cleanup
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 2c5643b1
...@@ -55,21 +55,17 @@ build_mmio_write(__writeq, "q", unsigned long, "r", ) ...@@ -55,21 +55,17 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
#define __raw_readq __readq #define __raw_readq __readq
#define __raw_writeq writeq #define __raw_writeq writeq
/* Let people know we have them */
#define readq readq
#define writeq writeq
#else /* CONFIG_X86_32 from here */ #else /* CONFIG_X86_32 from here */
static inline __u64 readq(const volatile void __iomem *addr) static inline __u64 readq(const volatile void __iomem *addr)
{ {
const volatile u32 __iomem *p = addr; const volatile u32 __iomem *p = addr;
u32 l, h; u32 low, high;
l = readl(p); low = readl(p);
h = readl(p + 1); high = readl(p + 1);
return l + ((u64)h << 32); return low + ((u64)high << 32);
} }
static inline void writeq(__u64 val, volatile void __iomem *addr) 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,11 +74,12 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
writel(val >> 32, addr+4); writel(val >> 32, addr+4);
} }
#endif
/* Let people know that we have them */
#define readq readq #define readq readq
#define writeq writeq #define writeq writeq
#endif
extern int iommu_bio_merge; extern int iommu_bio_merge;
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册