Use fuword32 for DRM_GET_USER_UNCHECKED when available. May help on 64-bit

platforms.
Submitted by: Jung-uk Kim, jkim at niksun dot com
main
Eric Anholt 2005-02-14 03:28:01 +00:00
parent ed082798f4
commit 3e8792e705
1 changed files with 6 additions and 1 deletions

View File

@ -331,8 +331,13 @@ typedef vaddr_t vm_offset_t;
copyin(arg2, arg1, arg3)
#define DRM_COPY_TO_USER_UNCHECKED(arg1, arg2, arg3) \
copyout(arg2, arg1, arg3)
#define DRM_GET_USER_UNCHECKED(val, uaddr) \
#if __FreeBSD_version > 500000
#define DRM_GET_USER_UNCHECKED(val, uaddr) \
((val) = fuword32(uaddr), 0)
#else
#define DRM_GET_USER_UNCHECKED(val, uaddr) \
((val) = fuword(uaddr), 0)
#endif
#define cpu_to_le32(x) htole32(x)
#define le32_to_cpu(x) le32toh(x)