|
@@ -4,6 +4,7 @@
|
|
|
#define ARCH_HAS_IOREMAP_WC
|
|
|
|
|
|
#include <linux/compiler.h>
|
|
|
+#include <asm-generic/int-ll64.h>
|
|
|
|
|
|
#define build_mmio_read(name, size, type, reg, barrier) \
|
|
|
static inline type name(const volatile void __iomem *addr) \
|
|
@@ -57,6 +58,29 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
|
|
|
/* 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;
|
|
|
+
|
|
|
+ l = readl(p);
|
|
|
+ h = readl(p + 1);
|
|
|
+
|
|
|
+ return l + ((u64)h << 32);
|
|
|
+}
|
|
|
+
|
|
|
+static inline void writeq(__u64 val, volatile void __iomem *addr)
|
|
|
+{
|
|
|
+ writel(val, addr);
|
|
|
+ writel(val >> 32, addr+4);
|
|
|
+}
|
|
|
+
|
|
|
+#define readq readq
|
|
|
+#define writeq writeq
|
|
|
+
|
|
|
#endif
|
|
|
|
|
|
extern int iommu_bio_merge;
|