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

2015-05-04 Thread Dave Young
On 05/04/15 at 06:23pm, Joerg Roedel wrote: > On Fri, Apr 24, 2015 at 04:49:57PM +0800, Dave Young wrote: > > I'm more than happy to see this issue can be fixed in the patchset, I > > do not agree to add the code there with such problems. OTOH, for now > > seems there's no way to fix it. > > And t

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

2015-05-04 Thread Dave Young
On 05/04/15 at 01:05pm, Joerg Roedel wrote: > On Fri, Apr 03, 2015 at 04:40:31PM +0800, Dave Young wrote: > > Have not read all the patches, but I have a question, not sure this > > has been answered before. Old memory is not reliable, what if the old > > memory get corrupted before panic? Is it sa

Re: [PATCH v6 25/25] ARM: dts: exynos: add iommu reserved regions for bootloader's splash screen

2015-05-04 Thread Krzysztof Kozłowski
2015-05-04 17:16 GMT+09:00 Marek Szyprowski : > Some bootloaders enable FIMD module and configure it as a simple > framebuffer to display boot logo or splash screen before booting the > kernel. Such framebuffer stays enabled until proper kernel driver gets > probbed. Usually it is configured in suc

Re: [PATCH v6 21/25] ARM: dts: exynos3250: add sysmmu nodes

2015-05-04 Thread Krzysztof Kozłowski
2015-05-04 17:16 GMT+09:00 Marek Szyprowski : > This patch adds System MMU nodes to the devices that are specific to > Exynos3250 series. > > Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Best regards, Krzysztof ___ iommu mailing list

Re: [PATCH v6 20/25] ARM: dts: exynos4: add sysmmu nodes

2015-05-04 Thread Krzysztof Kozłowski
2015-05-04 17:16 GMT+09:00 Marek Szyprowski : > This patch adds System MMU nodes that are specific to Exynos4210/4x12 series. > > Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Best regards, Krzysztof ___ iommu mailing list iommu@lists.

Re: [PATCH v6 24/25] ARM: dts: exynos5420: add sysmmu nodes

2015-05-04 Thread Krzysztof Kozłowski
2015-05-04 17:16 GMT+09:00 Marek Szyprowski : > This patch adds System MMU nodes to all defined devices that are specific > to Exynos5420/5800/5422 series. > > Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Best regards, Krzysztof ___ i

Re: [PATCH v6 01/25] arm: dma-mapping: add support for creating reserved mappings in iova space

2015-05-04 Thread Rob Herring
On Mon, May 4, 2015 at 3:15 AM, Marek Szyprowski wrote: > Some devices (like frame buffers) are enabled by bootloader and configured > to perform DMA operations automatically (like displaying boot logo or splash > screen). Such devices operate and perform DMA operation usually until the > proper d

Re: [PATCH v6 22/25] ARM: dts: exynos4415: add sysmmu nodes

2015-05-04 Thread Krzysztof Kozłowski
2015-05-04 17:16 GMT+09:00 Marek Szyprowski : > This patch adds System MMU nodes to all defined devices that are specific > to Exynos4415 series. > > Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Best regards, Krzysztof ___ iommu maili

Re: [PATCH v6 23/25] ARM: dts: exynos5250: add sysmmu nodes

2015-05-04 Thread Krzysztof Kozłowski
2015-05-04 17:16 GMT+09:00 Marek Szyprowski : > This patch adds System MMU nodes to all defined devices that are specific > to Exynos5250 series. > > Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Best regards, Krzysztof ___ iommu maili

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

2015-05-04 Thread Joerg Roedel
On Fri, Apr 24, 2015 at 04:49:57PM +0800, Dave Young wrote: > I'm more than happy to see this issue can be fixed in the patchset, I > do not agree to add the code there with such problems. OTOH, for now > seems there's no way to fix it. And that's the point. We discuss this issue and possible solu

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

2015-05-04 Thread Don Dutile
On 05/04/2015 07:05 AM, Joerg Roedel wrote: On Fri, Apr 03, 2015 at 04:40:31PM +0800, Dave Young wrote: Have not read all the patches, but I have a question, not sure this has been answered before. Old memory is not reliable, what if the old memory get corrupted before panic? Is it safe to conti

Re: [PATCH] iommu/amd: Fix bug in put_pasid_state_wait

2015-05-04 Thread Joerg Roedel
On Thu, Apr 16, 2015 at 05:08:44PM +0300, Oded Gabbay wrote: > This patch fixes a bug in put_pasid_state_wait that appeared in kernel 4.0 > The bug is that pasid_state->count wasn't decremented before entering the > wait_event. Thus, the condition in wait_event will never be true. > > The fix is t

Re: Any side effect if turn off amd_iommu

2015-05-04 Thread Joerg Roedel
Hi Acelan, On Thu, Apr 23, 2015 at 10:15:33AM +0800, AceLan Kao wrote: > We can confirm that the issue comes from the resources conflict, > adding this boot option can solve the issue. >ivrs_ioapic[5]=00:00.1 > We've tried to negotiate with the OEM BIOS team, but they refused to > modify the B

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

2015-05-04 Thread Joerg Roedel
On Fri, Apr 03, 2015 at 04:40:31PM +0800, Dave Young wrote: > Have not read all the patches, but I have a question, not sure this > has been answered before. Old memory is not reliable, what if the old > memory get corrupted before panic? Is it safe to continue using it in > 2nd kernel, I worry tha

[PATCH v6 27/26] iommu: exynos: add system suspend/resume support

2015-05-04 Thread Marek Szyprowski
When system goes into suspend state, iommu should save it's state and restore after system resume. This is handled by 'late' pm ops to ensure that sysmmu will be suspended after its master devices and restored before them. Signed-off-by: Marek Szyprowski --- Hello, This patch got lost in the reb

[PATCH v6 21/25] ARM: dts: exynos3250: add sysmmu nodes

2015-05-04 Thread Marek Szyprowski
This patch adds System MMU nodes to the devices that are specific to Exynos3250 series. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos3250.dtsi | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3

[PATCH v6 25/25] ARM: dts: exynos: add iommu reserved regions for bootloader's splash screen

2015-05-04 Thread Marek Szyprowski
Some bootloaders enable FIMD module and configure it as a simple framebuffer to display boot logo or splash screen before booting the kernel. Such framebuffer stays enabled until proper kernel driver gets probbed. Usually it is configured in such a way, that it performs DMA from the buffer located

[PATCH v6 23/25] ARM: dts: exynos5250: add sysmmu nodes

2015-05-04 Thread Marek Szyprowski
This patch adds System MMU nodes to all defined devices that are specific to Exynos5250 series. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos5250.dtsi | 250 ++ 1 file changed, 250 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b

[PATCH v6 24/25] ARM: dts: exynos5420: add sysmmu nodes

2015-05-04 Thread Marek Szyprowski
This patch adds System MMU nodes to all defined devices that are specific to Exynos5420/5800/5422 series. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos5420.dtsi | 181 ++ 1 file changed, 181 insertions(+) diff --git a/arch/arm/boot/dts/exynos54

[PATCH v6 22/25] ARM: dts: exynos4415: add sysmmu nodes

2015-05-04 Thread Marek Szyprowski
This patch adds System MMU nodes to all defined devices that are specific to Exynos4415 series. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4415.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/exynos4415.dtsi b/arch/arm/boot/dts/exynos4415

[PATCH v6 20/25] ARM: dts: exynos4: add sysmmu nodes

2015-05-04 Thread Marek Szyprowski
This patch adds System MMU nodes that are specific to Exynos4210/4x12 series. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4.dtsi| 118 ++ arch/arm/boot/dts/exynos4210.dtsi | 23 arch/arm/boot/dts/exynos4x12.dtsi | 82

[PATCH v6 17/25] iommu: exynos: init from dt-specific callback instead of initcall

2015-05-04 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 --- drivers/iommu/exynos-iommu.c | 30 +

[PATCH v6 18/25] iommu: exynos: add callback for initializing devices from device tree

2015-05-04 Thread Marek Szyprowski
This patch adds implementation of of_xlate callback, which prepares masters device for attaching to IOMMU. This callback is called during creating devices from device tree. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 28 1 file changed, 28 inse

[PATCH v6 19/25] iommu: exynos: remove unneeded code

2015-05-04 Thread Marek Szyprowski
Once driver initialization has been moved from initcall to of_xlate() callback, this patch is no longer needed. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c i

[PATCH v6 13/25] iommu: exynos: rename variables to reflect their purpose

2015-05-04 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 meaningless 'priv' by 'domain' to reflect its purpose. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 187 ++---

[PATCH v6 07/25] iommu: exynos: remove useless spinlock

2015-05-04 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 --- drivers/iom

[PATCH v6 10/25] iommu: exynos: remove useless device_add/remove callbacks

2015-05-04 Thread Marek Szyprowski
The driver doesn't need to do anything important in device add/remove callbacks, because initialization will be done from device-tree specific callbacks added later. IOMMU groups created by current code were never used. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 28 --

[PATCH v6 08/25] iommu: exynos: refactor function parameters to simplify code

2015-05-04 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 --- drivers/iommu/exynos-iom

[PATCH v6 12/25] iommu: exynos: add support for runtime_pm

2015-05-04 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 --- drivers/iommu/exynos-iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/ex

[PATCH v6 03/25] drm/exynos: iommu: detach from default dma-mapping domain on init

2015-05-04 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 --- drivers/gpu/drm/exynos/exynos_drm_iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers/gpu

[PATCH v6 09/25] iommu: exynos: remove unused functions, part 2

2015-05-04 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 --- drivers/iommu/exynos-iommu.c | 43 --- 1 file changed, 43 deleti

[PATCH v6 02/25] arm: exynos: pm_domains: register power domain driver from core_initcall

2015-05-04 Thread Marek Szyprowski
SYSMMU devices are registered very early in arch_initcall, so ensure that they can get access to power domains by registering power domain driver from earlier initcall. This change requires dropping usage of the platform device associated with each power domain and replacing clock calls with respec

[PATCH v6 05/25] iommu: exynos: don't read version register on every tlb operation

2015-05-04 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 --- drivers/iommu/exynos-iommu.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/exyn

[PATCH v6 16/25] iommu: exynos: remove excessive includes and sort others alphabetically

2015-05-04 Thread Marek Szyprowski
Removed following unused includes: , , and . Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 6a0199570b00..5429e75b120c 100644 --

[PATCH v6 14/25] iommu: exynos: use struct exynos_iommu_domain in internal structures

2015-05-04 Thread Marek Szyprowski
Replace all remaining usage of struct iommu_domain with struct exynos_iommu_domain in all internal structures and functions. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/exynos-iommu.

[PATCH v6 06/25] iommu: exynos: remove unused functions

2015-05-04 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 --- drivers/iommu/exynos-iommu.c | 31 --- 1 file changed, 31 deletions(-) diff --git a/drivers/iommu/exynos-

[PATCH v6 15/25] iommu: exynos: document internal structures

2015-05-04 Thread Marek Szyprowski
Add a few words of comment to all internal structures used by the driver. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 49 +--- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iom

[PATCH v6 11/25] iommu: exynos: add support for binding more than one sysmmu to master device

2015-05-04 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:

[PATCH v6 01/25] arm: dma-mapping: add support for creating reserved mappings in iova space

2015-05-04 Thread Marek Szyprowski
Some devices (like frame buffers) are enabled by bootloader and configured to perform DMA operations automatically (like displaying boot logo or splash screen). Such devices operate and perform DMA operation usually until the proper driver for them is loaded and probed. However before that happens,

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

2015-05-04 Thread Marek Szyprowski
Hello Everyone, This is yet another attempt to get Exynos SYSMMU driver with integrated with IOMMU & DMA-mapping subsystems. The main change from previous version is addition of the patches to define iommu-mapping, which need to be created during system boot to avoid IOMMU fault by devices, which

[PATCH v6 04/25] drm/exynos: fimd: ensure proper hw state in fimd_clear_channel()

2015-05-04 Thread Marek Szyprowski
One should not do any assumptions on the stare of the fimd hardware during driver initialization, so to properly reset fimd before enabling IOMMU, one should ensure that all power domains and clocks are really enabled. This patch adds calls to power on/off in the fimd_clear_channel() function to en