diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/barrier.h | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/barrier.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/barrier.h b/drivers/gpu/nvgpu/include/nvgpu/barrier.h index 01bd3023..03a14a99 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/barrier.h +++ b/drivers/gpu/nvgpu/include/nvgpu/barrier.h | |||
@@ -47,4 +47,13 @@ | |||
47 | 47 | ||
48 | #define NV_ACCESS_ONCE(x) __NV_ACCESS_ONCE(x) | 48 | #define NV_ACCESS_ONCE(x) __NV_ACCESS_ONCE(x) |
49 | 49 | ||
50 | /* | ||
51 | * Sometimes we want to prevent speculation. | ||
52 | */ | ||
53 | #ifdef __NVGPU_PREVENT_UNTRUSTED_SPECULATION | ||
54 | #define nvgpu_speculation_barrier() __nvgpu_speculation_barrier() | ||
55 | #else | ||
56 | #define nvgpu_speculation_barrier() | ||
57 | #endif | ||
58 | |||
50 | #endif /* __NVGPU_BARRIER_H__ */ | 59 | #endif /* __NVGPU_BARRIER_H__ */ |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/barrier.h b/drivers/gpu/nvgpu/include/nvgpu/linux/barrier.h index b20f9462..ef867c44 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/barrier.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/barrier.h | |||
@@ -32,4 +32,6 @@ | |||
32 | 32 | ||
33 | #define __NV_ACCESS_ONCE(x) ACCESS_ONCE(x) | 33 | #define __NV_ACCESS_ONCE(x) ACCESS_ONCE(x) |
34 | 34 | ||
35 | #define __nvgpu_speculation_barrier() speculation_barrier() | ||
36 | |||
35 | #endif /* __NVGPU_BARRIER_LINUX_H__ */ | 37 | #endif /* __NVGPU_BARRIER_LINUX_H__ */ |