Avoid BITS_PER_LONG in drm_bufs.c.
Dumb implementation of a subset of Linux's idr abstraction.

An idr maintains a mapping from integers to data, like file descriptors
to struct file pointers.
Define __user to be empty in <linux/kernel.h>.

__user qualifies a pointer into userspace for static analyzers.
Include <linux/kernel.h> and <linux/types.h> in <drm/drm_hashtab.h>.
Add <drm/drm_os_netbsd.h> and include it in <drm/drmP.h>.
Include <linux/spinlock.h> in <drm/drm_mm.h>.
Omit unused drm_mm_initialized, which uses list internals.
Add shim <linux/uidgid.h>.
Include <linux/atomic.h> and <linux/uidgid.h> in <drm/drmP.h>.
Remove now unused <drm/drm_os_linux.h> shim.
Implement drm waitqueues with condvars.  Include in drm_os_netbsd.h.
Remove Linuxoid definitions of __OS_HAS_{AGP,MTRR} from drmP.h.
Convert drmP.h to use drm_waitqueue_t instead of wait_queue_head_t.
Add drm_agp_netbsd.h and include it in drm_os_netbsd.h.
Add u64, s8, s16, s32, and s64 to <linux/types.h>.
Define resource_size_t to be bus_size_t in <linux/types.h>.
Fill <linux/mutex.h> with aliases for our mutex abstraction.

mutex_lock_interruptible isn't; this may require revisiting.
Implement krefs in <linux/kref.h>.
Include <linux/kref.h> in <drm/drmP.h>.
Include <sys/systm.h> in <linux/kernel.h> for offsetof.