[PATCH v3 03/19] arm: dma-mapping: add missing check for iommu

2014-11-19 Thread Marek Szyprowski
There is no point trying to initialize dma_ops with arm_get_iommu_dma_map_ops() if no iommu has been provided. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/dma-mapping.c

[PATCH v3 11/19] iommu: exynos: remove unused functions, part 2

2014-11-19 Thread Marek Szyprowski
After refactoring functions to use pointer to struct sysmmu_drvdata directly, some functions became useless and thus never used, so remove them completely. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 43 ---

[PATCH v3 09/19] iommu: exynos: remove useless spinlock

2014-11-19 Thread Marek Szyprowski
This patch removes useless spinlocks and other unused members from struct exynos_iommu_owner. There is no point is protecting this structure by spinlock because content of this structure doesn't change and other structures have their own spinlocks. Signed-off-by: Marek Szyprowski

[PATCH v3 04/19] drm: exynos: detach from default dma-mapping domain on init

2014-11-19 Thread Marek Szyprowski
This patch adds code, which detach sub-device nodes from default iommu domain if such has been configured. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/gpu/drm/exynos/exynos_drm_iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v3 05/19] arm: exynos: pm_domains: add support for devices registered before arch_initcall

2014-11-19 Thread Marek Szyprowski
SYSMMU devices will be registered early before any other devices and before calling arch_initcall. To add them to respective power domains, additional scan of all platform devices is needed. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- arch/arm/mach-exynos/pm_domains.c | 9

[PATCH v3 06/19] ARM: dts: exynos4: add sysmmu nodes

2014-11-19 Thread Marek Szyprowski
This patch adds System MMU nodes that are specific to Exynos4210/4x12 series. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- arch/arm/boot/dts/exynos4.dtsi| 117 ++ arch/arm/boot/dts/exynos4210.dtsi | 23

[PATCH v3 08/19] iommu: exynos: remove unused functions

2014-11-19 Thread Marek Szyprowski
This patch removes two unneeded functions, which are not a part of generic IOMMU API and were never used by any other driver. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 31 --- 1 file changed, 31 deletions(-) diff

[PATCH v3 07/19] iommu: exynos: don't read version register on every tlb operation

2014-11-19 Thread Marek Szyprowski
This patch removes reading of REG_MMU_VERSION register on every tlb operation and caches SYSMMU version in driver's internal data. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff

[PATCH v3 01/19] iommu: fix const qualifier in of_iommu_set_ops

2014-11-19 Thread Marek Szyprowski
Make of_iommu_set_ops() parameter attribute consistent with bus_set_iommu(). Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- include/linux/of_iommu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/of_iommu.h b/include/linux/of_iommu.h index

[PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem

2014-11-19 Thread Marek Szyprowski
Hello Everyone, This is another attempt to finally make Exynos SYSMMU driver fully integrated with DMA-mapping subsystem. The main change from previous version is a rebase onto latest automatic DMA configuration for IOMMU masters patches from Will Deacon. This patchset demonstrates that Will's

[PATCH v3 02/19] iommu: fix initialization without 'add_device' callback

2014-11-19 Thread Marek Szyprowski
IOMMU drivers can be initialized from of_iommu helpers. Such drivers don't need to provide device_add callbacks to operate properly, so there is no need to fail initialization if the callback is missing. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/iommu.c | 2 +- 1

[PATCH v3 14/19] iommu: exynos: add support for runtime_pm

2014-11-19 Thread Marek Szyprowski
This patch fixes support for runtime power management for SYSMMU controllers, so they are enabled when master device is attached. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v3 10/19] iommu: exynos: refactor function parameters to simplify code

2014-11-19 Thread Marek Szyprowski
This patch simplifies the code by: - refactoring function parameters from struct device pointer to direct pointer to struct sysmmu drvdata - moving list_head enteries from struct exynos_iommu_owner directly to struct sysmmu_drvdata Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com ---

[PATCH v3 17/19] iommu: exynos: remove excessive includes and sort others alphabetically

2014-11-19 Thread Marek Szyprowski
Removed following unused includes: linux/mm.h, linux/errno.h, linux/memblock.h and linux/export.h. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git

[PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-11-19 Thread Marek Szyprowski
This patch introduces IOMMU_OF_DECLARE-based initialization to the driver, which replaces subsys_initcall-based procedure. exynos_iommu_of_setup ensures that each sysmmu controller is probed before its master device. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com ---

[PATCH v3 16/19] iommu: exynos: document internal structures

2014-11-19 Thread Marek Szyprowski
Add a few words of comment to all internal structures used by the driver. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 49 +--- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git

[PATCH v3 15/19] iommu: exynos: rename variables to reflect their purpose

2014-11-19 Thread Marek Szyprowski
This patch renames some variables to make the code easier to understand. 'domain' is replaced by 'iommu_domain' (more generic entity) and really meaning less 'priv' by 'domain' to reflect its purpose. Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com --- drivers/iommu/exynos-iommu.c | 191

Re: [RFC PATCH v4 0/8] Introduce automatic DMA configuration for IOMMU masters

2014-11-19 Thread Marek Szyprowski
Hello, On 2014-11-14 19:56, Will Deacon wrote: Hello everybody, Here is the fourth iteration of the RFC I've previously posted here: RFCv1: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-August/283023.html RFCv2:

[PATCH v3 13/19] iommu: exynos: add support for binding more than one sysmmu to master device

2014-11-19 Thread Marek Szyprowski
This patch adds support for assigning more than one SYSMMU controller to the master device. This has been achieved simply by chaning the struct device pointer in struct exynos_iommu_owner into the list of struct sysmmu_drvdata of all controllers assigned to the given master device. Signed-off-by:

Re: [RFC PATCH v4 0/8] Introduce automatic DMA configuration for IOMMU masters

2014-11-19 Thread Will Deacon
Hi Marek, On Wed, Nov 19, 2014 at 11:21:26AM +, Marek Szyprowski wrote: On 2014-11-14 19:56, Will Deacon wrote: Hello everybody, Here is the fourth iteration of the RFC I've previously posted here: RFCv1:

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

2014-11-19 Thread Will Deacon
Hi Joerg, Please can you pull these ARM SMMU changes for 3.19? As well as the usual driver updates (enabling support for the new NESTING attribute), there are also the IOMMU_NOEXEC patches from Antonios, which includes a fix for a resulting compiler warning in the AMD IOMMU driver. Cheers, Will

RE: [PATCH 02/13] KVM: Initialize VT-d Posted-Interrtups Descriptor

2014-11-19 Thread Wu, Feng
-Original Message- From: Jiang Liu [mailto:jiang@linux.intel.com] Sent: Tuesday, November 11, 2014 9:36 PM To: Wu, Feng; g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org; j...@8bytes.org; t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org Cc:

Re: [PATCH 02/13] KVM: Initialize VT-d Posted-Interrtups Descriptor

2014-11-19 Thread Jiang Liu
On 2014/11/20 12:53, Wu, Feng wrote: -Original Message- snit + /* +* Initialize Posted-Interrupt Descriptor +*/ + + pi_clear_sn(vmx-pi_desc); + vmx-pi_desc.nv = POSTED_INTR_VECTOR; + + /* Physical mode for Notificaiton Event */ + vmx-pi_desc.ndm = 0; +

[RFC Patch V1] genirq: Introduce irq_set_vcpu_affinity() to target an interrupt to a VCPU

2014-11-19 Thread Jiang Liu
With Posted-Interrupts support in Intel CPU and IOMMU, an external interrupt from assigned-devices could be directly delivered to a virtual CPU in a virtual machine. Instead of hacking KVM and Intel IOMMU drivers, we propose a platform independent interface to target an interrupt to a specific