mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
f0904be5e4
commit
97983e9c60
@@ -21,8 +21,13 @@
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
#define __user
|
||||
|
||||
/* Some userspace builds have __packed defined already */
|
||||
#if !defined(__packed)
|
||||
#define __packed __attribute__((packed))
|
||||
#endif
|
||||
#endif /* __packed */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/*
|
||||
* /dev/nvhost-ctrl-gpu device
|
||||
@@ -1376,7 +1381,7 @@ struct nvgpu_dbg_gpu_profiler_reserve_args {
|
||||
*/
|
||||
|
||||
#define NVGPU_IOCTL_MAGIC 'H'
|
||||
#define NVGPU_NO_TIMEOUT ((u32)~0)
|
||||
#define NVGPU_NO_TIMEOUT ((__u32)~0U)
|
||||
#define NVGPU_TIMEOUT_FLAG_DISABLE_DUMP 0
|
||||
|
||||
/* this is also the hardware memory format */
|
||||
@@ -1996,8 +2001,6 @@ struct nvgpu_as_get_sync_ro_map_args {
|
||||
_IOWR(NVGPU_AS_IOCTL_MAGIC, 2, struct nvgpu32_as_alloc_space_args)
|
||||
#define NVGPU_AS_IOCTL_FREE_SPACE \
|
||||
_IOWR(NVGPU_AS_IOCTL_MAGIC, 3, struct nvgpu_as_free_space_args)
|
||||
#define NVGPU_AS_IOCTL_MAP_BUFFER \
|
||||
_IOWR(NVGPU_AS_IOCTL_MAGIC, 4, struct nvgpu_as_map_buffer_args)
|
||||
#define NVGPU_AS_IOCTL_UNMAP_BUFFER \
|
||||
_IOWR(NVGPU_AS_IOCTL_MAGIC, 5, struct nvgpu_as_unmap_buffer_args)
|
||||
#define NVGPU_AS_IOCTL_ALLOC_SPACE \
|
||||
|
||||
Reference in New Issue
Block a user