[PATCH 0/8] Fix crashdump failure caused by legacy DMA/IO

2014-04-15 Thread Bill Sumner
The following series implements a fix for: A kdump problem about DMA that has been discussed for a long time. That is, when a kernel panics and boots into the kdump kernel, DMA that was started by the panicked kernel is not stopped before the kdump kernel is booted; and the kdump kernel disables th

[PATCH 2/8] Consolidate all .h lines at front of intel-iommu.c file

2014-04-15 Thread Bill Sumner
In intel-iommu.c, move downward the few lines near the front that should not move to an intel-iommu-private.h file (mostly data-item definitions) This leaves a consolidated block of the lines that would move to an intel-iommu-private.h file at the front of the file. Signed-off-by: Bill Sumne

[PATCH 3/8] Create intel-iommu-private.h

2014-04-15 Thread Bill Sumner
Move the single block of #define, static inline ... ; struct definitions to intel-iommu-private.h from intel-iommu.c Replace them with #include "intel-iommu-private.h" Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu-private.h | 351 drivers/iommu

[PATCH 4/8] Update iommu_attach_domain() and its callers

2014-04-15 Thread Bill Sumner
Allow specification of the domain-id for the new domain. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 4352731..0c00c2d 1006

[PATCH 5/8] Add new definitions & prototypes to intel-iommu-private.h

2014-04-15 Thread Bill Sumner
Items needed for fixing crashdump. Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu-private.h | 92 + 1 file changed, 92 insertions(+) diff --git a/drivers/iommu/intel-iommu-private.h b/drivers/iommu/intel-iommu-private.h index 73dabec..b436cd8 1006

[PATCH 1/8] Fix a few existing lines that checkpatch.pl will complain about later.

2014-04-15 Thread Bill Sumner
Things like: 1. no space before tabs 2. no initialization of static variables to 0 or NULL 3. no extra parentheses around the value on the 'return' statement 4. no line over 80-characters Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 14 +++--- 1 file changed, 7 insertions

[PATCH 7/8] Add domain-id functions to intel-iommu-kdump.c

2014-04-15 Thread Bill Sumner
intel_iommu_did_to_domain_values_entry() intel_iommu_get_dids_from_old_kernel() Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu-kdump.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/drivers/iommu/intel-iommu-kdump.c b/drivers/iommu/inte

[PATCH 8/8] Add remaining changes to intel-iommu.c to fix crashdump

2014-04-15 Thread Bill Sumner
Add "#include " Chg device_to_domain_id Chg get_domain_for_dev Chg init_dmars Chg intel_iommu_init Signed-off-by: Bill Sumner --- drivers/iommu/intel-iommu.c | 210 +--- 1 file changed, 158 insertions(+), 52 deletions(-) diff --git a/drivers/iommu/i

[PATCH 6/8] Create intel-iommu-kdump.c

2014-04-15 Thread Bill Sumner
Populate with "Copy iommu translation tables" function set. Edit Makefile to add intel-iommu-kdump.o Signed-off-by: Bill Sumner --- drivers/iommu/Makefile| 2 +- drivers/iommu/intel-iommu-kdump.c | 590 ++ 2 files changed, 591 insertions(+), 1 d

[GIT PULL] iommu/arm-smmu: fixes for 3.15

2014-04-15 Thread Will Deacon
Hi Joerg, Please can you pull the following two ARM SMMU fixes for 3.15? They address a problem with unmap return codes and a panic when unmapping a buffer larger than 2MB. Cheers, Will --->8 The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5: Linux 3.15-rc1 (2014-0

Re: [PATCH 0/2] ARM SMMU fixes

2014-04-15 Thread Laurent Pinchart
Hi Will, On Monday 14 April 2014 17:58:58 Will Deacon wrote: > On Tue, Apr 08, 2014 at 02:57:43PM +0100, Marc Zyngier wrote: > > On 08/04/14 14:41, Laurent Pinchart wrote: > > > I've obviously forgotten that Will was away for a month. CC'ing Marc > > > Zyngier. > > > > > > On Thursday 03 April 201

[PATCH v3 2/5] x86: enable DMA CMA with swiotlb

2014-04-15 Thread Akinobu Mita
The DMA Contiguous Memory Allocator support on x86 is disabled when swiotlb config option is enabled. So DMA CMA is always disabled on x86_64 because swiotlb is always enabled. This attempts to support for DMA CMA with enabling swiotlb config option. The contiguous memory allocator on x86 is int

[PATCH v3 5/5] cma: add placement specifier for "cma=" kernel parameter

2014-04-15 Thread Akinobu Mita
Currently, "cma=" kernel parameter is used to specify the size of CMA, but we can't specify where it is located. We want to locate CMA below 4GB for devices only supporting 32-bit addressing on 64-bit systems without iommu. This enables to specify the placement of CMA by extending "cma=" kernel p

[PATCH v3 0/5] enhance DMA CMA on x86

2014-04-15 Thread Akinobu Mita
This patch set enhances the DMA Contiguous Memory Allocator on x86. Currently the DMA CMA is only supported with pci-nommu dma_map_ops and furthermore it can't be enabled on x86_64. But I would like to allocate big contiguous memory with dma_alloc_coherent() and tell it to the device that require

[PATCH v3 4/5] memblock: introduce memblock_alloc_range()

2014-04-15 Thread Akinobu Mita
This introduces memblock_alloc_range() which allocates memblock from the specified range of physical address. I would like to use this function to specify the location of CMA. Cc: Marek Szyprowski Cc: Konrad Rzeszutek Wilk Cc: David Woodhouse Cc: Don Dutile Cc: Thomas Gleixner Cc: Ingo Molna

[PATCH v3 1/5] x86: make dma_alloc_coherent() return zeroed memory if CMA is enabled

2014-04-15 Thread Akinobu Mita
Calling dma_alloc_coherent() with __GFP_ZERO must return zeroed memory. But when the contiguous memory allocator (CMA) is enabled on x86 and the memory region is allocated by dma_alloc_from_contiguous(), it doesn't return zeroed memory. Because dma_generic_alloc_coherent() forgot to fill the memo

[PATCH v3 3/5] intel-iommu: integrate DMA CMA

2014-04-15 Thread Akinobu Mita
This adds support for the DMA Contiguous Memory Allocator for intel-iommu. This change enables dma_alloc_coherent() to allocate big contiguous memory. It is achieved in the same way as nommu_dma_ops currently does, i.e. trying to allocate memory by dma_alloc_from_contiguous() and alloc_pages() is

Re: [PATCH 04/28] Remove EXYNOS_DEV_SYSMMU

2014-04-15 Thread Paul Bolle
On Mon, 2014-02-10 at 10:02 +0530, Sachin Kamat wrote: > +cc linux-samsung-soc list > > On 10 February 2014 01:38, Paul Bolle wrote: > > I noted this one about a year ago (see > > https://lkml.org/lkml/2013/3/5/401 ). By now I wonder whether > > EXYNOS_IOMMU (and everything depending on it) shoul