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

2014-07-04 Thread Thierry Reding
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 and Tegra SMMU as discussed here: https://lkml.org/lkml/2014/4/27/346 Signed-of

Re: [RFC 01/10] iommu: Add IOMMU device registry

2014-07-04 Thread Will Deacon
On Fri, Jul 04, 2014 at 02:47:10PM +0100, Thierry Reding wrote: > On Fri, Jul 04, 2014 at 01:05:30PM +0200, Joerg Roedel wrote: > > On Thu, Jun 26, 2014 at 10:49:41PM +0200, Thierry Reding wrote: > > > Add an IOMMU device registry for drivers to register with and implement > > > a method for users

Re: [RFC 01/10] iommu: Add IOMMU device registry

2014-07-04 Thread Thierry Reding
On Fri, Jul 04, 2014 at 01:05:30PM +0200, Joerg Roedel wrote: > On Thu, Jun 26, 2014 at 10:49:41PM +0200, Thierry Reding wrote: > > Add an IOMMU device registry for drivers to register with and implement > > a method for users of the IOMMU API to attach to an IOMMU device. This > > allows to suppor

RE: [PATCH 2/3] iommu/fsl: Fix the device domain attach condition.

2014-07-04 Thread Varun Sethi
> -Original Message- > From: Joerg Roedel [mailto:j...@8bytes.org] > Sent: Friday, July 04, 2014 4:25 PM > To: Sethi Varun-B16395 > Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org; > linuxppc-...@lists.ozlabs.org; alex.william...@redhat.com > Subject: Re: [PATCH 2/3] io

RE: [PATCH 1/3] iommu/fsl: Fix PAMU window size check.

2014-07-04 Thread Varun Sethi
> -Original Message- > From: Joerg Roedel [mailto:j...@8bytes.org] > Sent: Friday, July 04, 2014 4:15 PM > To: Sethi Varun-B16395 > Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org; > linuxppc-...@lists.ozlabs.org; alex.william...@redhat.com > Subject: Re: [PATCH 1/3] io

Re: [PATCH] iommu: Add void declarations in zero-arg functions.

2014-07-04 Thread Joerg Roedel
On Thu, Jul 03, 2014 at 03:03:01PM +0200, Chi Pham wrote: > Added explicit void declarations to zero-argument function headers. > The following coccinelle script was used: > @addvoid@ > identifier f; > @@ > > f( > + void > ) { ... } > > Signed-off-by: Chi Pham a Applied, thanks. > --- > drive

Re: [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before kfree

2014-07-04 Thread Joerg Roedel
On Sun, Jun 29, 2014 at 10:01:26AM +0200, Fabian Frederick wrote: > Fix checkpatch warning: > WARNING: kfree(NULL) is safe this check is probably not required Applied, thanks. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfo

Re: [RFC 01/10] iommu: Add IOMMU device registry

2014-07-04 Thread Joerg Roedel
On Thu, Jun 26, 2014 at 10:49:41PM +0200, Thierry Reding wrote: > Add an IOMMU device registry for drivers to register with and implement > a method for users of the IOMMU API to attach to an IOMMU device. This > allows to support deferred probing and gives the IOMMU API a convenient > hook to perf

Re: [PATCH 2/3] iommu/fsl: Fix the device domain attach condition.

2014-07-04 Thread Joerg Roedel
Hmm, On Tue, Jun 24, 2014 at 07:27:16PM +0530, Varun Sethi wrote: > - old_domain_info = find_domain(dev); > + old_domain_info = dev->archdata.iommu_domain; > if (old_domain_info && old_domain_info->domain != dma_domain) { > spin_unlock_irqrestore(&device_domain_lock, fl

Re: [PATCH 1/3] iommu/fsl: Fix PAMU window size check.

2014-07-04 Thread Joerg Roedel
On Tue, Jun 24, 2014 at 07:27:15PM +0530, Varun Sethi wrote: > /* window size is 2^(WSE+1) bytes */ > - return __ffs(addrspace_size) - 1; > + return fls64(addrspace_size) - 2; This looks bogus, why do you replace ffs (find-first-bit) by fls (find-last-bit)? Joerg

Re: [PATCH 1/1] drivers/iommu/omap-iovmm.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE

2014-07-04 Thread Joerg Roedel
On Sat, Jun 14, 2014 at 11:58:34PM +0200, Fabian Frederick wrote: > use mm.h definition > > Cc: Joerg Roedel > Cc: iommu@lists.linux-foundation.org > Signed-off-by: Fabian Frederick > --- > drivers/iommu/omap-iovmm.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Applied to

Re: [PATCH 0/3] iommu: Expose IOMMU information in sysfs

2014-07-04 Thread Joerg Roedel
On Thu, Jun 12, 2014 at 04:12:18PM -0600, Alex Williamson wrote: > Alex Williamson (3): > iommu: Add sysfs support for IOMMUs > iommu/intel: Make use of IOMMU sysfs support > iommu/amd: Add sysfs support > > > Documentation/ABI/testing/sysfs-class-iommu| 17 +++ > ...

Re: [PATCH 0/7] iommu: Fix DMA alias problems

2014-07-04 Thread Joerg Roedel
On Thu, Jul 03, 2014 at 09:51:12AM -0600, Alex Williamson wrote: > Alex Williamson (7): > iommu: Remove pci.h > iommu/fsl: Use iommu_group_get_for_dev() for IOMMU groups > iommu/intel: Update to use PCI DMA aliases > iommu/intel: Use iommu_group_get_for_dev() > iommu/a

Re: [PATCH] iommu/exynos: Select ARM_DMA_USE_IOMMU

2014-07-04 Thread Cho KyongHo
On Fri, 04 Jul 2014 15:01:08 +0530, Tushar Behera wrote: > For IOMMU to use on Exynos platforms, we need to enable ARM_DMA_USE_IOMMU. It > would be better to select it by default when EXYNOS_IOMMU is enabled. > > Signed-off-by: Tushar Behera > --- > drivers/iommu/Kconfig |1 + > 1 file chang

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-04 Thread Alexander Gordeev
On Fri, Jul 04, 2014 at 09:11:50AM +, David Laight wrote: > > I might be missing something, but we are talking of MSI address space > > here, aren't we? I am not getting how we could end up with a 'write' > > to a random kernel location when a unclaimed MSI vector sent. We could > > only expect

Re: [PATCH 2/2] iommu/vt-d: suppress compiler warnings

2014-07-04 Thread Joerg Roedel
On Mon, May 26, 2014 at 08:14:06PM +0800, Yijing Wang wrote: > suppress compiler warnings: > drivers/iommu/intel-iommu.c: In function ‘device_to_iommu’: > drivers/iommu/intel-iommu.c:673: warning: ‘segment’ may be used uninitialized > in this function > drivers/iommu/intel-iommu.c: In function ‘ge

Re: [PATCH 0/6] trivial cleanup for iommu/vt-d

2014-07-04 Thread Yijing Wang
On 2014/7/4 17:22, Joerg Roedel wrote: > On Tue, May 20, 2014 at 08:37:46PM +0800, Yijing Wang wrote: >> >> Yijing Wang (6): >> iommu/vt-d: Use list_for_each_safe() to simplify code >> iommu/vt-d: move up no_iommu and dmar_disabled check >> iommu/vt-d: clear the redundant assignment in dmar_e

Re: [PATCH 2/6] iommu/vt-d: move up no_iommu and dmar_disabled check

2014-07-04 Thread Yijing Wang
>> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c >> index e020dcf..6b71608 100644 >> --- a/drivers/iommu/intel-iommu.c >> +++ b/drivers/iommu/intel-iommu.c >> @@ -3948,6 +3948,9 @@ int __init intel_iommu_init(void) >> /* VT-d is required for a TXT/tboot launch, so enfo

Re: [PATCH 0/6] trivial cleanup for iommu/vt-d

2014-07-04 Thread Joerg Roedel
On Tue, May 20, 2014 at 08:37:46PM +0800, Yijing Wang wrote: > > Yijing Wang (6): > iommu/vt-d: Use list_for_each_safe() to simplify code > iommu/vt-d: move up no_iommu and dmar_disabled check > iommu/vt-d: clear the redundant assignment in dmar_enable_qi > iommu/vt-d: clear the redundant

RE: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-04 Thread David Laight
From: Alexander Gordeev ... > > Even if you do that, you ought to write valid interrupt information > > into the 4th slot (maybe replicating one of the earlier interrupts). > > Then, if the device does raise the 'unexpected' interrupt you don't > > get a write to a random kernel location. > > I mi

Re: [PATCH 2/6] iommu/vt-d: move up no_iommu and dmar_disabled check

2014-07-04 Thread Joerg Roedel
On Tue, May 20, 2014 at 08:37:48PM +0800, Yijing Wang wrote: > Move up the no_iommu and dmar_disabled check, avoid the > useless initialization for dmar. > > Signed-off-by: Yijing Wang > --- > drivers/iommu/intel-iommu.c |6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff

Re: [PATCH v3 02/10] devicetree: Add generic IOMMU device tree bindings

2014-07-04 Thread Arnd Bergmann
On Friday 04 July 2014 06:42:48 Varun Sethi wrote: > Master node corresponds to the device node, right? Master ID would correspond > to Stream ID? We are already using "iommu-parent" property to link a device > to its corresponding IOMMU. We can use the same property instead of using > "iommus".

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-04 Thread Alexander Gordeev
On Thu, Jul 03, 2014 at 09:20:52AM +, David Laight wrote: > From: Bjorn Helgaas > > On Tue, Jun 10, 2014 at 03:10:30PM +0200, Alexander Gordeev wrote: > > > There are PCI devices that require a particular value written > > > to the Multiple Message Enable (MME) register while aligned on > > > p

Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()

2014-07-04 Thread Alexander Gordeev
On Wed, Jul 02, 2014 at 02:22:01PM -0600, Bjorn Helgaas wrote: > On Tue, Jun 10, 2014 at 03:10:30PM +0200, Alexander Gordeev wrote: > > There are PCI devices that require a particular value written > > to the Multiple Message Enable (MME) register while aligned on > > power of 2 boundary value of a

Re: 3.16rc3 multiplatform, Armada 370 and IOMMU: unbootable kernel

2014-07-04 Thread Laurent Pinchart
Hi Gregory, (CC'ing the IOMMU mailing list) On Thursday 03 July 2014 23:24:54 Gregory CLEMENT wrote: > On 03/07/2014 23:07, Gregory CLEMENT wrote: > > On 03/07/2014 23:01, Thomas Petazzoni wrote: > >> Hello, > >> > >> If you have touched the OMAP IOMMU driver recently, please read on. > >> > >>

Re: [PATCH 2/5] iommu/arm-smmu: add support for PCI master devices

2014-07-04 Thread Will Deacon
On Fri, Jul 04, 2014 at 08:41:53AM +0100, Varun Sethi wrote: > Hi Will, Hey Varun, > > Once Thierry's generic IOMMU binding is sorted, we should look at adding > > support for the Stream ID description. Have you looked at that at all? > > > Yes, I have looked at the bindings. Would we need to re

RE: [PATCH 2/5] iommu/arm-smmu: add support for PCI master devices

2014-07-04 Thread Varun Sethi
Hi Will, > -Original Message- > From: Will Deacon [mailto:will.dea...@arm.com] > Sent: Thursday, July 03, 2014 8:14 PM > To: Sethi Varun-B16395 > Cc: linux-arm-ker...@lists.infradead.org; iommu@lists.linux- > foundation.org; thierry.red...@gmail.com; a...@arndb.de; > ohau...@codeaurora.org