diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/gmmu.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/posix/types.h | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c index 0b57b88d..1e4065ba 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <nvgpu/barrier.h> | 31 | #include <nvgpu/barrier.h> |
32 | #include <nvgpu/vidmem.h> | 32 | #include <nvgpu/vidmem.h> |
33 | #include <nvgpu/sizes.h> | 33 | #include <nvgpu/sizes.h> |
34 | #include <nvgpu/types.h> | ||
34 | 35 | ||
35 | #include "gk20a/gk20a.h" | 36 | #include "gk20a/gk20a.h" |
36 | #include "gk20a/mm_gk20a.h" | 37 | #include "gk20a/mm_gk20a.h" |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/posix/types.h b/drivers/gpu/nvgpu/include/nvgpu/posix/types.h index 10754a09..71bac1d0 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/posix/types.h +++ b/drivers/gpu/nvgpu/include/nvgpu/posix/types.h | |||
@@ -55,16 +55,22 @@ typedef long long s64; | |||
55 | __a < __b ? __a : __b; \ | 55 | __a < __b ? __a : __b; \ |
56 | }) | 56 | }) |
57 | 57 | ||
58 | #if defined(min) | ||
59 | #undef min | ||
60 | #endif | ||
61 | #if defined(max) | ||
62 | #undef max | ||
63 | #endif | ||
64 | |||
58 | #define min(a, b) \ | 65 | #define min(a, b) \ |
59 | ({ \ | 66 | ({ \ |
60 | (a) < (b) ? a : b; \ | 67 | (a) < (b) ? a : b; \ |
61 | }) | 68 | }) |
62 | #define min3(a, b, c) min(min(a, b), c) | ||
63 | |||
64 | #define max(a, b) \ | 69 | #define max(a, b) \ |
65 | ({ \ | 70 | ({ \ |
66 | (a) > (b) ? a : b; \ | 71 | (a) > (b) ? a : b; \ |
67 | }) | 72 | }) |
73 | #define min3(a, b, c) min(min(a, b), c) | ||
68 | 74 | ||
69 | #define PAGE_SIZE 4096 | 75 | #define PAGE_SIZE 4096 |
70 | 76 | ||