From: joro@8bytes.org (Joerg Roedel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices
Date: Fri, 29 May 2015 08:43:37 +0200 [thread overview]
Message-ID: <20150529064337.GN20611@8bytes.org> (raw)
In-Reply-To: <20150520170926.GI11498@arm.com>
Hi Will,
On Wed, May 20, 2015 at 06:09:26PM +0100, Will Deacon wrote:
> On Tue, May 19, 2015 at 04:24:35PM +0100, Joerg Roedel wrote:
> > > + /* Page sizes */
> > > + if (reg & IDR5_GRAN64K)
> > > + pgsize_bitmap |= SZ_64K | SZ_512M;
> > > + if (reg & IDR5_GRAN16K)
> > > + pgsize_bitmap |= SZ_16K | SZ_32M;
> > > + if (reg & IDR5_GRAN4K)
> > > + pgsize_bitmap |= SZ_4K | SZ_2M | SZ_1G;
> > > +
> > > + arm_smmu_ops.pgsize_bitmap &= pgsize_bitmap;
> >
> > So this could effictivly lead to a zero pgsize_bitmap when there are
> > SMMUs in the system with support for different page sizes, no?
>
> Indeed, if there is no common page size then we end up not being able to
> support any. I tried to resolve this by moving the bitmap out of the
> iommu_ops and into the iommu_domain, but you weren't fond of that idea ;)
Well, what you could do (and what I think the core should do at some
point) is to build the resulting page-size bitmap by taking the biggest
minimum page-size from all iommus and OR the page-size bigger than that
together. For a system with 3 SMMUs supporting all of the above
pgsize_bitmaps the resulting bitmap would look like this:
SZ_64K | SZ_32M | SZ_2M | SZ_512M | SZ_1G;
With the biggest minimum page-size all of the bigger page-sizes can be
emulated. But that is not necessary for this patch-set, just a
suggestion for future work.
Joerg
next prev parent reply other threads:[~2015-05-29 6:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 18:00 [PATCH 0/3] iommu/arm-smmu: Add driver for ARM SMMUv3 devices Will Deacon
2015-05-08 18:00 ` [PATCH 1/3] Documentation: dt-bindings: Add device-tree binding for ARM SMMUv3 IOMMU Will Deacon
2015-05-08 18:00 ` [PATCH 2/3] iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices Will Deacon
2015-05-12 7:40 ` leizhen
2015-05-12 16:55 ` Will Deacon
2015-05-13 8:33 ` leizhen
2015-05-21 11:25 ` Will Deacon
2015-05-25 2:07 ` leizhen
2015-05-26 16:12 ` Will Deacon
2015-05-27 9:12 ` leizhen
2015-05-19 15:24 ` Joerg Roedel
2015-05-20 17:09 ` Will Deacon
2015-05-29 6:43 ` Joerg Roedel [this message]
2015-05-29 11:35 ` Robin Murphy
2015-05-29 14:40 ` Joerg Roedel
2015-06-01 9:40 ` Will Deacon
2015-06-02 7:39 ` Joerg Roedel
2015-06-02 9:47 ` Will Deacon
2015-06-02 18:43 ` Joerg Roedel
2015-05-08 18:00 ` [PATCH 3/3] drivers/vfio: Allow type-1 IOMMU instantiation on top of an ARM SMMUv3 Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150529064337.GN20611@8bytes.org \
--to=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).