Add drm_io_mapping_create_wc to drmP.h. Linux's io_mapping_create_wc just takes a bus address and a size, but we need to pass along extra information, namely the bus space tag, which we shall pass via a struct drm_device.diff -r1.1.1.1.2.45 -r1.1.1.1.2.46 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
(riastradh)
--- src/sys/external/bsd/drm2/dist/include/drm/Attic/drmP.h 2013/07/24 03:15:28 1.1.1.1.2.45
+++ src/sys/external/bsd/drm2/dist/include/drm/Attic/drmP.h 2013/07/24 03:18:05 1.1.1.1.2.46
@@ -2139,5 +2139,20 @@
}
#endif /* defined(__NetBSD__) */
+#ifdef __NetBSD__
+
+/* XXX This is pretty kludgerific. */
+
+#include <linux/io-mapping.h>
+
+static inline struct io_mapping *
+drm_io_mapping_create_wc(struct drm_device *dev, resource_size_t addr,
+ unsigned long size)
+{
+ return bus_space_io_mapping_create_wc(dev->bst, addr, size);
+}
+
+#endif /* defined(__NetBSD__) */
+
#endif /* __KERNEL__ */
#endif