From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Osipenko Subject: Re: [PATCH 2/2] iommu/tegra-gart: Add support for struct iommu_device Date: Thu, 17 Aug 2017 01:21:52 +0300 Message-ID: <66711b72-455f-8ec1-e6f7-5946480dde14@gmail.com> References: <1502317752-8792-1-git-send-email-joro@8bytes.org> <1502317752-8792-3-git-send-email-joro@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1502317752-8792-3-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Joerg Roedel , Hiroshi Doyu , Thierry Reding , Jonathan Hunter Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Joerg Roedel , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-tegra@vger.kernel.org Hello Joerg, On 10.08.2017 01:29, Joerg Roedel wrote: > From: Joerg Roedel > > Add a struct iommu_device to each tegra-gart and register it > with the iommu-core. Also link devices added to the driver > to their respective hardware iommus. > > Signed-off-by: Joerg Roedel > --- > drivers/iommu/tegra-gart.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko > diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c > index 29bafc6..b62f790 100644 > --- a/drivers/iommu/tegra-gart.c > +++ b/drivers/iommu/tegra-gart.c [snip] > @@ -449,6 +472,9 @@ static int tegra_gart_remove(struct platform_device *pdev) > { BTW, GART's driver can't be build as a module, so this function is pretty much a dead code. Probably worth considering its removal. > struct gart_device *gart = platform_get_drvdata(pdev); > > + iommu_device_unregister(&gart->iommu); > + iommu_device_sysfs_remove(&gart->iommu); > + > writel(0, gart->regs + GART_CONFIG); > if (gart->savedata) > vfree(gart->savedata); > -- Dmitry