[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
|
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK=Wgbar+z_Nm1cDM4bJgrP5yWbjCsVBW=orfYwsZsT7uET8ng@mail.gmail.com>
Date: Fri, 14 Oct 2011 19:03:39 +0200
From: Ohad Ben-Cohen <ohad@...ery.com>
To: "Roedel, Joerg" <Joerg.Roedel@....com>
Cc: "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
David Woodhouse <dwmw2@...radead.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
David Brown <davidb@...eaurora.org>,
Arnd Bergmann <arnd@...db.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Stepan Moskovchenko <stepanm@...eaurora.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
Hiroshi Doyu <hdoyu@...dia.com>
Subject: Re: [PATCH v3 1/6] iommu/core: split mapping to page sizes as
supported by the hardware
On Fri, Oct 14, 2011 at 3:35 PM, Roedel, Joerg <Joerg.Roedel@....com> wrote:
> This patch looks good. Please include it in the page-size patch-set.
will do.
> Hmm, I'd like to constify the iommu_ops structures in the future. This
> wouldn't work then anymore. How about renaming it to io_page_size
> (because it is the base page-size of the iommu) and let the driver set
> it?
Sure, that'd work. Though asking the driver to provide this feels a
bit redundant, as it already provided this info in the supported page
sizes.
I guess a cleaner solution might be allocating a 'struct iommu' in
which drivers will set a 'const struct iommu_ops *' member. That new
struct would then contain the base page-size and any other state the
iommu core would ever need.
This whole thing is quite marginal though and also very easy to change
later, so we can start with the "driver-provided io_page_size"
approach for now.
> This needs to be (left > 0). The drivers are allowed to unmap more then
> requested, so this value may turn negative.
Good point. 'left' is size_t though, so i'll fix this a bit differently.
> Btw, how have you tested this code?
Of course. Every patch I send is always tested on both OMAP3 (with
omap3isp) and OMAP4 (with rpmsg/remoteproc). In addition, everyone who
uses my wip rpmsg tree (there are several developers who do) is always
testing this without even knowing, as I'm always rebasing that tree on
the latest iommu patches (my wip branches are not linear).
Thanks,
Ohad.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists