Re: [PATCH] iommu/arm-smmu: fix bug in pmd construction

2014-09-22 Thread Will Deacon
On Sun, Sep 21, 2014 at 08:56:28AM +0100, Varun Sethi wrote: > I have made changes to the arm smmu driver paging support, as a part of > the huge page support patch. Will is currently reviewing changes made by > me. I should be able to post my patch in the next couple of weeks. Yup, but this patch

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-22 Thread Thierry Reding
On Fri, Sep 12, 2014 at 05:34:55PM +0100, Will Deacon wrote: [...] > +static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 > size) > +{ > + struct dma_iommu_mapping *mapping; > + > + mapping = arm_iommu_create_mapping(dev->bus, dma_base, size); If I understand correct

Re: [RFC][PATCH] devicetree: Add master-id-bits property to the iommu device

2014-09-22 Thread Thierry Reding
On Tue, Sep 16, 2014 at 06:04:48PM +, Varun Sethi wrote: > Hi Arnd, > > > -Original Message- > > From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- > > boun...@lists.linux-foundation.org] On Behalf Of Arnd Bergmann > > Sent: Monday, September 15, 2014 10:27 PM > > To: Sethi

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-22 Thread Laurent Pinchart
On Monday 22 September 2014 11:19:35 Thierry Reding wrote: > On Fri, Sep 12, 2014 at 05:34:55PM +0100, Will Deacon wrote: > [...] > > > +static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 > > size) +{ > > + struct dma_iommu_mapping *mapping; > > + > > + mapping = arm_iom

Re: [RFC PATCH v3 5/7] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-09-22 Thread Thierry Reding
On Thu, Sep 18, 2014 at 02:17:33PM +0300, Laurent Pinchart wrote: > Hi Will, > > Thank you for the patch. > > On Friday 12 September 2014 17:34:53 Will Deacon wrote: > > This patch extends of_dma_configure so that it sets up the IOMMU for a > > device, as well as the coherent/non-coherent DMA map

Re: [RFC PATCH v3 6/7] arm: call iommu_init before of_platform_populate

2014-09-22 Thread Thierry Reding
On Fri, Sep 12, 2014 at 05:34:54PM +0100, Will Deacon wrote: > We need to ensure that the IOMMUs in the system have a chance to perform > some basic initialisation before we start adding masters to them. > > This patch adds a call to of_iommu_init before of_platform_populate. Why can't you call i

Re: [RFC PATCH v3 6/7] arm: call iommu_init before of_platform_populate

2014-09-22 Thread Arnd Bergmann
On Monday 22 September 2014 11:36:15 Thierry Reding wrote: > On Fri, Sep 12, 2014 at 05:34:54PM +0100, Will Deacon wrote: > > We need to ensure that the IOMMUs in the system have a chance to perform > > some basic initialisation before we start adding masters to them. > > > > This patch adds a cal

Re: [RFC PATCH v3 6/7] arm: call iommu_init before of_platform_populate

2014-09-22 Thread Thierry Reding
On Mon, Sep 22, 2014 at 01:08:27PM +0200, Arnd Bergmann wrote: > On Monday 22 September 2014 11:36:15 Thierry Reding wrote: > > On Fri, Sep 12, 2014 at 05:34:54PM +0100, Will Deacon wrote: > > > We need to ensure that the IOMMUs in the system have a chance to perform > > > some basic initialisation

Re: [PATCH v2 04/18] clk: exynos: add missing smmu_g2d clock and update comments

2014-09-22 Thread Tomasz Figa
On 16.09.2014 13:54, Marek Szyprowski wrote: > This patch adds missing smmu_g2d clock implementation and updates > comment about Exynos4 clocks from 278-282 range. Those clocks are > available on all Exynos4 SoC series, so the misleading comment has been > removed. > > Signed-off-by: Marek Szyprow

[GIT PULL] iommu/arm-smmu: updates for 3.18

2014-09-22 Thread Will Deacon
Hi Joerg, Please can you pull these arm-smmu updates for 3.18? Apologies for sending this later than usual, but I was at a conference last week and couldn't easily run the usual series of tests. The main changes are: - Explicit support for MMU-401 (as opposed to choosing an SMMU architectu

Re: [PATCH 1/2] iopoll: Introduce memory-mapped IO polling macros

2014-09-22 Thread Will Deacon
Hi Mitch, Matt, On Thu, Sep 11, 2014 at 07:30:43PM +0100, Mitchel Humpherys wrote: > From: Matt Wagantall > > It is sometimes necessary to poll a memory-mapped register until its > value satisfies some condition. Introduce a family of convenience macros > that do this. Tight-loop and sleeping ve

Re: [PATCH 2/2] iommu/arm-smmu: add support for iova_to_phys through ATS1PR

2014-09-22 Thread Will Deacon
Hi Mitch, On Thu, Sep 11, 2014 at 07:30:44PM +0100, Mitchel Humpherys wrote: > Currently, we provide the iommu_ops.iova_to_phys service by doing a > table walk in software to translate IO virtual addresses to physical > addresses. On SMMUs that support it, it can be useful to ask the SMMU > itself

Re: [PATCH 04/13 v2] iommu/arm-smmu: Convert to iommu_capable() API function function

2014-09-22 Thread Joerg Roedel
Hi Will, On Fri, Sep 19, 2014 at 05:42:20PM +0100, Will Deacon wrote: > However, I thought about this a bit more and the coherency isn't necessarily > a global property of the SMMU. In reality, it is dependent on the IOTLBs in > use by the domain, so it's not going to be possible to report true he

Re: [RFC PATCH v3 6/7] arm: call iommu_init before of_platform_populate

2014-09-22 Thread Arnd Bergmann
On Monday 22 September 2014 13:40:40 Thierry Reding wrote: > On Mon, Sep 22, 2014 at 01:08:27PM +0200, Arnd Bergmann wrote: > > On Monday 22 September 2014 11:36:15 Thierry Reding wrote: > > > On Fri, Sep 12, 2014 at 05:34:54PM +0100, Will Deacon wrote: > > > > We need to ensure that the IOMMUs in

[PATCH] iommu/core: fix bus notifier breakage

2014-09-22 Thread Mark Salter
iommu_bus_init() registers a bus notifier on the given bus by using a statically defined notifier block: static struct notifier_block iommu_bus_nb = { .notifier_call = iommu_bus_notifier, }; This same notifier block is used for all busses. This causes a problem for notifiers registe

Re: [RFC PATCH v3 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-22 Thread Will Deacon
On Thu, Sep 18, 2014 at 12:13:13PM +0100, Laurent Pinchart wrote: > Hi Will, Hi Laurent, > Thank you for the patch. Sorry for the delay in replying, I was at Connect last week and the email has backed up. > On Friday 12 September 2014 17:34:52 Will Deacon wrote: > > The generic IOMMU device-tre

Re: [RFC PATCH v3 1/7] iommu: provide early initialisation hook for IOMMU drivers

2014-09-22 Thread Will Deacon
On Thu, Sep 18, 2014 at 03:31:54PM +0100, Robin Murphy wrote: > After some fun times wondering why on Earth of_iommu_init was trying to > instantiate a GIC, I think we may need one of these as part of this > patch, too ;) Oops, thanks! Will ___ iommu

Re: [RFC PATCH v3 7/7] arm: dma-mapping: plumb our iommu mapping ops into arch_setup_dma_ops

2014-09-22 Thread Will Deacon
Hi Thierry, On Mon, Sep 22, 2014 at 10:19:35AM +0100, Thierry Reding wrote: > On Fri, Sep 12, 2014 at 05:34:55PM +0100, Will Deacon wrote: > [...] > > +static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 > > size) > > +{ > > + struct dma_iommu_mapping *mapping; > > + > > +

Re: [RFC PATCH v3 5/7] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-09-22 Thread Will Deacon
On Thu, Sep 18, 2014 at 12:17:33PM +0100, Laurent Pinchart wrote: > Hi Will, Hello again, > On Friday 12 September 2014 17:34:53 Will Deacon wrote: > > @@ -195,7 +197,19 @@ static void of_dma_configure(struct platform_device > > *pdev) dev_dbg(dev, "device is%sdma coherent\n", > > coh

Re: [RFC PATCH v3 5/7] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-09-22 Thread Will Deacon
On Mon, Sep 22, 2014 at 10:29:10AM +0100, Thierry Reding wrote: > On Thu, Sep 18, 2014 at 02:17:33PM +0300, Laurent Pinchart wrote: > > On Friday 12 September 2014 17:34:53 Will Deacon wrote: > > > This patch extends of_dma_configure so that it sets up the IOMMU for a > > > device, as well as the c

Re: [PATCH 2/2] iommu/arm-smmu: add support for access-protected mappings

2014-09-22 Thread Mitchel Humpherys
On Fri, Sep 19 2014 at 03:05:36 PM, Will Deacon wrote: > On Wed, Sep 17, 2014 at 09:16:09PM +0100, Mitchel Humpherys wrote: >> ARM SMMUs support memory access control via some bits in the translation >> table descriptor memory attributes. Currently we assume all translations >> are "unprivileged".