drivers: gpu: remove archdata.iommu

Fix k5.9 build error for archdata.iommu
Replace use of dev->archdata.iommu with iommu_get_domain_for_dev()

Change-Id: Ic1efb864046a08a7ea9b1810114bdadef20f6adf
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2402360
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: Sagar Kamble <skamble@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Bitan Biswas
2020-08-17 13:59:38 -07:00
committed by Alex Waterman
parent 13ca3c9a37
commit f090e6aa23
3 changed files with 9 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
@@ -16,7 +16,7 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/version.h> #include <linux/iommu.h>
#include <nvgpu/log.h> #include <nvgpu/log.h>
#include <nvgpu/dma.h> #include <nvgpu/dma.h>
@@ -604,7 +604,7 @@ bool nvgpu_iommuable(struct gk20a *g)
* Check against the nvgpu device to see if it's been marked as * Check against the nvgpu device to see if it's been marked as
* IOMMU'able. * IOMMU'able.
*/ */
if (dev->archdata.iommu == NULL) if (iommu_get_domain_for_dev(dev) == NULL)
return false; return false;
#endif #endif

View File

@@ -19,6 +19,7 @@
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/dma-buf.h> #include <linux/dma-buf.h>
#include <linux/reset.h> #include <linux/reset.h>
#include <linux/iommu.h>
#ifdef CONFIG_TEGRA_BWMGR #ifdef CONFIG_TEGRA_BWMGR
#include <linux/platform/tegra/emc_bwmgr.h> #include <linux/platform/tegra/emc_bwmgr.h>
#endif #endif
@@ -204,7 +205,8 @@ static int gp10b_tegra_probe(struct device *dev)
if (ret) if (ret)
return ret; return ret;
platform->disable_bigpage = !dev->archdata.iommu && (PAGE_SIZE < SZ_64K); platform->disable_bigpage = !iommu_get_domain_for_dev(dev) &&
(PAGE_SIZE < SZ_64K);
#ifdef CONFIG_OF #ifdef CONFIG_OF
of_chosen = of_find_node_by_path("/chosen"); of_chosen = of_find_node_by_path("/chosen");

View File

@@ -22,6 +22,7 @@
#include <linux/reset.h> #include <linux/reset.h>
#include <linux/hashtable.h> #include <linux/hashtable.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/iommu.h>
#ifdef CONFIG_TEGRA_BWMGR #ifdef CONFIG_TEGRA_BWMGR
#include <linux/platform/tegra/emc_bwmgr.h> #include <linux/platform/tegra/emc_bwmgr.h>
#endif #endif
@@ -94,7 +95,8 @@ static int gv11b_tegra_probe(struct device *dev)
if (err) if (err)
return err; return err;
platform->disable_bigpage = !dev->archdata.iommu && (PAGE_SIZE < SZ_64K); platform->disable_bigpage = !(iommu_get_domain_for_dev(dev)) &&
(PAGE_SIZE < SZ_64K);
#ifdef CONFIG_OF #ifdef CONFIG_OF
of_chosen = of_find_node_by_path("/chosen"); of_chosen = of_find_node_by_path("/chosen");