From 823ae76b1bc7e82c1532c9298c57f644b4791535 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 29 Nov 2017 15:37:48 -0800 Subject: gpu: nvgpu: Remove extra CPU flushes in sim_gk20a.c Simulation does not model CPU caches, so remove extra CPU flushes. The flushes are defined only in Tegra Linux kernel, so they cause build errors on other kernels. Change-Id: I5530a9ea8beac4b7c1ac30f32524afa418110daf Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1607582 Reviewed-by: Konsta Holtta GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/sim.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/common/linux/sim.c b/drivers/gpu/nvgpu/common/linux/sim.c index b7481784..0e158063 100644 --- a/drivers/gpu/nvgpu/common/linux/sim.c +++ b/drivers/gpu/nvgpu/common/linux/sim.c @@ -179,10 +179,6 @@ static int rpc_send_message(struct gk20a *g) g->sim->send_ring_put = (g->sim->send_ring_put + 2 * sizeof(u32)) % PAGE_SIZE; - __cpuc_flush_dcache_area(sim_linux->msg_bfr.kvaddr, PAGE_SIZE); - __cpuc_flush_dcache_area(sim_linux->send_bfr.kvaddr, PAGE_SIZE); - __cpuc_flush_dcache_area(sim_linux->recv_bfr.kvaddr, PAGE_SIZE); - /* Update the put pointer. This will trap into the host. */ sim_writel(sim_linux, sim_send_put_r(), g->sim->send_ring_put); @@ -234,10 +230,6 @@ static int rpc_recv_poll(struct gk20a *g) g->sim->recv_ring_get = (g->sim->recv_ring_get + 2*sizeof(u32)) % PAGE_SIZE; - __cpuc_flush_dcache_area(sim_linux->msg_bfr.kvaddr, PAGE_SIZE); - __cpuc_flush_dcache_area(sim_linux->send_bfr.kvaddr, PAGE_SIZE); - __cpuc_flush_dcache_area(sim_linux->recv_bfr.kvaddr, PAGE_SIZE); - sim_writel(sim_linux, sim_recv_get_r(), g->sim->recv_ring_get); g->sim->recv_ring_put = sim_readl(sim_linux, sim_recv_put_r()); @@ -362,4 +354,4 @@ int gk20a_init_sim_support(struct gk20a *g) fail: gk20a_free_sim_support(g); return err; -} \ No newline at end of file +} -- cgit v1.2.2