From 2a23cd249451c952aaab71eaad6cf5f77d2bc6e2 Mon Sep 17 00:00:00 2001 From: Antony Clince Alex Date: Wed, 25 Apr 2018 10:19:01 +0530 Subject: gpu: nvgpu: refectored sim_readl/sim_writel refactored sim_readl and sim_writel to use os-agnostic structures. converted all sim buffers to the type nvgpu_mem and replaced all alloc_page and free_page calls with corresponding nvgpu_dma_alloc/nvgpu_dma_free calls. JIRA VQRM-2368 Change-Id: Ia9d29119d31f239ed16be932cfd16c334002c727 Signed-off-by: Antony Clince Alex Reviewed-on: https://git-master.nvidia.com/r/1702050 Reviewed-by: svc-mobile-coverity Reviewed-by: Sourab Gupta GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/sim.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/sim.h') diff --git a/drivers/gpu/nvgpu/common/linux/sim.h b/drivers/gpu/nvgpu/common/linux/sim.h index a9ec0dba..4b5e910c 100644 --- a/drivers/gpu/nvgpu/common/linux/sim.h +++ b/drivers/gpu/nvgpu/common/linux/sim.h @@ -2,7 +2,7 @@ * * GK20A sim support * - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -20,17 +20,16 @@ #ifndef __SIM_LINUX_H__ #define __SIM_LINUX_H__ +#include #include "gk20a/sim_gk20a.h" struct sim_gk20a_linux { struct sim_gk20a sim; struct resource *reg_mem; void __iomem *regs; - struct { - struct page *page; - void *kvaddr; - u64 phys; - } send_bfr, recv_bfr, msg_bfr; + struct nvgpu_mem send_bfr; + struct nvgpu_mem recv_bfr; + struct nvgpu_mem msg_bfr; }; int gk20a_init_sim_support(struct gk20a *g); -- cgit v1.2.2