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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752805AbdHPWWL (ORCPT ); Wed, 16 Aug 2017 18:22:11 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34457 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752368AbdHPWV5 (ORCPT ); Wed, 16 Aug 2017 18:21:57 -0400 Subject: Re: [PATCH 2/2] iommu/tegra-gart: Add support for struct iommu_device To: Joerg Roedel , Hiroshi Doyu , Thierry Reding , Jonathan Hunter Cc: Robin Murphy , iommu@lists.linux-foundation.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Joerg Roedel References: <1502317752-8792-1-git-send-email-joro@8bytes.org> <1502317752-8792-3-git-send-email-joro@8bytes.org> From: Dmitry Osipenko Message-ID: <66711b72-455f-8ec1-e6f7-5946480dde14@gmail.com> Date: Thu, 17 Aug 2017 01:21:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <1502317752-8792-3-git-send-email-joro@8bytes.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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