summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2018-05-24 13:03:54 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-30 14:56:23 -0400
commit97983e9c6024ec8ae12275e5afff8122c733a3c8 (patch)
tree81d0bea48fe8d9f294156e56fd56120074846c6b /include
parentf0904be5e4bcd3d4c1bc18534129ee9418b97153 (diff)
gpu: nvgpu: Make the header compile for userspace builds
Do the quick fixes to make the header compile on userspace builds without changes. Namely: - define __packed only if not yet defined - Fix the NVGPU_NO_TIMEOUT definition ((u32)~0) --> ((__u32)~0U) - Remove the left-over definition of NVGPU_AS_IOCTL_MAP_BUFFER. It refers to a struct that no longer exists. Bug 1777616 Bug 1902982 Change-Id: I964aa5eff7bfade6af4fd0635680fd6af29d623b Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1729654 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/nvgpu.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h
index b14610bd..b36509b0 100644
--- a/include/uapi/linux/nvgpu.h
+++ b/include/uapi/linux/nvgpu.h
@@ -21,8 +21,13 @@
21 21
22#if !defined(__KERNEL__) 22#if !defined(__KERNEL__)
23#define __user 23#define __user
24
25/* Some userspace builds have __packed defined already */
26#if !defined(__packed)
24#define __packed __attribute__((packed)) 27#define __packed __attribute__((packed))
25#endif 28#endif /* __packed */
29
30#endif /* __KERNEL__ */
26 31
27/* 32/*
28 * /dev/nvhost-ctrl-gpu device 33 * /dev/nvhost-ctrl-gpu device
@@ -1376,7 +1381,7 @@ struct nvgpu_dbg_gpu_profiler_reserve_args {
1376 */ 1381 */
1377 1382
1378#define NVGPU_IOCTL_MAGIC 'H' 1383#define NVGPU_IOCTL_MAGIC 'H'
1379#define NVGPU_NO_TIMEOUT ((u32)~0) 1384#define NVGPU_NO_TIMEOUT ((__u32)~0U)
1380#define NVGPU_TIMEOUT_FLAG_DISABLE_DUMP 0 1385#define NVGPU_TIMEOUT_FLAG_DISABLE_DUMP 0
1381 1386
1382/* this is also the hardware memory format */ 1387/* this is also the hardware memory format */
@@ -1996,8 +2001,6 @@ struct nvgpu_as_get_sync_ro_map_args {
1996 _IOWR(NVGPU_AS_IOCTL_MAGIC, 2, struct nvgpu32_as_alloc_space_args) 2001 _IOWR(NVGPU_AS_IOCTL_MAGIC, 2, struct nvgpu32_as_alloc_space_args)
1997#define NVGPU_AS_IOCTL_FREE_SPACE \ 2002#define NVGPU_AS_IOCTL_FREE_SPACE \
1998 _IOWR(NVGPU_AS_IOCTL_MAGIC, 3, struct nvgpu_as_free_space_args) 2003 _IOWR(NVGPU_AS_IOCTL_MAGIC, 3, struct nvgpu_as_free_space_args)
1999#define NVGPU_AS_IOCTL_MAP_BUFFER \
2000 _IOWR(NVGPU_AS_IOCTL_MAGIC, 4, struct nvgpu_as_map_buffer_args)
2001#define NVGPU_AS_IOCTL_UNMAP_BUFFER \ 2004#define NVGPU_AS_IOCTL_UNMAP_BUFFER \
2002 _IOWR(NVGPU_AS_IOCTL_MAGIC, 5, struct nvgpu_as_unmap_buffer_args) 2005 _IOWR(NVGPU_AS_IOCTL_MAGIC, 5, struct nvgpu_as_unmap_buffer_args)
2003#define NVGPU_AS_IOCTL_ALLOC_SPACE \ 2006#define NVGPU_AS_IOCTL_ALLOC_SPACE \