From 31ac769454855dca2b1d25c0da8570f8030e3235 Mon Sep 17 00:00:00 2001 From: Nicolin Chen Date: Thu, 28 Feb 2019 16:04:07 -0800 Subject: [PATCH] gpu: nvgpu: Remove device_is_iommuable The downstream device_is_iommuable() is removed. Check the dev->archdata.iommu pointer instead. Bug 200385990 Change-Id: I1fe400beddc8b4f2262368b5e0e8726abca007a6 Signed-off-by: Nicolin Chen Reviewed-on: https://git-master.nvidia.com/r/2030334 Reviewed-by: svc-mobile-coverity Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Ashish Mhetre Reviewed-by: Krishna Reddy Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/linux-dma.c | 3 ++- drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c | 4 ++-- drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/linux-dma.c b/drivers/gpu/nvgpu/os/linux/linux-dma.c index 6b70a36b2..22a90e1ee 100644 --- a/drivers/gpu/nvgpu/os/linux/linux-dma.c +++ b/drivers/gpu/nvgpu/os/linux/linux-dma.c @@ -496,12 +496,13 @@ bool nvgpu_iommuable(struct gk20a *g) { #ifdef CONFIG_TEGRA_GK20A struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); + struct device *dev = l->dev; /* * Check against the nvgpu device to see if it's been marked as * IOMMU'able. */ - if (!device_is_iommuable(l->dev)) + if (dev->archdata.iommu == NULL) return false; #endif diff --git a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c index 395370902..846d2c282 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c @@ -1,7 +1,7 @@ /* * GP10B Tegra Platform Interface * - * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019, 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, @@ -155,7 +155,7 @@ static int gp10b_tegra_probe(struct device *dev) if (ret) return ret; - platform->disable_bigpage = !device_is_iommuable(dev); + platform->disable_bigpage = !dev->archdata.iommu; platform->g->gr.ctx_vars.dump_ctxsw_stats_on_channel_close = false; diff --git a/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c index 6dde735a2..c4fc7b57d 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c @@ -1,7 +1,7 @@ /* * GV11B Tegra Platform Interface * - * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2019, 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, @@ -84,7 +84,7 @@ static int gv11b_tegra_probe(struct device *dev) if (err) return err; - platform->disable_bigpage = !device_is_iommuable(dev); + platform->disable_bigpage = !dev->archdata.iommu; platform->g->gr.ctx_vars.dump_ctxsw_stats_on_channel_close = false;