Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Arnd Bergmann
On Wednesday 30 July 2014, Thierry Reding wrote: se? > > I think there weren't any comments left for me to address and I've > mostly been waiting for Joerg to pick it up. > > Joerg, can you take this through the iommu tree for 3.17? Will acked > this, but perhaps you were waiting for an ACK from

Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Mark Rutland
[...] > >> +Multiple-master IOMMU: > >> +-- > >> + > >> + iommu { > >> + /* the specifier represents the ID of the master */ > >> + #iommu-cells = <1>; > >> + }; > >> + > >> + master@1 { > >> + /* device has master ID 42 in the IO

Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Rob Herring
On Wed, Jul 30, 2014 at 9:30 AM, Will Deacon wrote: > On Wed, Jul 30, 2014 at 02:23:50PM +0100, Thierry Reding wrote: >> On Wed, Jul 30, 2014 at 12:04:25PM +0100, Will Deacon wrote: >> > On Fri, Jul 04, 2014 at 04:29:17PM +0100, Thierry Reding wrote: >> > > From: Thierry Reding >> > > >> > > This

[PATCH v4] iommu/arm-smmu: avoid calling request_irq in atomic context

2014-07-30 Thread Mitchel Humpherys
request_irq shouldn't be called from atomic context since it might sleep, but we're calling it with a spinlock held, resulting in: [9.172202] BUG: sleeping function called from invalid context at kernel/mm/slub.c:926 [9.182989] in_atomic(): 1, irqs_disabled(): 128, pid: 1, name: s

Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Olof Johansson
On Wed, Jul 30, 2014 at 6:33 AM, Joerg Roedel wrote: > On Wed, Jul 30, 2014 at 03:23:50PM +0200, Thierry Reding wrote: >> I think there weren't any comments left for me to address and I've >> mostly been waiting for Joerg to pick it up. >> >> Joerg, can you take this through the iommu tree for 3.1

Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Olof Johansson
Hi, On Wed, Jul 30, 2014 at 8:26 AM, Mark Rutland wrote: > Hi Thierry, > > This looks sane to me. > > I just have a few questions below which are hopefully simple/stupid. > > On Fri, Jul 04, 2014 at 04:29:17PM +0100, Thierry Reding wrote: >> From: Thierry Reding >> >> This commit introduces a ge

Re: [PATCH v3] iommu/arm-smmu: avoid calling request_irq in atomic context

2014-07-30 Thread Will Deacon
On Wed, Jul 30, 2014 at 05:51:48PM +0100, Mitchel Humpherys wrote: > On Wed, Jul 30 2014 at 08:31:14 AM, Will Deacon wrote: > > On Tue, Jul 29, 2014 at 07:11:15PM +0100, Mitchel Humpherys wrote: > >> Changelog: > >> > >> - v3: rework irq request code to avoid requesting the irq every > >>

Re: [PATCH v3] iommu/arm-smmu: avoid calling request_irq in atomic context

2014-07-30 Thread Mitchel Humpherys
On Wed, Jul 30 2014 at 08:31:14 AM, Will Deacon wrote: > Hey Mitch, > > On Tue, Jul 29, 2014 at 07:11:15PM +0100, Mitchel Humpherys wrote: >> request_irq shouldn't be called from atomic context since it might >> sleep, but we're calling it with a spinlock held, resulting in: >> >> [9.1722

Re: [PATCH v3] iommu/arm-smmu: avoid calling request_irq in atomic context

2014-07-30 Thread Will Deacon
Hey Mitch, On Tue, Jul 29, 2014 at 07:11:15PM +0100, Mitchel Humpherys wrote: > request_irq shouldn't be called from atomic context since it might > sleep, but we're calling it with a spinlock held, resulting in: > > [9.172202] BUG: sleeping function called from invalid context at > kern

Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Mark Rutland
Hi Thierry, This looks sane to me. I just have a few questions below which are hopefully simple/stupid. On Fri, Jul 04, 2014 at 04:29:17PM +0100, Thierry Reding wrote: > From: Thierry Reding > > This commit introduces a generic device tree binding for IOMMU devices. > Only a very minimal subse

Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Will Deacon
On Wed, Jul 30, 2014 at 02:23:50PM +0100, Thierry Reding wrote: > On Wed, Jul 30, 2014 at 12:04:25PM +0100, Will Deacon wrote: > > On Fri, Jul 04, 2014 at 04:29:17PM +0100, Thierry Reding wrote: > > > From: Thierry Reding > > > > > > This commit introduces a generic device tree binding for IOMMU

[PATCH 4/4] iommu/amd: Fix 2 typos in comments

2014-07-30 Thread Joerg Roedel
From: Joerg Roedel amd_iommu_pasid_bind -> amd_iommu_bind_pasid Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c index 2de13be..5f578e8 100644 --- a/d

[PATCH 3/4] iommu/amd: Fix device_state reference counting

2014-07-30 Thread Joerg Roedel
From: Joerg Roedel The references to the device state are not dropped everywhere. This might cause a dead-lock in amd_iommu_free_device(). Fix it. Signed-off-by: Joerg Roedel Tested-by: Oded Gabbay --- drivers/iommu/amd_iommu_v2.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/dri

[PATCH 1/4] iommu/amd: Don't set pasid_state->mm to NULL in unbind_pasid

2014-07-30 Thread Joerg Roedel
From: Joerg Roedel With calling te mmu_notifier_register function we hold a reference to the mm_struct that needs to be released in mmu_notifier_unregister. This is true even if the notifier was already unregistered from exit_mmap and the .release call-back has already run. So make sure we call

[PATCH 2/4] iommu/amd: Remove change_pte mmu_notifier call-back

2014-07-30 Thread Joerg Roedel
From: Joerg Roedel All calls to this call-back are wrapped with mmu_notifer_invalidate_range_start()/end(), making this notifier pretty useless, so remove it. Signed-off-by: Joerg Roedel Tested-by: Oded Gabbay --- drivers/iommu/amd_iommu_v2.c | 9 - 1 file changed, 9 deletions(-) dif

[PATCH 06/17] ACPICA: Tables: Update for DMAR table changes.

2014-07-30 Thread Lv Zheng
From: Bob Moore Update table compiler and disassembler for new DMAR fields introduced in Sept. 2013. Note that Linux DMAR users need to be updated after applying this change. [zetalog: changing drivers/iommu/dmar.c accordingly] Cc: David Woodhouse Cc: iommu@lists.linux-foundation.org Signed-of

Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Joerg Roedel
On Wed, Jul 30, 2014 at 03:23:50PM +0200, Thierry Reding wrote: > I think there weren't any comments left for me to address and I've > mostly been waiting for Joerg to pick it up. > > Joerg, can you take this through the iommu tree for 3.17? Will acked > this, but perhaps you were waiting for an A

Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Thierry Reding
On Wed, Jul 30, 2014 at 12:04:25PM +0100, Will Deacon wrote: > Hi all, > > On Fri, Jul 04, 2014 at 04:29:17PM +0100, Thierry Reding wrote: > > From: Thierry Reding > > > > This commit introduces a generic device tree binding for IOMMU devices. > > Only a very minimal subset is described here, bu

Re: [PATCH v4] devicetree: Add generic IOMMU device tree bindings

2014-07-30 Thread Will Deacon
Hi all, On Fri, Jul 04, 2014 at 04:29:17PM +0100, Thierry Reding wrote: > From: Thierry Reding > > This commit introduces a generic device tree binding for IOMMU devices. > Only a very minimal subset is described here, but it is enough to cover > the requirements of both the Exynos System MMU an

Re: [PATCH v3 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-07-30 Thread Will Deacon
On Tue, Jul 29, 2014 at 06:21:48PM +0100, Olav Haugan wrote: > On 7/29/2014 2:25 AM, Will Deacon wrote: > > I agree that we can't handle IOMMUs that have a minimum page size larger > > than the CPU page size, but we should be able to handle the case where the > > maximum supported page size on the