summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsd-core/drm_os_freebsd.h4
-rw-r--r--bsd-core/drm_os_netbsd.h4
-rw-r--r--bsd/drm_os_freebsd.h4
-rw-r--r--bsd/drm_os_netbsd.h4
4 files changed, 12 insertions, 4 deletions
diff --git a/bsd-core/drm_os_freebsd.h b/bsd-core/drm_os_freebsd.h
index b9869c9f..52f7aa2a 100644
--- a/bsd-core/drm_os_freebsd.h
+++ b/bsd-core/drm_os_freebsd.h
@@ -27,6 +27,7 @@
#include <machine/pmap.h>
#include <machine/bus.h>
#include <machine/resource.h>
+#include <sys/endian.h>
#include <sys/mman.h>
#include <sys/rman.h>
#include <sys/memrange.h>
@@ -240,7 +241,8 @@ typedef struct drm_chipinfo
char *name;
} drm_chipinfo_t;
-#define cpu_to_le32(x) (x) /* FIXME */
+#define cpu_to_le32(x) htole32(x)
+#define le32_to_cpu(x) le32toh(x)
typedef unsigned long dma_addr_t;
typedef u_int32_t atomic_t;
diff --git a/bsd-core/drm_os_netbsd.h b/bsd-core/drm_os_netbsd.h
index a0c4f78f..6dfea613 100644
--- a/bsd-core/drm_os_netbsd.h
+++ b/bsd-core/drm_os_netbsd.h
@@ -20,6 +20,7 @@
#include <sys/lkm.h>
/* For TIOCSPGRP/TIOCGPGRP */
#include <sys/ttycom.h>
+#include <sys/endian.h>
#include <uvm/uvm.h>
@@ -202,7 +203,8 @@ typedef struct drm_chipinfo
char *name;
} drm_chipinfo_t;
-#define cpu_to_le32(x) (x) /* FIXME */
+#define cpu_to_le32(x) htole32(x)
+#define le32_to_cpu(x) le32toh(x)
typedef u_int32_t dma_addr_t;
typedef volatile long atomic_t;
diff --git a/bsd/drm_os_freebsd.h b/bsd/drm_os_freebsd.h
index b9869c9f..52f7aa2a 100644
--- a/bsd/drm_os_freebsd.h
+++ b/bsd/drm_os_freebsd.h
@@ -27,6 +27,7 @@
#include <machine/pmap.h>
#include <machine/bus.h>
#include <machine/resource.h>
+#include <sys/endian.h>
#include <sys/mman.h>
#include <sys/rman.h>
#include <sys/memrange.h>
@@ -240,7 +241,8 @@ typedef struct drm_chipinfo
char *name;
} drm_chipinfo_t;
-#define cpu_to_le32(x) (x) /* FIXME */
+#define cpu_to_le32(x) htole32(x)
+#define le32_to_cpu(x) le32toh(x)
typedef unsigned long dma_addr_t;
typedef u_int32_t atomic_t;
diff --git a/bsd/drm_os_netbsd.h b/bsd/drm_os_netbsd.h
index a0c4f78f..6dfea613 100644
--- a/bsd/drm_os_netbsd.h
+++ b/bsd/drm_os_netbsd.h
@@ -20,6 +20,7 @@
#include <sys/lkm.h>
/* For TIOCSPGRP/TIOCGPGRP */
#include <sys/ttycom.h>
+#include <sys/endian.h>
#include <uvm/uvm.h>
@@ -202,7 +203,8 @@ typedef struct drm_chipinfo
char *name;
} drm_chipinfo_t;
-#define cpu_to_le32(x) (x) /* FIXME */
+#define cpu_to_le32(x) htole32(x)
+#define le32_to_cpu(x) le32toh(x)
typedef u_int32_t dma_addr_t;
typedef volatile long atomic_t;