summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/fifo/tsg.c
diff options
context:
space:
mode:
authorRanjanikar Nikhil Prabhakarrao <rprabhakarra@nvidia.com>2018-12-13 06:59:20 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2020-06-30 13:07:26 -0400
commitf56874aec2ec61f2c341b813cc76de5acc51ea12 (patch)
treeefd3d6a3921c930a76bf0cb7011ca6b9809ed5f3 /drivers/gpu/nvgpu/common/fifo/tsg.c
parentbbef4c6927a13a24821c43cb2b6af72f859f7deb (diff)
gpu: nvgpu: add speculative barrier
Data can be speculativerly stored and code flow can be hijacked. To mitigate this problem insert a speculation barrier. Bug 200447167 Change-Id: Ia865ff2add8b30de49aa970715625b13e8f71c08 Signed-off-by: Ranjanikar Nikhil Prabhakarrao <rprabhakarra@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1972221 (cherry picked from commit f0762ed4831b3fe6cc953a4a4ec26c2537dcb69f) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/1996052 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: Deepak Nibade <dnibade@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/fifo/tsg.c')
-rw-r--r--drivers/gpu/nvgpu/common/fifo/tsg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/fifo/tsg.c b/drivers/gpu/nvgpu/common/fifo/tsg.c
index f6c718f0..841dd465 100644
--- a/drivers/gpu/nvgpu/common/fifo/tsg.c
+++ b/drivers/gpu/nvgpu/common/fifo/tsg.c
@@ -219,6 +219,7 @@ int gk20a_tsg_set_runlist_interleave(struct tsg_gk20a *tsg, u32 level)
219 219
220 nvgpu_log(g, gpu_dbg_sched, "tsgid=%u interleave=%u", tsg->tsgid, level); 220 nvgpu_log(g, gpu_dbg_sched, "tsgid=%u interleave=%u", tsg->tsgid, level);
221 221
222 nvgpu_speculation_barrier();
222 switch (level) { 223 switch (level) {
223 case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW: 224 case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW:
224 case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_MEDIUM: 225 case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_MEDIUM: