Re: Master-aware devices and sideband ID data

2015-05-29 Thread Chalamarla, Tirumalesh
> On May 27, 2015, at 10:39 AM, Mark Rutland wrote: > > On Tue, May 26, 2015 at 11:20:59PM +0100, Chalamarla, Tirumalesh wrote: >> This is some thing we also like to see in ITS and SMMU drivers. >>> On Mar 24, 2015, at 8:50 AM, Mark Rutland wrote: >>> >>> Hi all, >>> >>> For some devices, id

[iommu:x86/vt-d 7/10] drivers/iommu/intel-iommu.c:920:22: sparse: incorrect type in assignment (different address spaces)

2015-05-29 Thread kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d head: 6c37b5ba0e4df96647677fac5d87d9fd561c3ef8 commit: 60d69731b2742d12178b54844b852de0549bbd87 [7/10] iommu/vt-d: enable kdump support in iommu module reproduce: # apt-get install sparse git checkout 60d69731b2742

[iommu:x86/vt-d 5/10] drivers/iommu/intel-iommu.c:4951:9: sparse: incorrect type in argument 2 (different address spaces)

2015-05-29 Thread kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d head: 6c37b5ba0e4df96647677fac5d87d9fd561c3ef8 commit: 0094b0dede547c1af03f93092f2ad25566c18f6b [5/10] iommu/vt-d: Add functions to load and save old root entry reproduce: # apt-get install sparse git checkout 0094

[iommu:x86/vt-d 4/10] drivers/iommu/intel-iommu.c:4875:17: sparse: incorrect type in argument 2 (different address spaces)

2015-05-29 Thread kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d head: 6c37b5ba0e4df96647677fac5d87d9fd561c3ef8 commit: ebe05c7397dc63d99fb3ec69a37b4440952089bc [4/10] iommu/vt-d: Functions to copy data from old mem reproduce: # apt-get install sparse git checkout ebe05c7397dc63

[PATCH v3 4/7] DMA-API: Add dma_(un)map_resource() documentation

2015-05-29 Thread wdavis
From: Will Davis Add references to both the general API documentation as well as the HOWTO. Signed-off-by: Will Davis --- Documentation/DMA-API-HOWTO.txt | 36 ++-- Documentation/DMA-API.txt | 31 ++- 2 files changed, 60 inserti

[PATCH v3 5/7] iommu/amd: Implement (un)map_resource

2015-05-29 Thread wdavis
From: Will Davis Implement 'map_resource' for the AMD IOMMU driver. Generalize the existing map_page implementation to operate on a physical address, and make both map_page and map_resource wrappers around that helper (and similiarly, for unmap_page and unmap_resource). This allows a device to m

[PATCH v3 3/7] dma-mapping: pci: add pci_(un)map_resource

2015-05-29 Thread wdavis
From: Will Davis Simply route these through to the new dma_(un)map_resource APIs. Signed-off-by: Will Davis Reviewed-by: Terence Ripperda Reviewed-by: John Hubbard --- include/asm-generic/pci-dma-compat.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/asm-generic

[PATCH v3 1/7] dma-debug: add checking for map/unmap_resource

2015-05-29 Thread wdavis
From: Will Davis Add debug callbacks for the new dma_map_resource and dma_unmap_resource functions. Signed-off-by: Will Davis Reviewed-by: Terence Ripperda Reviewed-by: John Hubbard --- include/linux/dma-debug.h | 20 lib/dma-debug.c | 47 ++

[PATCH v3 7/7] x86: add pci-nommu implementation of map_resource

2015-05-29 Thread wdavis
From: Will Davis Lookup the bus address of the resource by finding the parent host bridge, which may be different than the parent host bridge of the target device. Signed-off-by: Will Davis --- arch/x86/kernel/pci-nommu.c | 32 1 file changed, 32 insertions(+)

[PATCH v3 6/7] iommu/vt-d: implement (un)map_resource

2015-05-29 Thread wdavis
From: Will Davis Implement 'map_resource' for the Intel IOMMU driver. Simply translate the resource to a physical address and route it to the same handlers used by the 'map_page' API. This allows a device to map another's resource, to enable peer-to-peer transactions. Signed-off-by: Will Davis

[PATCH v3 2/7] DMA-API: Introduce dma_(un)map_resource

2015-05-29 Thread wdavis
From: Will Davis Add functions to DMA-map and -unmap a resource for a given device. This will allow devices to DMA-map a peer device's resource (for example, another device's BAR region on PCI) to enable peer-to-peer transactions. Signed-off-by: Will Davis --- include/asm-generic/dma-mapping-b

[PATCH v3 0/7] IOMMU/DMA map_resource support for peer-to-peer

2015-05-29 Thread wdavis
From: Will Davis Hi, This is the third version of a patchset to add the DMA APIs necessary to map and unmap a struct resource to and from a PCI device's IOVA domain. This allows a PCI device to access a peer device's BAR resource when a hardware IOMMU is enabled. Thanks, Will Changelog: v3: -

Re: [PATCH 2/4] iommu: Implement common IOMMU ops for DMA mapping

2015-05-29 Thread Robin Murphy
On 29/05/15 06:26, Yong Wu wrote: Hi Robin, Thanks. While we test venc in v4l2, we get a problem: Thanks as always for testing! When we enter the funtion[0], it will be break unexpectedly in the funcion[1] while the offset of sg table is not zero. It is ok if the offset is zer

Re: [PATCH v11 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-05-29 Thread Joerg Roedel
On Mon, May 11, 2015 at 05:52:44PM +0800, Li, Zhen-Hua wrote: > Li, Zhen-Hua (10): > iommu/vt-d: New function to attach domain with id > iommu/vt-d: Items required for kdump > iommu/vt-d: Function to get existing context entry > iommu/vt-d: functions to copy data from old mem > iommu/vt-d

Re: [PATCH 2/3] iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices

2015-05-29 Thread Joerg Roedel
On Fri, May 29, 2015 at 12:35:56PM +0100, Robin Murphy wrote: > The trouble with this is, what about the CPU page size? Say you have > some multimedia subsystem with its own integrated SMMU and for that > they've only implemented the 16K granule scheme because it works > best for the video hardware

Re: [RFC/PATCH 5/9] of: dma: Split of_configure_dma() into mask and ops configuration

2015-05-29 Thread Rob Herring
On Thu, May 14, 2015 at 6:00 PM, Laurent Pinchart wrote: > The of_configure_dma() function configures both the DMA masks and ops. > Moving DMA ops configuration to probe time would thus also delay > configuration of the DMA masks, which might not be safe. To avoid issues > split the configuration

Re: [RFC/PATCH 4/9] of: dma: Make of_dma_deconfigure() public

2015-05-29 Thread Rob Herring
On Thu, May 14, 2015 at 6:00 PM, Laurent Pinchart wrote: > As part of moving DMA initializing to probe time the > of_dma_deconfigure() function will need to be called from different > source files. Make it public and move it to drivers/of/device.c where > the of_dma_configure() function is. > > Si

Re: [PATCH 2/3] iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices

2015-05-29 Thread Robin Murphy
Hi Joerg, On 29/05/15 07:43, Joerg Roedel wrote: 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; +

Re: [PATCH 2/2] iommu/arm-smmu: Make force_stage module param read-only in sysfs

2015-05-29 Thread Joerg Roedel
On Wed, May 27, 2015 at 05:09:35PM +0100, Will Deacon wrote: > Changing force_stage dynamically isn't supported by the driver and it > also doesn't make a whole lot of sense to change it once the SMMU is up > and running. > > This patch makes the sysfs entry for the parameter read-only. > > Signe

Re: [PATCH v2 0/3] iommu/arm=smmu: Add driver for ARM SMMUv3 devices

2015-05-29 Thread Joerg Roedel
On Wed, May 27, 2015 at 05:25:57PM +0100, Will Deacon wrote: > Will Deacon (3): > Documentation: dt-bindings: Add device-tree binding for ARM SMMUv3 > IOMMU > iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices > drivers/vfio: Allow type-1 IOMMU instantiation on top of an AR

Re: [PATCH 0/4] arm64: IOMMU-backed DMA mapping

2015-05-29 Thread Joerg Roedel
Hi Robin, Thanks for your work. We are really moving forward to a common DMA-API implementation for all iommu drivers. On Wed, May 27, 2015 at 03:09:14PM +0100, Robin Murphy wrote: > In the meantime, Laurent's proposal for probe deferral[2] offers hope > that the bus notifier dance may only need

Re: [PATCH v7 00/25] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem

2015-05-29 Thread Joerg Roedel
On Tue, May 19, 2015 at 03:20:20PM +0200, Marek Szyprowski wrote: > Marek Szyprowski (25): > drm/exynos: iommu: detach from default dma-mapping domain on init > drm/exynos: fimd: ensure proper hw state in fimd_clear_channel() > iommu: Init iommu-groups support earlier, in core_initcall > io

Re: [PATCH v7 03/25] iommu: Init iommu-groups support earlier, in core_initcall

2015-05-29 Thread Joerg Roedel
On Sat, May 23, 2015 at 07:23:34PM +0300, Laurent Pinchart wrote: > On Tuesday 19 May 2015 15:20:23 Marek Szyprowski wrote: > > -arch_initcall(iommu_init); > > +core_initcall(iommu_init); > > I'll let Joerg comment on this, but this initcall ordering dance always makes > me feel that something is

Re: [PATCH] iommu/rockchip: silence attaching and detaching of devices

2015-05-29 Thread Joerg Roedel
On Thu, May 21, 2015 at 09:57:29AM +0200, Heiko Stuebner wrote: > Currently the driver emits a log line every time a device attaches or > detaches - which happens at every unblank/blank of the drm for example. > The message itself also has no real value to the average user and is > merely useful wh

Re: [PATCH v2 4/7] DMA-API: Add dma_(un)map_resource() documentation

2015-05-29 Thread j...@8bytes.org
On Wed, May 20, 2015 at 03:15:59PM -0400, Mark Hounschell wrote: > On 05/20/2015 01:30 PM, William Davis wrote: > >In an IOMMU environment, the DMA ops would be one of the IOMMU > >implementations, so these APIs would create a mapping for the peer device > >resource, even if it's on the same bus. W

Re: [PATCH v2 2/7] DMA-API: Introduce dma_(un)map_resource

2015-05-29 Thread Joerg Roedel
On Mon, May 18, 2015 at 01:24:59PM -0500, wda...@nvidia.com wrote: > +static inline dma_addr_t dma_map_resource_attrs(struct device *dev, > + struct resource *res, > + size_t offset, size_t size, > +