Use fuword32 for DRM_GET_USER_UNCHECKED when available. May help on 64-bit
platforms. Submitted by: Jung-uk Kim, jkim at niksun dot commain
parent
ed082798f4
commit
3e8792e705
|
@ -331,8 +331,13 @@ typedef vaddr_t vm_offset_t;
|
||||||
copyin(arg2, arg1, arg3)
|
copyin(arg2, arg1, arg3)
|
||||||
#define DRM_COPY_TO_USER_UNCHECKED(arg1, arg2, arg3) \
|
#define DRM_COPY_TO_USER_UNCHECKED(arg1, arg2, arg3) \
|
||||||
copyout(arg2, arg1, arg3)
|
copyout(arg2, arg1, arg3)
|
||||||
|
#if __FreeBSD_version > 500000
|
||||||
|
#define DRM_GET_USER_UNCHECKED(val, uaddr) \
|
||||||
|
((val) = fuword32(uaddr), 0)
|
||||||
|
#else
|
||||||
#define DRM_GET_USER_UNCHECKED(val, uaddr) \
|
#define DRM_GET_USER_UNCHECKED(val, uaddr) \
|
||||||
((val) = fuword(uaddr), 0)
|
((val) = fuword(uaddr), 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define cpu_to_le32(x) htole32(x)
|
#define cpu_to_le32(x) htole32(x)
|
||||||
#define le32_to_cpu(x) le32toh(x)
|
#define le32_to_cpu(x) le32toh(x)
|
||||||
|
|
Loading…
Reference in New Issue