1 #ifndef _LINUX_IO_64_NONATOMIC_HI_LO_H_
2 #define _LINUX_IO_64_NONATOMIC_HI_LO_H_
5 #include <asm-generic/int-ll64.h>
7 static inline __u64 hi_lo_readq(const volatile void __iomem *addr)
9 const volatile u32 __iomem *p = addr;
15 return low + ((u64)high << 32);
18 static inline void hi_lo_writeq(__u64 val, volatile void __iomem *addr)
20 writel(val >> 32, addr + 4);
24 static inline __u64 hi_lo_readq_relaxed(const volatile void __iomem *addr)
26 const volatile u32 __iomem *p = addr;
29 high = readl_relaxed(p + 1);
30 low = readl_relaxed(p);
32 return low + ((u64)high << 32);
35 static inline void hi_lo_writeq_relaxed(__u64 val, volatile void __iomem *addr)
37 writel_relaxed(val >> 32, addr + 4);
38 writel_relaxed(val, addr);
42 #define readq hi_lo_readq
46 #define writeq hi_lo_writeq
50 #define readq_relaxed hi_lo_readq_relaxed
53 #ifndef writeq_relaxed
54 #define writeq_relaxed hi_lo_writeq_relaxed
57 #endif /* _LINUX_IO_64_NONATOMIC_HI_LO_H_ */