* Re: [PATCH 2/7] iommu/arm-smmu: add support for multi-master iommu groups [not found] ` <1409849405-17347-3-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org> @ 2014-09-15 15:22 ` Joerg Roedel [not found] ` <20140915152257.GX28786-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Joerg Roedel @ 2014-09-15 15:22 UTC (permalink / raw) To: Will Deacon Cc: iommu-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I, tchalamarla-YGCgFSpz5w/QT0dZR+AlfA, robin.murphy-5wv7dgnIgG8, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Thu, Sep 04, 2014 at 05:50:00PM +0100, Will Deacon wrote: > static struct arm_smmu_master_cfg * > -find_smmu_master_cfg(struct arm_smmu_device *smmu, struct device *dev) > +find_smmu_master_cfg(struct device *dev) > { > - struct arm_smmu_master *master; > - > - if (dev_is_pci(dev)) > - return dev->archdata.iommu; > - > - master = find_smmu_master(smmu, dev->of_node); > - return master ? &master->cfg : NULL; > + struct iommu_group *group = iommu_group_get(dev); > + return group ? iommu_group_get_iommudata(group) : NULL; Using iommu_group_get requires the call-sites to do an iommu_group_put in the end, but I don't see the call-sites updated. Joerg ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20140915152257.GX28786-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>]
* Re: [PATCH 2/7] iommu/arm-smmu: add support for multi-master iommu groups [not found] ` <20140915152257.GX28786-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> @ 2014-09-15 18:36 ` Will Deacon 0 siblings, 0 replies; 4+ messages in thread From: Will Deacon @ 2014-09-15 18:36 UTC (permalink / raw) To: Joerg Roedel Cc: iommu-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I@public.gmane.org, tchalamarla-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org, Robin Murphy, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Hi Joerg, On Mon, Sep 15, 2014 at 04:22:57PM +0100, Joerg Roedel wrote: > On Thu, Sep 04, 2014 at 05:50:00PM +0100, Will Deacon wrote: > > static struct arm_smmu_master_cfg * > > -find_smmu_master_cfg(struct arm_smmu_device *smmu, struct device *dev) > > +find_smmu_master_cfg(struct device *dev) > > { > > - struct arm_smmu_master *master; > > - > > - if (dev_is_pci(dev)) > > - return dev->archdata.iommu; > > - > > - master = find_smmu_master(smmu, dev->of_node); > > - return master ? &master->cfg : NULL; > > + struct iommu_group *group = iommu_group_get(dev); > > + return group ? iommu_group_get_iommudata(group) : NULL; > > Using iommu_group_get requires the call-sites to do an iommu_group_put > in the end, but I don't see the call-sites updated. Well spotted, thanks. Given that we have a reference on the group thanks to iommu_group_alloc, I think it's better just having the put in this helper. diff below. Unfortunately, I'm at a conference this week and so testing is going to be difficult. I'll test early next week and try to get you a pull request later that week for 3.18. Will --->8 diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index d2d8cdaf..939242c 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -474,8 +474,15 @@ static struct arm_smmu_master *find_smmu_master(struct arm_smmu_device *smmu, static struct arm_smmu_master_cfg * find_smmu_master_cfg(struct device *dev) { + struct arm_smmu_master_cfg *cfg = NULL; struct iommu_group *group = iommu_group_get(dev); - return group ? iommu_group_get_iommudata(group) : NULL; + + if (group) { + cfg = iommu_group_get_iommudata(group); + iommu_group_put(group); + } + + return cfg; } ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1409849405-17347-6-git-send-email-will.deacon@arm.com>]
[parent not found: <1409849405-17347-6-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>]
* Re: [PATCH 5/7] iommu/arm-smmu: don't bother truncating the s1 output size to VA_BITS [not found] ` <1409849405-17347-6-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org> @ 2014-12-01 20:39 ` Andreas Schwab 0 siblings, 0 replies; 4+ messages in thread From: Andreas Schwab @ 2014-12-01 20:39 UTC (permalink / raw) To: Will Deacon Cc: iommu-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I, tchalamarla-YGCgFSpz5w/QT0dZR+AlfA, robin.murphy-5wv7dgnIgG8, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org> writes: > diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c > index ecad700cd4f4..2a7e3331b93a 100644 > --- a/drivers/iommu/arm-smmu.c > +++ b/drivers/iommu/arm-smmu.c > @@ -24,7 +24,7 @@ > * - v7/v8 long-descriptor format > * - Non-secure access to the SMMU > * - 4k and 64k pages, with contiguous pte hints. > - * - Up to 42-bit addressing (dependent on VA_BITS) > + * - Up to 48-bit addressing (dependent on VA_BITS) Does that mean that the dependency on !ARM_SMMU for ARM64_VA_BITS_48 is obsolete? Andreas. -- Andreas Schwab, schwab-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <87mw77cdft.fsf@igel.home>]
[parent not found: <87mw77cdft.fsf-hBGjKatGTSWzQB+pC5nmwQ@public.gmane.org>]
* Re: [PATCH 5/7] iommu/arm-smmu: don't bother truncating the s1 output size to VA_BITS [not found] ` <87mw77cdft.fsf-hBGjKatGTSWzQB+pC5nmwQ@public.gmane.org> @ 2014-12-02 9:26 ` Will Deacon 0 siblings, 0 replies; 4+ messages in thread From: Will Deacon @ 2014-12-02 9:26 UTC (permalink / raw) To: Andreas Schwab Cc: iommu-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I@public.gmane.org, tchalamarla-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org, Robin Murphy, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org On Mon, Dec 01, 2014 at 08:39:18PM +0000, Andreas Schwab wrote: > Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org> writes: > > > diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c > > index ecad700cd4f4..2a7e3331b93a 100644 > > --- a/drivers/iommu/arm-smmu.c > > +++ b/drivers/iommu/arm-smmu.c > > @@ -24,7 +24,7 @@ > > * - v7/v8 long-descriptor format > > * - Non-secure access to the SMMU > > * - 4k and 64k pages, with contiguous pte hints. > > - * - Up to 42-bit addressing (dependent on VA_BITS) > > + * - Up to 48-bit addressing (dependent on VA_BITS) > > Does that mean that the dependency on !ARM_SMMU for ARM64_VA_BITS_48 is > obsolete? No, you need my other patch series for that (we don't handle stage-2 properly without it): http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/306786.html Will ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-02 9:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1409849405-17347-1-git-send-email-will.deacon@arm.com>
[not found] ` <1409849405-17347-3-git-send-email-will.deacon@arm.com>
[not found] ` <1409849405-17347-3-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2014-09-15 15:22 ` [PATCH 2/7] iommu/arm-smmu: add support for multi-master iommu groups Joerg Roedel
[not found] ` <20140915152257.GX28786-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-09-15 18:36 ` Will Deacon
[not found] ` <1409849405-17347-6-git-send-email-will.deacon@arm.com>
[not found] ` <1409849405-17347-6-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2014-12-01 20:39 ` [PATCH 5/7] iommu/arm-smmu: don't bother truncating the s1 output size to VA_BITS Andreas Schwab
[not found] ` <87mw77cdft.fsf@igel.home>
[not found] ` <87mw77cdft.fsf-hBGjKatGTSWzQB+pC5nmwQ@public.gmane.org>
2014-12-02 9:26 ` Will Deacon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox