summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2018-05-14 13:54:22 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-17 16:03:21 -0400
commitb4f8cd76e2de025a9bfb5a4836c52a95cd587faa (patch)
tree546d0120b17a96689b42fd9192f2ffc3169f2d1e /drivers/gpu/nvgpu/include
parent4654d9abd176043e69d548d53d516e78e4054d9e (diff)
gpu: nvgpu: Update POSIX BIT() macro to ULL
For most of the builds we have in GVS userspace is 64 bits. But it seems like at least some L4T userspace builds are either not 32 bits or have an UL that only covers 32 bits. This is seen in GVS: /dvs/git/dirty/git-master_modular/kernel/nvgpu/drivers/gpu/nvgpu/gv11b/mm_gv11b.c: In function 'gv11b_gpu_phys_addr': /dvs/git/dirty/git-master_modular/kernel/nvgpu/drivers/gpu/nvgpu/gv11b/mm_gv11b.c:273:3: error: left shift count >= width of type make[2]: *** [/dvs/git/dirty/git-master_modular/tmake/artifacts/CommonRules.tmk:318: mm_gv11b.o] Error 1 This patch simply bumps the UL to ULL in BIT() to make sure that we always have at least 64 bits available for the BIT() macro. JIRA NVGPU-525 Change-Id: I67de4338afc5bee4f1fa16faee6116e0e7dbf108 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1718564 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 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/posix/bitops.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/posix/bitops.h b/drivers/gpu/nvgpu/include/nvgpu/posix/bitops.h
index bfc6fef1..94618d14 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/posix/bitops.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/posix/bitops.h
@@ -33,7 +33,7 @@
33#define BITS_TO_LONGS(bits) \ 33#define BITS_TO_LONGS(bits) \
34 (bits + (BITS_PER_LONG - 1) / BITS_PER_LONG) 34 (bits + (BITS_PER_LONG - 1) / BITS_PER_LONG)
35 35
36#define BIT(i) (1UL << (i)) 36#define BIT(i) (1ULL << (i))
37 37
38#define GENMASK(h, l) \ 38#define GENMASK(h, l) \
39 (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) 39 (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h))))