summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2018-01-30 08:40:20 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2018-01-30 08:40:20 +0000
commitb2d310a24e3b01d6b1c395ff4fe52f280081e9df (patch)
tree3f61021bb27fd381c20a6ca18fa99827c4ab1b74 /sys/dev
parent47bd20f24f074718b137c777f78cd7031890bb3f (diff)
add iowrite64()/writeq()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/drm_linux.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h
index 8c8fd178c04..0a192a1f5cf 100644
--- a/sys/dev/pci/drm/drm_linux.h
+++ b/sys/dev/pci/drm/drm_linux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_linux.h,v 1.72 2018/01/30 08:37:44 jsg Exp $ */
+/* $OpenBSD: drm_linux.h,v 1.73 2018/01/30 08:40:19 jsg Exp $ */
/*
* Copyright (c) 2013, 2014, 2015 Mark Kettenis
* Copyright (c) 2017 Martin Pieuchot
@@ -1685,9 +1685,16 @@ iowrite32(u32 val, volatile void __iomem *addr)
*(volatile uint32_t *)addr = val;
}
+static inline void
+iowrite64(u64 val, volatile void __iomem *addr)
+{
+ *(volatile uint64_t *)addr = val;
+}
+
#define readl(p) ioread32(p)
#define writel(v, p) iowrite32(v, p)
#define readq(p) ioread64(p)
+#define writeq(v, p) iowrite64(v, p)
#define page_to_phys(page) (VM_PAGE_TO_PHYS(page))
#define page_to_pfn(pp) (VM_PAGE_TO_PHYS(pp) / PAGE_SIZE)