drm: remove drm_u64_t, replace with uint64_t everwhere

This might break something, stdint.h inclusion in drm.h maybe required
but I'm not sure yet what platforms have it what ones don't.
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 52a6d92..8cee4fb 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -49,7 +49,6 @@
 #include <sys/mman.h>
 #include <sys/time.h>
 #include <stdarg.h>
-#include "drm.h"
 
 /* Not all systems have MAP_FAILED defined */
 #ifndef MAP_FAILED
@@ -2698,7 +2697,7 @@
 
 int drmBOCreate(int fd, unsigned long start, unsigned long size,
 		unsigned pageAlignment, void *user_buffer, drm_bo_type_t type,
-		drm_u64_t mask,
+		uint64_t mask,
 		unsigned hint, drmBO *buf)
 {
     struct drm_bo_create_arg arg;
@@ -2879,7 +2878,7 @@
 }
 
 int drmBOValidate(int fd, drmBO *buf,
-		  drm_u64_t flags, drm_u64_t mask,
+		  uint64_t flags, uint64_t mask,
 		  unsigned hint)
 {
     struct drm_bo_op_arg arg;
@@ -3057,7 +3056,7 @@
     struct drm_bo_op_arg *arg, *first;
     struct drm_bo_op_req *req;
     struct drm_bo_arg_rep *rep;
-    drm_u64_t *prevNext = NULL;
+    uint64_t *prevNext = NULL;
     drmBO *buf;
     int ret;
 
@@ -3121,7 +3120,7 @@
     struct drm_bo_op_arg *arg, *first;
     struct drm_bo_op_req *req;
     struct drm_bo_arg_rep *rep;
-    drm_u64_t *prevNext = NULL;
+    uint64_t *prevNext = NULL;
     drmBO *buf;
     unsigned fence_flags;
     int ret;
diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h
index d4260cc..230f54c 100644
--- a/libdrm/xf86drm.h
+++ b/libdrm/xf86drm.h
@@ -36,6 +36,7 @@
 
 #include <stdarg.h>
 #include <sys/types.h>
+#include <stdint.h>
 #include <drm.h>
 
 				/* Defaults, if nothing set in xf86config */
diff --git a/libdrm/xf86drmHash.c b/libdrm/xf86drmHash.c
index d1ade06..82cbc2a 100644
--- a/libdrm/xf86drmHash.c
+++ b/libdrm/xf86drmHash.c
@@ -74,7 +74,6 @@
 #define HASH_MAIN 0
 
 #if !HASH_MAIN
-# include "drm.h"
 # include "xf86drm.h"
 #endif
 
diff --git a/libdrm/xf86drmRandom.c b/libdrm/xf86drmRandom.c
index 61ffb07..ecab9e2 100644
--- a/libdrm/xf86drmRandom.c
+++ b/libdrm/xf86drmRandom.c
@@ -77,7 +77,6 @@
 #define RANDOM_MAIN 0
 
 #if !RANDOM_MAIN
-# include "drm.h"
 # include "xf86drm.h"
 #endif
 
diff --git a/libdrm/xf86drmSL.c b/libdrm/xf86drmSL.c
index ce60648..58aefac 100644
--- a/libdrm/xf86drmSL.c
+++ b/libdrm/xf86drmSL.c
@@ -44,7 +44,6 @@
 #define SL_MAIN 0
 
 #if !SL_MAIN
-# include "drm.h"
 # include "xf86drm.h"
 #else
 # include <sys/time.h>
diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h
index 61978bc..d1e0b28 100644
--- a/libdrm/xf86mm.h
+++ b/libdrm/xf86mm.h
@@ -107,9 +107,9 @@
 {
     drm_bo_type_t type;
     unsigned handle;
-    drm_u64_t mapHandle;
-    drm_u64_t flags;
-    drm_u64_t mask;
+    uint64_t mapHandle;
+    uint64_t flags;
+    uint64_t mask;
     unsigned mapFlags;
     unsigned long size;
     unsigned long offset;
@@ -180,7 +180,7 @@
 
 extern int drmBOCreate(int fd, unsigned long start, unsigned long size,
 		       unsigned pageAlignment,void *user_buffer,
-		       drm_bo_type_t type, drm_u64_t mask,
+		       drm_bo_type_t type, uint64_t mask,
 		       unsigned hint, drmBO *buf);
 extern int drmBODestroy(int fd, drmBO *buf);
 extern int drmBOReference(int fd, unsigned handle, drmBO *buf);
@@ -188,8 +188,8 @@
 extern int drmBOMap(int fd, drmBO *buf, unsigned mapFlags, unsigned mapHint,
 		    void **address);
 extern int drmBOUnmap(int fd, drmBO *buf);
-extern int drmBOValidate(int fd, drmBO *buf, drm_u64_t flags,
-			 drm_u64_t mask, unsigned hint);
+extern int drmBOValidate(int fd, drmBO *buf, uint64_t flags,
+			 uint64_t mask, unsigned hint);
 
 extern int drmBOFence(int fd, drmBO *buf, unsigned flags, unsigned fenceHandle);
 extern int drmBOInfo(int fd, drmBO *buf);
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 19e9d62..c5dfe6b 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -551,7 +551,7 @@
 	struct list_head head;		/**< list head */
 	struct drm_hash_item hash;
 	struct drm_map *map;			/**< mapping */
-	drm_u64_t user_token;
+	uint64_t user_token;
 	struct drm_mm_node *file_offset_node;
 };
 
@@ -931,9 +931,9 @@
 
 extern void drm_free_memctl(size_t size);
 extern int drm_alloc_memctl(size_t size);
-extern void drm_query_memctl(drm_u64_t *cur_used,
-			     drm_u64_t *low_threshold,
-			     drm_u64_t *high_threshold);
+extern void drm_query_memctl(uint64_t *cur_used,
+			     uint64_t *low_threshold,
+			     uint64_t *high_threshold);
 extern void drm_init_memctl(size_t low_threshold,
 			    size_t high_threshold,
 			    size_t unit_size);
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index 681d37f..374be04 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -2629,7 +2629,7 @@
 		return -ENOMEM;
 	}
 
-	list->user_token = ((drm_u64_t) list->hash.key) << PAGE_SHIFT;
+	list->user_token = ((uint64_t) list->hash.key) << PAGE_SHIFT;
 
 	return 0;
 }
diff --git a/linux-core/drm_memory.c b/linux-core/drm_memory.c
index 454c33e..f68a3a3 100644
--- a/linux-core/drm_memory.c
+++ b/linux-core/drm_memory.c
@@ -38,9 +38,9 @@
 
 static struct {
 	spinlock_t lock;
-	drm_u64_t cur_used;
-	drm_u64_t low_threshold;
-	drm_u64_t high_threshold;
+	uint64_t cur_used;
+	uint64_t low_threshold;
+	uint64_t high_threshold;
 } drm_memctl = {
 	.lock = SPIN_LOCK_UNLOCKED
 };
@@ -82,9 +82,9 @@
 }
 EXPORT_SYMBOL(drm_free_memctl);
 
-void drm_query_memctl(drm_u64_t *cur_used,
-		      drm_u64_t *low_threshold,
-		      drm_u64_t *high_threshold)
+void drm_query_memctl(uint64_t *cur_used,
+		      uint64_t *low_threshold,
+		      uint64_t *high_threshold)
 {
 	spin_lock(&drm_memctl.lock);
 	*cur_used = drm_memctl.cur_used;
diff --git a/linux-core/drm_proc.c b/linux-core/drm_proc.c
index 3f9cb02..08bf99d 100644
--- a/linux-core/drm_proc.c
+++ b/linux-core/drm_proc.c
@@ -436,9 +436,9 @@
 	int len = 0;
 	struct drm_buffer_manager *bm = &dev->bm;
 	struct drm_fence_manager *fm = &dev->fm;
-	drm_u64_t used_mem;
-	drm_u64_t low_mem;
-	drm_u64_t high_mem;
+	uint64_t used_mem;
+	uint64_t low_mem;
+	uint64_t high_mem;
 
 
 	if (offset > DRM_PROC_LIMIT) {
diff --git a/shared-core/drm.h b/shared-core/drm.h
index 3ab63d5..de8967a 100644
--- a/shared-core/drm.h
+++ b/shared-core/drm.h
@@ -127,16 +127,9 @@
 #define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT))
 
 #if defined(__linux__)
-#if defined(__KERNEL__)
-typedef __u64 drm_u64_t;
-#else
-typedef unsigned long long drm_u64_t;
-#endif
-
 typedef unsigned int drm_handle_t;
 #else
 #include <sys/types.h>
-typedef u_int64_t drm_u64_t;
 typedef unsigned long drm_handle_t;	/**< To mapped regions */
 #endif
 typedef unsigned int drm_context_t;	/**< GLXContext handle */
@@ -677,7 +670,7 @@
 	unsigned int flags;
 	unsigned int signaled;
 	unsigned int pad64;
-	drm_u64_t expand_pad[3]; /*Future expansion */
+	uint64_t expand_pad[3]; /*Future expansion */
 };
 
 /* Buffer permissions, referring to how the GPU uses the buffers.
@@ -792,8 +785,8 @@
 };
 
 struct drm_bo_info_req {
-	drm_u64_t mask;
-        drm_u64_t flags;
+	uint64_t mask;
+        uint64_t flags;
         unsigned int handle;
 	unsigned int hint;
 	unsigned int fence_class;
@@ -801,9 +794,9 @@
 };
 
 struct drm_bo_create_req {
-        drm_u64_t mask;
-	drm_u64_t size;
-	drm_u64_t buffer_start;
+        uint64_t mask;
+	uint64_t size;
+	uint64_t buffer_start;
 	unsigned int hint;
 	unsigned int page_alignment;
 	enum drm_bo_type type;
@@ -827,12 +820,12 @@
 #define DRM_BO_REP_BUSY 0x00000001
 
 struct drm_bo_info_rep {
-        drm_u64_t flags;
-        drm_u64_t mask;
-	drm_u64_t size;
-	drm_u64_t offset;
-	drm_u64_t arg_handle;
-	drm_u64_t buffer_start;
+        uint64_t flags;
+        uint64_t mask;
+	uint64_t size;
+	uint64_t offset;
+	uint64_t arg_handle;
+	uint64_t buffer_start;
 	unsigned int handle;
 	unsigned int fence_flags;
 	unsigned int rep_flags;
@@ -841,7 +834,7 @@
         unsigned int hw_tile_stride;
 	unsigned int tile_info;
 	unsigned int pad64;
-	drm_u64_t expand_pad[4]; /*Future expansion */
+	uint64_t expand_pad[4]; /*Future expansion */
 };
 
 struct drm_bo_arg_rep {
@@ -876,7 +869,7 @@
 };
 
 struct drm_bo_op_arg {
-	drm_u64_t next;
+	uint64_t next;
 	union {
 		struct drm_bo_op_req req;
 		struct drm_bo_arg_rep rep;
@@ -905,8 +898,8 @@
 	unsigned int major;
 	unsigned int minor;
 	unsigned int mem_type;
-	drm_u64_t p_offset;
-	drm_u64_t p_size;
+	uint64_t p_offset;
+	uint64_t p_size;
 };
 
 /**