Re: [PATCH] iommu/vt-d: Assign old irt entries a common valid vector in kdump kernel

2016-03-02 Thread Xunlei Pang
On 03/02/2016 at 10:58 PM, Joerg Roedel wrote: > On Wed, Mar 02, 2016 at 06:02:28PM +0800, Xunlei Pang wrote: >> Currently, the kernel copies the old irt entries during iommu >> initialization for kdump, so old vectors in the first kernel are >> used but having no related kernel irq handlers set

[PATCH] arm64/dma-mapping: Add DMA_ATTR_ALLOC_SINGLE_PAGES support

2016-03-02 Thread Yong Wu
Sometimes it is not worth for the iommu allocating big chunks. Here we enable DMA_ATTR_ALLOC_SINGLE_PAGES which could help avoid to allocate big chunks while iommu allocating buffer. More information about this attribute, please check Doug's commit[1]. [1]: https://lkml.org/lkml/2016/1/11/720

Re: [PATCH] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-03-02 Thread Tirumalesh Chalamarla
On 03/02/2016 05:10 AM, Robin Murphy wrote: On 24/02/16 21:13, Tirumalesh Chalamarla wrote: Due to Errata#27704 CN88xx SMMUv2,supports only shared ASID and VMID namespaces; specifically within a given node SMMU0 and SMMU1 share, as does SMMU2 and SMMU3. This patch address these issuee by

Re: [PATCH] iommu/ipmmu-vmsa: Add r8a7795 DT binding

2016-03-02 Thread Magnus Damm
On Wed, Mar 2, 2016 at 11:55 PM, Joerg Roedel wrote: > On Mon, Feb 29, 2016 at 11:33:09PM +0900, Magnus Damm wrote: >> From: Magnus Damm >> >> Update the IPMMU DT binding documentation to include the r8a7795 compat >> string as well as the

Re: [PATCH] iommu/vt-d: Assign old irt entries a common valid vector in kdump kernel

2016-03-02 Thread Joerg Roedel
On Wed, Mar 02, 2016 at 06:02:28PM +0800, Xunlei Pang wrote: > Currently, the kernel copies the old irt entries during iommu > initialization for kdump, so old vectors in the first kernel are > used but having no related kernel irq handlers set explicitly, > this can lead to some problems after

Re: [PATCH] iommu/ipmmu-vmsa: Add r8a7795 DT binding

2016-03-02 Thread Joerg Roedel
On Mon, Feb 29, 2016 at 11:33:09PM +0900, Magnus Damm wrote: > From: Magnus Damm > > Update the IPMMU DT binding documentation to include the r8a7795 compat > string as well as the "renesas,ipmmu-main" property that on r8a7795 will > be used to describe the topology

Re: [patch] iommu/exynos: checking for IS_ERR() instead of NULL

2016-03-02 Thread Joerg Roedel
On Wed, Mar 02, 2016 at 01:10:47PM +0300, Dan Carpenter wrote: > of_platform_device_create() returns NULL on error, it never returns > error pointers. > > Fixes: 8ed55c812fa8 ('iommu/exynos: Init from dt-specific callback instead of > initcall') > Signed-off-by: Dan Carpenter

Re: [patch 2/2] iommu/mediatek: checking for IS_ERR() instead of NULL

2016-03-02 Thread Joerg Roedel
On Wed, Mar 02, 2016 at 01:10:27PM +0300, Dan Carpenter wrote: > of_platform_device_create() returns NULL on error, it never returns > error pointers. > > Fixes: 0df4fabe208d ('iommu/mediatek: Add mt8173 IOMMU driver') > Signed-off-by: Dan Carpenter Applied, thanks.

Re: Bug: Freeing dma regions

2016-03-02 Thread David Kiarie
On Wed, Mar 2, 2016 at 4:45 PM, Joerg Roedel wrote: > On Wed, Mar 02, 2016 at 03:58:18PM +0300, David Kiarie wrote: >> On Wed, Mar 2, 2016 at 3:35 PM, Joerg Roedel wrote: >> > On Wed, Mar 02, 2016 at 11:40:04AM +0300, David Kiarie wrote: >> >> What effect is

Re: [patch 1/2] iommu/mediatek: signedness bug in probe function

2016-03-02 Thread Joerg Roedel
On Wed, Mar 02, 2016 at 01:10:06PM +0300, Dan Carpenter wrote: > "larb_nr" needs to be signed for the error handling to work. "i" can > be int as well. > > Fixes: 0df4fabe208d ('iommu/mediatek: Add mt8173 IOMMU driver') > Signed-off-by: Dan Carpenter > > diff --git

Re: [PATCH v2] iommu/io-pgtable-armv7s: Fix kmem_cache_alloc() flags

2016-03-02 Thread Joerg Roedel
On Tue, Mar 01, 2016 at 07:07:03PM +, Robin Murphy wrote: > v2: Add the backtrace to the commit log, add Will's ack. > > drivers/iommu/io-pgtable-arm-v7s.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. ___ iommu

Re: Bug: Freeing dma regions

2016-03-02 Thread Joerg Roedel
On Wed, Mar 02, 2016 at 03:58:18PM +0300, David Kiarie wrote: > On Wed, Mar 2, 2016 at 3:35 PM, Joerg Roedel wrote: > > On Wed, Mar 02, 2016 at 11:40:04AM +0300, David Kiarie wrote: > >> What effect is setting the value next_bit to last invalidated index > >> supposed to have ? >

Re: [PATCH] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-03-02 Thread Will Deacon
On Wed, Mar 02, 2016 at 03:23:57AM +, Chalamarla, Tirumalesh wrote: > On 3/1/16, 7:07 PM, "Will Deacon" wrote: > >On Wed, Feb 24, 2016 at 01:13:53PM -0800, Tirumalesh Chalamarla wrote: > >> + smmu->cavium_smmu_id = cavium_smmu_count; > >> +

Re: [PATCH 11/12] iommu/arm-smmu: Generic IOMMU DT bindings support

2016-03-02 Thread Robin Murphy
On 29/02/16 18:09, Sricharan wrote: Hi Robin, -Original Message- [...] +static int __init arm_smmu_of_init(struct device_node *np) { + struct arm_smmu_device *smmu; + struct platform_device *pdev; + int ret = arm_smmu_init(); + + if (ret) +

Re: [PATCH] iommu/arm-smmu-v2: Workaround for ThunderX errata#27704

2016-03-02 Thread Robin Murphy
On 24/02/16 21:13, Tirumalesh Chalamarla wrote: Due to Errata#27704 CN88xx SMMUv2,supports only shared ASID and VMID namespaces; specifically within a given node SMMU0 and SMMU1 share, as does SMMU2 and SMMU3. This patch address these issuee by supplying asid and vmid while calculating ASID

Re: Bug: Freeing dma regions

2016-03-02 Thread David Kiarie
On Wed, Mar 2, 2016 at 3:35 PM, Joerg Roedel wrote: > On Wed, Mar 02, 2016 at 11:40:04AM +0300, David Kiarie wrote: >> What effect is setting the value next_bit to last invalidated index >> supposed to have ? > > The idea is to safe the IOTLB flush by not re-using the

Re: [patch] iommu/exynos: checking for IS_ERR() instead of NULL

2016-03-02 Thread Marek Szyprowski
Hello, On 2016-03-02 11:10, Dan Carpenter wrote: of_platform_device_create() returns NULL on error, it never returns error pointers. Fixes: 8ed55c812fa8 ('iommu/exynos: Init from dt-specific callback instead of initcall') Signed-off-by: Dan Carpenter Acked-by:

Re: Bug: Freeing dma regions

2016-03-02 Thread Joerg Roedel
On Wed, Mar 02, 2016 at 11:40:04AM +0300, David Kiarie wrote: > What effect is setting the value next_bit to last invalidated index > supposed to have ? The idea is to safe the IOTLB flush by not re-using the address-range until the allocator wraps around to 0 again. We only allocate address

Re: [PATCH 1/2] iommu/io-pgtable: Add MTK 4GB mode in Short-descriptor

2016-03-02 Thread Robin Murphy
Hi Yong, On 23/02/16 23:02, Yong Wu wrote: Mediatek extend bit9 in the lvl1 and lvl2 pgtable descriptor of the Short-descriptor as the 4GB mode in which the dram size will be over 4GB. We add a special quirk for this MTK-4GB mode, And in the standard spec, Bit9 in the lvl1 is "IMPLEMENTATION

Re: [RFC v5 00/17] KVM PCIe/MSI passthrough on ARM/ARM64

2016-03-02 Thread Eric Auger
Hi Manish, On 03/02/2016 09:11 AM, Jaggi, Manish wrote: > > >>> From: Eric Auger >>> Sent: Tuesday, March 1, 2016 11:57 PM >>> To: eric.au...@st.com; eric.au...@linaro.org; robin.mur...@arm.com; >>> alex.william...@redhat.com; will.dea...@arm.com; j...@8bytes.org; >>>

Re: [PATCH v10 0/5] MT8173 IOMMU SUPPORT

2016-03-02 Thread Arnd Bergmann
On Wednesday 02 March 2016 11:48:43 Matthias Brugger wrote: > > On 26/02/16 12:06, Joerg Roedel wrote: > > Hi Philipp, > > > > On Fri, Feb 26, 2016 at 09:55:55AM +0100, Philipp Zabel wrote: > >> Do you have a stable branch that I could base the mediatek-drm patches > >> on and that I may include

Re: [PATCH v10 0/5] MT8173 IOMMU SUPPORT

2016-03-02 Thread Matthias Brugger
Hi Arnd and Olof, On 26/02/16 12:06, Joerg Roedel wrote: Hi Philipp, On Fri, Feb 26, 2016 at 09:55:55AM +0100, Philipp Zabel wrote: Do you have a stable branch that I could base the mediatek-drm patches on and that I may include in a pull request to be merged via drm-next? You can base it

[patch 2/2] iommu/mediatek: checking for IS_ERR() instead of NULL

2016-03-02 Thread Dan Carpenter
of_platform_device_create() returns NULL on error, it never returns error pointers. Fixes: 0df4fabe208d ('iommu/mediatek: Add mt8173 IOMMU driver') Signed-off-by: Dan Carpenter diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 1a4022c..4682da4

[patch 1/2] iommu/mediatek: signedness bug in probe function

2016-03-02 Thread Dan Carpenter
"larb_nr" needs to be signed for the error handling to work. "i" can be int as well. Fixes: 0df4fabe208d ('iommu/mediatek: Add mt8173 IOMMU driver') Signed-off-by: Dan Carpenter diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 721ffdb..1a4022c

[patch] iommu/exynos: checking for IS_ERR() instead of NULL

2016-03-02 Thread Dan Carpenter
of_platform_device_create() returns NULL on error, it never returns error pointers. Fixes: 8ed55c812fa8 ('iommu/exynos: Init from dt-specific callback instead of initcall') Signed-off-by: Dan Carpenter diff --git a/drivers/iommu/exynos-iommu.c

[PATCH] iommu/vt-d: Assign old irt entries a common valid vector in kdump kernel

2016-03-02 Thread Xunlei Pang
Currently, the kernel copies the old irt entries during iommu initialization for kdump, so old vectors in the first kernel are used but having no related kernel irq handlers set explicitly, this can lead to some problems after lapics are enabled: - When some in-flight dma finished and triggered

Re: Bug: Freeing dma regions

2016-03-02 Thread David Kiarie
On Wed, Mar 2, 2016 at 11:37 AM, David Kiarie wrote: > On Wed, Mar 2, 2016 at 11:29 AM, Joerg Roedel wrote: >> On Wed, Mar 02, 2016 at 03:45:39AM +0300, David Kiarie wrote: >>> Hello, >>> >>> This patch seems to have introduced a bug - >>>

Re: Bug: Freeing dma regions

2016-03-02 Thread David Kiarie
On Wed, Mar 2, 2016 at 11:29 AM, Joerg Roedel wrote: > On Wed, Mar 02, 2016 at 03:45:39AM +0300, David Kiarie wrote: >> Hello, >> >> This patch seems to have introduced a bug - >>

Re: Bug: Freeing dma regions

2016-03-02 Thread Joerg Roedel
On Wed, Mar 02, 2016 at 03:45:39AM +0300, David Kiarie wrote: > Hello, > > This patch seems to have introduced a bug - > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4eeca8c5e72fad752eba9efc293c924d65faa86e > > As the commit message says, it should check for regions

Re: [PATCH] iommu/ipmmu-vmsa: Add r8a7795 DT binding

2016-03-02 Thread Geert Uytterhoeven
Hi Magnus, On Mon, Feb 29, 2016 at 3:33 PM, Magnus Damm wrote: > From: Magnus Damm > > Update the IPMMU DT binding documentation to include the r8a7795 compat > string as well as the "renesas,ipmmu-main" property that on r8a7795 will > be used

Re: [PATCH v2] iommu/io-pgtable-armv7s: Fix kmem_cache_alloc() flags

2016-03-02 Thread Geert Uytterhoeven
On Tue, Mar 1, 2016 at 8:07 PM, Robin Murphy wrote: > Whilst the default SLUB allocator happily just merges the original > allocation flags from kmem_cache_create() with those passed through > kmem_cache_alloc(), there is a code path in the SLAB allocator which > will