Re: [PATCH 02/12] iommu-helper: unexport iommu_area_alloc

2018-04-15 Thread Sam Ravnborg
On Sun, Apr 15, 2018 at 04:59:37PM +0200, Christoph Hellwig wrote: > This function is only used by built-in code. > > Reviewed-by: Christoph Hellwig Signed-off-by: Sam ___ iommu mailing list iommu@lists.linux-foundation.org

[PATCH 09/12] PCI: remove CONFIG_PCI_BUS_ADDR_T_64BIT

2018-04-15 Thread Christoph Hellwig
This symbol is now always identical to CONFIG_ARCH_DMA_ADDR_T_64BIT, so remove it. Signed-off-by: Christoph Hellwig --- drivers/pci/Kconfig | 4 drivers/pci/bus.c | 4 ++-- include/linux/pci.h | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git

[PATCH 10/12] arm: don't build swiotlb by default

2018-04-15 Thread Christoph Hellwig
swiotlb is only used as a library of helper for xen-swiotlb if Xen support is enabled on arm, so don't build it by default. Signed-off-by: Christoph Hellwig --- arch/arm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig

[PATCH 11/12] swiotlb: move the SWIOTLB config symbol to lib/Kconfig

2018-04-15 Thread Christoph Hellwig
This way we have one central definition of it, and user can select it as needed. Note that we also add a second ARCH_HAS_SWIOTLB symbol to indicate the architecture supports swiotlb at all, so that we can still make the usage optional for a few architectures that want this feature to be user

[PATCH 12/12] swiotlb: remove the CONFIG_DMA_DIRECT_OPS ifdefs

2018-04-15 Thread Christoph Hellwig
swiotlb now selects the DMA_DIRECT_OPS config symbol, so this will always be true. Signed-off-by: Christoph Hellwig --- lib/swiotlb.c | 4 1 file changed, 4 deletions(-) diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 47aeb04c1997..07f260319b82 100644 --- a/lib/swiotlb.c +++

[PATCH 01/12] iommu-common: move to arch/sparc

2018-04-15 Thread Christoph Hellwig
This code is only used by sparc, and all new iommu drivers should use the drivers/iommu/ framework. Also remove the unused exports. Signed-off-by: Christoph Hellwig --- {include/linux => arch/sparc/include/asm}/iommu-common.h | 0 arch/sparc/include/asm/iommu_64.h

[PATCH 07/12] arch: remove the ARCH_PHYS_ADDR_T_64BIT config symbol

2018-04-15 Thread Christoph Hellwig
Instead select the PHYS_ADDR_T_64BIT for 32-bit architectures that need a 64-bit phys_addr_t type directly. Signed-off-by: Christoph Hellwig --- arch/arc/Kconfig | 4 +--- arch/arm/kernel/setup.c| 2 +- arch/arm/mm/Kconfig

[PATCH 08/12] arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig

2018-04-15 Thread Christoph Hellwig
Define this symbol if the architecture either uses 64-bit pointers or the PHYS_ADDR_T_64BIT is set. This covers 95% of the old arch magic. We only need an additional select for Xen on ARM (why anyway?), and we now always set ARCH_DMA_ADDR_T_64BIT on mips boards with 64-bit physical addressing

[PATCH 06/12] dma-mapping: move the NEED_DMA_MAP_STATE config symbol to lib/Kconfig

2018-04-15 Thread Christoph Hellwig
This way we have one central definition of it, and user can select it as needed. Note that we now also always select it when CONFIG_DMA_API_DEBUG is select, which fixes some incorrect checks in a few network drivers. Signed-off-by: Christoph Hellwig --- arch/alpha/Kconfig

[PATCH 05/12] scatterlist: move the NEED_SG_DMA_LENGTH config symbol to lib/Kconfig

2018-04-15 Thread Christoph Hellwig
This way we have one central definition of it, and user can select it as needed. Signed-off-by: Christoph Hellwig --- arch/alpha/Kconfig | 4 +--- arch/arm/Kconfig| 3 --- arch/arm64/Kconfig | 4 +--- arch/hexagon/Kconfig| 4

[PATCH 04/12] iommu-helper: move the IOMMU_HELPER config symbol to lib/

2018-04-15 Thread Christoph Hellwig
This way we have one central definition of it, and user can select it as needed. Signed-off-by: Christoph Hellwig --- arch/powerpc/Kconfig | 4 +--- arch/s390/Kconfig| 5 ++--- arch/sparc/Kconfig | 5 + arch/x86/Kconfig | 6 ++ lib/Kconfig | 3 +++ 5

[PATCH 03/12] iommu-helper: mark iommu_is_span_boundary as inline

2018-04-15 Thread Christoph Hellwig
This avoids selecting IOMMU_HELPER just for this function. And we only use it once or twice in normal builds so this often even is a size reduction. Signed-off-by: Christoph Hellwig --- arch/alpha/Kconfig | 3 --- arch/arm/Kconfig| 3 ---

[PATCH 02/12] iommu-helper: unexport iommu_area_alloc

2018-04-15 Thread Christoph Hellwig
This function is only used by built-in code. Reviewed-by: Christoph Hellwig --- lib/iommu-helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c index 23633c0fda4a..ded1703e7e64 100644 --- a/lib/iommu-helper.c +++ b/lib/iommu-helper.c

centralize SWIOTLB config symbol and misc other cleanups

2018-04-15 Thread Christoph Hellwig
Hi all, this seris aims for a single defintion of the Kconfig symbol. To get there various cleanups, mostly about config symbols are included as well. ___ iommu mailing list iommu@lists.linux-foundation.org

[PATCH 1/2] dma-direct: Don't repeat allocation for no-op GFP_DMA

2018-04-15 Thread Takashi Iwai
When an allocation with lower dma_coherent mask fails, dma_direct_alloc() retries the allocation with GFP_DMA. But, it's useless for architectures that has no ZONE_DMA, obviously. Fix it by adding the check of CONFIG_ZONE_DMA before retrying the allocation. Fixes: 95f183916d4b ("dma-direct:

[PATCH 0/2] swiotlb: Some regression fixes

2018-04-15 Thread Takashi Iwai
Hi, this is a couple of small regression fixes I stumbled on recently. The first one is a trivial one, and it was already posted in another thread ("swiotlb: Fix unexpected swiotlb_alloc_coherent() failures"). thanks, Takashi === Takashi Iwai (2): dma-direct: Don't repeat allocation for

[PATCH 2/2] swiotlb: Fix dma_supported() to consider direct allocation

2018-04-15 Thread Takashi Iwai
Along with the recent change to use the common swiotlb dma_ops, x86 also takes over the swiotlb_dma_supported(). This caused a regression when a low bit DMA mask is set; e.g. parport_pc driver now fails to set the 24bit DMA mask: parport_pc parport_pc.956: Unable to set coherent dma mask:

Re: [PATCH] swiotlb: Fix unexpected swiotlb_alloc_coherent() failures

2018-04-15 Thread Takashi Iwai
On Thu, 12 Apr 2018 12:32:54 +0200, Robin Murphy wrote: > > On 12/04/18 09:27, Takashi Iwai wrote: > > On Thu, 12 Apr 2018 10:19:05 +0200, > > Takashi Iwai wrote: > >> > >> On Thu, 12 Apr 2018 10:03:56 +0200, > >> Takashi Iwai wrote: > >>> > >>> On Thu, 12 Apr 2018 08:02:27 +0200, > >>> Christoph