From b7cc3a2aa6c92a09eed43513287c9062f22ad127 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 16 Nov 2017 11:29:11 -0800 Subject: gpu: nvgpu: Fix some barrier usage Commit 81868a187fa3b217368206f17b19309846e8e7fb updated barrier usage to use the nvgpu wrappers and in doing so downgraded many plain barriers {mb(), wmb(), rmb()} to the SMP versions of these barriers. The SMP version of the barriers in question are only issued when running on an SMP machine. In most of the cases mentioned above this is fine since the barriers are present to faciliate proper ordering across CPUs. A single CPU is always coherent with itself, so on a non-SMP case we don't need those barriers. However, there are a few places where the barriers in use (GMMU page table programming, IO accessors, userd) where the barrier usage is for communicating and establishing ordering for the GPU. We need these barriers for both SMP machines and non-SMP machines. Therefor we must use the plain barrier versions. Change-Id: I376129840b7dc64af8f3f23f88057e4e81360f89 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1599744 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b') diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index f87c6dea..0238ae6c 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c @@ -253,8 +253,8 @@ void gv11b_userd_gp_put(struct gk20a *g, struct channel_gk20a *c) nvgpu_mem_wr32(g, userd_mem, offset + ram_userd_gp_put_w(), c->gpfifo.put); - /* commit everything to cpu */ - nvgpu_smp_mb(); + /* Commit everything to GPU. */ + nvgpu_mb(); gv11b_ring_channel_doorbell(c); } -- cgit v1.2.2