Re: [PATCH 1/2] ipr: Convert to generic DMA API

2014-10-21 Thread Christoph Hellwig
Wendy, Brian, can you give me an ACK for this series? ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 1/2] ipr: Convert to generic DMA API

2014-10-30 Thread Christoph Hellwig
On Wed, Oct 29, 2014 at 12:34:49PM -0500, Brian King wrote: > Acked-by: Brian King Doesn't apply to me. Brain, can you please resend a rebased version of these two patches with ipr error handlign patch (and anything else ipr related)? ___ Linuxppc-dev

Re: [PATCH 1/3] ipr: Convert to generic DMA API

2014-11-03 Thread Christoph Hellwig
Thanks, I've applied patch 3 to drivers-for-3.18, and patches 1 and 2 to core-for-3.19. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 01/31] scatterlist: add sg_pfn and sg_has_page helpers

2015-08-12 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/linux/scatterlist.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 9b1ef0c..b1056bf 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h @@ -230,6

[PATCH 02/31] scatterlist: use sg_phys()

2015-08-12 Thread Christoph Hellwig
From: Dan Williams Coccinelle cleanup to replace open coded sg to physical address translations. This is in preparation for introducing scatterlists that reference __pfn_t. // sg_phys.cocci: convert usage page_to_phys(sg_page(sg)) to sg_phys(sg) // usage: make coccicheck COCCI=sg_phys.cocci MOD

[PATCH 04/31] x86/pci-nommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Just remove a BUG_ON, the code handles them just fine as-is. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/pci-nommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index da15918..a218059 100644 --- a/arch/x86/kernel/pci

[PATCH 03/31] dma-debug: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_pfn to get a the PFN and skip checks that require a kernel virtual address. Signed-off-by: Christoph Hellwig --- lib/dma-debug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/dma-debug.c b/lib/dma-debug.c index dace71f..a215a80 100644 --- a/lib/dma

RFC: prepare for struct scatterlist entries without page backing

2015-08-12 Thread Christoph Hellwig
Dan Williams started to look into addressing I/O to and from Persistent Memory in his series from June: http://thread.gmane.org/gmane.linux.kernel.cross-arch/27944 I've started looking into DMA mapping of these SGLs specifically instead of the map_pfn method in there. In addition to supp

[PATCH 05/31] x86/pci-calgary: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
For the iommu offset we just need and offset into the page. Calculate that using the physical address instead of using the virtual address so that we don't require a virtual mapping. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/pci-calgary_64.c | 10 -- 1 file chang

[PATCH 06/31] alpha/pci-noop: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of virt_to_phys(sg_virt(sg)) so that we don't require a kernel virtual address. Signed-off-by: Christoph Hellwig --- arch/alpha/kernel/pci-noop.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/alpha/kernel/pci-noop.c b/arch/alpha/kerne

[PATCH 07/31] alpha/pci_iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of virt_to_phys(sg_virt(sg)) so that we don't require a kernel virtual address, and switch a few debug printfs to print physical instead of virtual addresses. Signed-off-by: Christoph Hellwig --- arch/alpha/kernel/pci_iommu.c | 36 +++---

[PATCH 08/31] c6x: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of virt_to_phys(sg_virt(sg)) so that we don't require a kernel virtual address. Signed-off-by: Christoph Hellwig --- arch/c6x/kernel/dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/c6x/kernel/dma.c b/arch/c6x/kernel/dma.c index ab

[PATCH 09/31] ia64/pci_dma: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of virt_to_phys(sg_virt(sg)) so that we don't require a kernel virtual address. Signed-off-by: Christoph Hellwig --- arch/ia64/sn/pci/pci_dma.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_

[PATCH 10/31] powerpc/iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
For the iommu offset we just need and offset into the page. Calculate that using the physical address instead of using the virtual address so that we don't require a virtual mapping. Signed-off-by: Christoph Hellwig --- arch/powerpc/kernel/iommu.c | 14 +++--- 1 file chang

[PATCH 11/31] sparc/iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of __pa(sg_virt(sg)) so that we don't require a kernel virtual address. Signed-off-by: Christoph Hellwig --- arch/sparc/kernel/iommu.c| 2 +- arch/sparc/kernel/iommu_common.h | 4 +--- arch/sparc/kernel/pci_sun4v.c| 2 +- 3 files changed, 3 insertions(

[PATCH 12/31] mn10300: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Just remove a BUG_ON, the code handles them just fine as-is. Signed-off-by: Christoph Hellwig --- arch/mn10300/include/asm/dma-mapping.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/mn10300/include/asm/dma-mapping.h b/arch/mn10300/include/asm/dma-mapping.h index

[PATCH 13/31] sparc/ldc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys(sg) & PAGE_MASK instead of page_to_pfn(sg_page(sg)) << PAGE_SHIFT to get at the page-aligned physical address ofa SG entry, so that we don't require a page backing for SG entries. Signed-off-by: Christoph Hellwig --- arch/sparc/kernel/ldc.c | 4 ++-- 1

[PATCH 14/31] sparc32/io-unit: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
For the iommu offset we just need and offset into the page. Calculate that using the physical address instead of using the virtual address so that we don't require a virtual mapping. Signed-off-by: Christoph Hellwig --- arch/sparc/mm/io-unit.c | 23 --- 1 file change

[PATCH 15/31] sparc32/iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
ff-by: Christoph Hellwig --- arch/sparc/mm/iommu.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 491511d..3ed53d7 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c @@ -174,7 +174,7 @@ static

[PATCH 16/31] s390: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Use sg_phys() instead of page_to_phys(sg_page(sg)) so that we don't require a page structure for all DMA memory. Signed-off-by: Christoph Hellwig --- arch/s390/pci/pci_dma.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/arch/s390/pci/pci_dma.c b

[PATCH 17/31] ia64/sba_iommu: remove sba_sg_address

2015-08-12 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/ia64/hp/common/sba_iommu.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 344387a..9e5aa8e 100644 --- a/arch/ia64/hp/common/sba_iommu.c

[PATCH 18/31] nios2: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. Signed-off-by: Christoph Hellwig --- arch/nios2/mm/dma-mapping.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/arch/nios2/mm/dma

[PATCH 19/31] arc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. Signed-off-by: Christoph Hellwig --- arch/arc/include/asm/dma-mapping.h | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/arc/include

[PATCH 20/31] avr32: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly, bypassing the noop page_to_bus. Signed-off-by: Christoph Hellwig --- arch/avr32/include/asm/dma-mapping.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 21/31] blackfin: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Switch from sg_virt to sg_phys as blackfin like all nommu architectures has a 1:1 virtual to physical mapping. Signed-off-by: Christoph Hellwig --- arch/blackfin/kernel/dma-mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/blackfin/kernel/dma-mapping.c b

[PATCH 22/31] metag: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page(). Signed-off-by: Christoph Hellwig --- arch/metag/include/asm/dma-mapping.h | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/arch/metag/include/asm/dma-mapping.h b/arch/metag/include/asm/dma

[PATCH 23/31] sh: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page(). Signed-off-by: Christoph Hellwig --- arch/sh/kernel/dma-nommu.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/sh/kernel/dma-nommu.c b/arch/sh/kernel/dma-nommu.c index 5b0bfcd..3b64dc7 100644 --- a

[PATCH 24/31] xtensa: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page(). Signed-off-by: Christoph Hellwig --- arch/xtensa/include/asm/dma-mapping.h | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma

[PATCH 25/31] frv: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Only call kmap_atomic_primary when the SG entry is mapped into kernel virtual space. XXX: the code already looks odd due to the lack of pairing between kmap_atomic_primary and kunmap_atomic_primary. Does it work either before or after this patch? Signed-off-by: Christoph Hellwig --- arch/frv

[PATCH 26/31] openrisc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. Signed-off-by: Christoph Hellwig --- arch/openrisc/kernel/dma.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/kernel/dma.c b/arch/openrisc

[PATCH 27/31] mips: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. To do this consolidate the two platform callouts using pages and virtual addresses into a single one using a physical address. Signed-off-by: Christoph Hellwig --- arch/mips/bmips

[PATCH 28/31] powerpc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page(). Signed-off-by: Christoph Hellwig --- arch/powerpc/kernel/dma.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 35e4dcc..cece40b 100644 --- a/arch

[PATCH 29/31] parisc: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Make all cache invalidation conditional on sg_has_page() and use sg_phys to get the physical address directly. Signed-off-by: Christoph Hellwig --- arch/parisc/kernel/pci-dma.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/arch/parisc/kernel

[PATCH 30/31] intel-iommu: handle page-less SG entries

2015-08-12 Thread Christoph Hellwig
Just remove a BUG_ON, the code handles them just fine as-is. Signed-off-by: Christoph Hellwig --- drivers/iommu/intel-iommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3541d65..ae10573 100644 --- a/drivers/iommu/intel

[PATCH 31/31] dma-mapping-common: skip kmemleak checks for page-less SG entries

2015-08-12 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/asm-generic/dma-mapping-common.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index 940d5ec..afc3eaf 100644 --- a/include/asm-generic/dma

Re: RFC: prepare for struct scatterlist entries without page backing

2015-08-13 Thread Christoph Hellwig
On Wed, Aug 12, 2015 at 03:42:47PM +0300, Boaz Harrosh wrote: > The support I have suggested and submitted for zone-less sections. > (In my add_persistent_memory() patchset) > > Would work perfectly well and transparent for all such multimedia cases. > (All hacks removed). In fact I have loaded pme

Re: [PATCH 29/31] parisc: handle page-less SG entries

2015-08-13 Thread Christoph Hellwig
On Wed, Aug 12, 2015 at 09:01:02AM -0700, Linus Torvalds wrote: > I'm assuming that anybody who wants to use the page-less > scatter-gather lists always does so on memory that isn't actually > virtually mapped at all, or only does so on sane architectures that > are cache coherent at a physical lev

Re: [PATCH 31/31] dma-mapping-common: skip kmemleak checks for page-less SG entries

2015-08-13 Thread Christoph Hellwig
On Wed, Aug 12, 2015 at 09:05:15AM -0700, Linus Torvalds wrote: > [ Again, I'm responding to one random patch - this pattern was in > other patches too. ] > > A question: do we actually expect to mix page-less and pageful SG > entries in the same SG list? > > How does that happen? Both for DAX

Re: RFC: prepare for struct scatterlist entries without page backing

2015-08-13 Thread Christoph Hellwig
On Thu, Aug 13, 2015 at 09:37:37AM +1000, Julian Calaby wrote: > I.e. ~90% of this patch set seems to be just mechanically dropping > BUG_ON()s and converting open coded stuff to use accessor functions > (which should be macros or get inlined, right?) - and the remaining > bit is not flushing if we

[PATCH 4/5] dma-mapping: consolidate dma_supported

2015-08-13 Thread Christoph Hellwig
ave been a problem if it's dma_set_mask implementation wasn't a similarly buggy noop. As a few architectures have much more elaborate implementations, we still allow for arch overrides. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 5 - arch/arm/in

provide more common DMA API functions

2015-08-13 Thread Christoph Hellwig
Since 2009 we have a nice asm-generic header implementing lots of DMA API functions for architectures using struct dma_map_ops, but unfortunately it's still missing a lot of APIs that all architectures still have to duplicate. This series consolidates the remaining functions, although we still nee

[PATCH 1/5] dma-mapping: consolidate dma_{alloc, free}_{attrs, coherent}

2015-08-13 Thread Christoph Hellwig
rovided for that. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 18 -- arch/arm/include/asm/dma-mapping.h| 29 arch/arm/mm/dma-mapping.c | 11 -- arch/arm64/include/asm/dma-mapping.h | 33 --

[PATCH 2/5] dma-mapping: consolidate dma_{alloc,free}_noncoherent

2015-08-13 Thread Christoph Hellwig
ned-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 3 --- arch/arm/include/asm/dma-mapping.h| 15 --- arch/arm64/include/asm/dma-mapping.h | 14 -- arch/h8300/include/asm/dma-mapping.h | 3 --- arch/hexagon/include/asm/dma-mapping

[PATCH 3/5] dma-mapping: cosolidate dma_mapping_error

2015-08-13 Thread Christoph Hellwig
erwise returns 0. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 5 - arch/arm/include/asm/dma-mapping.h| 9 - arch/arm64/include/asm/dma-mapping.h | 7 --- arch/h8300/include/asm/dma-mapping.h | 5 - arch/hexagon/include/a

[PATCH 5/5] dma-mapping: consolidate dma_set_mask

2015-08-13 Thread Christoph Hellwig
tectures overload unrelated semantics like changing the dma_ops into it so we still need to allow for an architecture override for now. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 5 - arch/alpha/kernel/pci-noop.c | 10 -- arch/alph

Re: [PATCH 2/5] dma-mapping: consolidate dma_{alloc,free}_noncoherent

2015-08-13 Thread Christoph Hellwig
On Thu, Aug 13, 2015 at 04:20:40PM +0100, Russell King - ARM Linux wrote: > > -/* > > - * Dummy noncoherent implementation. We don't provide a dma_cache_sync > > - * function so drivers using this API are highlighted with build warnings. > > - */ > > I'd like a similar comment to remain after thi

Re: [PATCH 5/5] dma-mapping: consolidate dma_set_mask

2015-08-13 Thread Christoph Hellwig
On Thu, Aug 13, 2015 at 04:25:05PM +0100, Russell King - ARM Linux wrote: > On Thu, Aug 13, 2015 at 05:04:08PM +0200, Christoph Hellwig wrote: > > diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c > > index 1143c4d..260f52a 100644 > > --- a/arch/a

Re: [PATCH v2 7/7] pmem, dax: have direct_access use __pmem annotation

2015-08-15 Thread Christoph Hellwig
On Fri, Aug 14, 2015 at 09:58:16AM -0700, Dan Williams wrote: > > I'll merge with your code for v3. > > Sounds, let me go rebase the __pfn_t patches on -mm so we'all lined up > and collision free. I'm doubt that we'll have PFN mapping ready for 4.3. I'd rather see Ross series goes first, and mov

Re: [PATCH v2 7/7] pmem, dax: have direct_access use __pmem annotation

2015-08-15 Thread Christoph Hellwig
On Thu, Aug 13, 2015 at 10:51:11AM -0600, Ross Zwisler wrote: > Update the annotation for the kaddr pointer returned by direct_access() > so that it is a __pmem pointer. This is consistent with the PMEM driver > and with how this direct_access() pointer is used in the DAX code. IFF we stick to th

Re: [PATCH v2 7/7] pmem, dax: have direct_access use __pmem annotation

2015-08-15 Thread Christoph Hellwig
On Sat, Aug 15, 2015 at 08:44:27AM -0700, Dan Williams wrote: > That said, while we don't need special accessors we do need guarantees > that anything that has written to a persistent memory address has done > so in a way that wmb_pmem() is able to flush it. It's more of a "I've > audited this cod

provide more common DMA API functions V2

2015-08-17 Thread Christoph Hellwig
Since 2009 we have a nice asm-generic header implementing lots of DMA API functions for architectures using struct dma_map_ops, but unfortunately it's still missing a lot of APIs that all architectures still have to duplicate. This series consolidates the remaining functions, although we still nee

[PATCH 3/5] dma-mapping: cosolidate dma_mapping_error

2015-08-17 Thread Christoph Hellwig
erwise returns 0. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 5 - arch/arm/include/asm/dma-mapping.h| 9 - arch/arm64/include/asm/dma-mapping.h | 7 --- arch/h8300/include/asm/dma-mapping.h | 5 - arch/hexagon/include/a

[PATCH 4/5] dma-mapping: consolidate dma_supported

2015-08-17 Thread Christoph Hellwig
ave been a problem if it's dma_set_mask implementation wasn't a similarly buggy noop. As a few architectures have much more elaborate implementations, we still allow for arch overrides. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 5 - arch/arm/in

[PATCH 5/5] dma-mapping: consolidate dma_set_mask

2015-08-17 Thread Christoph Hellwig
d to allow for an architecture override for now. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 5 - arch/alpha/kernel/pci-noop.c | 10 -- arch/alpha/kernel/pci_iommu.c | 11 --- arch/arm/include/asm/dma-mapping

[PATCH 2/5] dma-mapping: consolidate dma_{alloc,free}_noncoherent

2015-08-17 Thread Christoph Hellwig
ned-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 3 --- arch/arm/include/asm/dma-mapping.h| 21 ++--- arch/arm64/include/asm/dma-mapping.h | 14 -- arch/h8300/include/asm/dma-mapping.h | 3 --- arch/hexagon/include/asm/dma

[PATCH 1/5] dma-mapping: consolidate dma_{alloc, free}_{attrs, coherent}

2015-08-17 Thread Christoph Hellwig
rovided for that. Signed-off-by: Christoph Hellwig --- arch/alpha/include/asm/dma-mapping.h | 18 -- arch/arm/include/asm/dma-mapping.h| 29 arch/arm/mm/dma-mapping.c | 11 -- arch/arm64/include/asm/dma-mapping.h | 33 --

Re: [PATCH v3 7/7] pmem, dax: have direct_access use __pmem annotation

2015-08-17 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: provide more common DMA API functions V2

2015-08-17 Thread Christoph Hellwig
On Mon, Aug 17, 2015 at 02:24:29PM -0700, Andrew Morton wrote: > 110254 bytes saved, shrinking the kernel by a whopping 0.17%. > Thoughts? Sounds fine to me. > > I'll merge these 5 patches for 4.3. That means I'll release them into > linux-next after 4.2 is released. So you only add for-4.3 c

Re: provide more common DMA API functions V2

2015-08-17 Thread Christoph Hellwig
On Mon, Aug 17, 2015 at 10:45:52PM -0700, Andrew Morton wrote: > > > > > > I'll merge these 5 patches for 4.3. That means I'll release them into > > > linux-next after 4.2 is released. > > > > So you only add for-4.3 code to -next after 4.2 is odd? Isn't thast the > > wrong way around? > > Lin

Re: provide more common DMA API functions V2

2015-08-19 Thread Christoph Hellwig
On Tue, Aug 18, 2015 at 09:51:07AM +0200, Ingo Molnar wrote: > I.e. shouldn't this be: > > > I'll merge these 5 patches for 4.4. That means I'll release them into > > linux-next after 4.2 is released. > > > > [...] > > > > Linus will be releasing 4.2 in 1-2 weeks and until then, linux-next is

Re: [PATCH] powerpc/spufs: Initialise inode->i_ino in spufs_new_inode()

2013-04-23 Thread Christoph Hellwig
Looks good. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RESEND][PATCH 1/2] lib/scatterlist: Make ARCH_HAS_SG_CHAIN an actual Kconfig

2014-03-23 Thread Christoph Hellwig
On Sun, Mar 23, 2014 at 02:04:46PM +1100, Benjamin Herrenschmidt wrote: > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > > index 1594945..8122294 100644 > > --- a/arch/arm/Kconfig > > +++ b/arch/arm/Kconfig > > @@ -82,6 +82,7 @@ config ARM > > . > > >

Re: [PATCH 2/2] MAINTAINERS: ibmvfc driver maintainer change

2015-01-18 Thread Christoph Hellwig
Brian, can you ACK this one? ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc/configs: Re-enable CONFIG_SCSI_DH

2015-09-30 Thread Christoph Hellwig
Signed-off-by: Michael Ellerman Looks good, Reviewed-by: Christoph Hellwig ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 2/2] drivers/nvme: default to the IOMMU page size on Power

2015-10-02 Thread Christoph Hellwig
Hi Nishanth, please expose this value through the generic DMA API instead of adding architecture specific hacks to drivers. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 2/2] drivers/nvme: default to the IOMMU page size on Power

2015-10-02 Thread Christoph Hellwig
On Fri, Oct 02, 2015 at 10:39:47AM -0700, Nishanth Aravamudan wrote: > Ok, I'm happy to do that instead -- what I struggled with is that I > don't have enough knowledge of the various architectures to provide the > right default implementation. It should be sufficient for the default to > return PA

Re: [PATCH 0/5 v2] Fix NVMe driver support on Power with 32-bit DMA

2015-10-03 Thread Christoph Hellwig
On Sat, Oct 03, 2015 at 06:51:06AM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2015-10-02 at 13:09 -0700, Nishanth Aravamudan wrote: > > > 1) add a generic dma_get_page_shift implementation that just returns > > PAGE_SHIFT > > So you chose to return the granularity of the iommu to the driver >

Re: [PATCH 1/5 v2] dma-mapping: add generic dma_get_page_shift API

2015-10-06 Thread Christoph Hellwig
Do we need a function here or can we just have a IOMMU_PAGE_SHIFT define with an #ifndef in common code? Also not all architectures use dma-mapping-common.h yet, so you either need to update all of those as well, or just add the #ifndef directly to linux/dma-mapping.h.

Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift

2015-10-08 Thread Christoph Hellwig
Hi Fengguang, I think this proactive testing does a little more harm than good in it's current form. While offering testing for patches that aren't in git trees and or by people that don't even have a git tree that the build bots known about does seem useful, blindly doing it for every patch agai

Re: [PATCH 1/5 v2] dma-mapping: add generic dma_get_page_shift API

2015-10-14 Thread Christoph Hellwig
Hi Nishanth, sorry for the late reply. > > On Power, since it's technically variable, we'd need a function. So are > > you suggesting define'ing it to a function just on Power and leaving it > > a constant elsewhere? > > > > I noticed that sparc has a IOMMU_PAGE_SHIFT already, fwiw. > > Sorry,

Re: [PATCH 0/5 v3] Fix NVMe driver support on Power with 32-bit DMA

2015-10-29 Thread Christoph Hellwig
On Wed, Oct 28, 2015 at 01:59:23PM +, Busch, Keith wrote: > The "new" interface for all the other architectures is the same as the > old one we've been using for the last 5 years. > > I welcome x86 maintainer feedback to confirm virtual and DMA addresses > have the same offset at 4k alignment,

Re: [PATCH 1/1 v3] drivers/nvme: default to 4k device page size

2015-11-03 Thread Christoph Hellwig
On Fri, Oct 30, 2015 at 02:35:11PM -0700, Nishanth Aravamudan wrote: > diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c > index ccc0c1f93daa..a9a5285bdb39 100644 > --- a/drivers/block/nvme-core.c > +++ b/drivers/block/nvme-core.c > @@ -1717,7 +1717,12 @@ static int nvme_configure_

Re: [PATCH 1/1 v4] drivers/nvme: default to 4k device page size

2015-11-05 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig ... but I doubt we'll ever bother updating it. Most architectures with arger page sizes also have iommus and would need different settings for different iommus vs direct mapping for very little gain. There's a reason why we never bothere

Re: [PATCH 1/1 v4] drivers/nvme: default to 4k device page size

2015-11-12 Thread Christoph Hellwig
Jens, Keith: any chance to get this to Linux for 4.4 (and -stable)? ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 1/1 v4] drivers/nvme: default to 4k device page size

2015-11-18 Thread Christoph Hellwig
On Fri, Nov 13, 2015 at 03:08:11PM +, Keith Busch wrote: > On Thu, Nov 12, 2015 at 11:37:54PM -0800, Christoph Hellwig wrote: > > Jens, Keith: any chance to get this to Linux for 4.4 (and -stable)? > > I agreed, looks good to me. > > Acked-by: Keith Busch Jens, can

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-19 Thread Christoph Hellwig
It's pretty much guaranteed a block layer bug, most likely in the merge bios to request infrastucture where we don't obey the merging limits properly. Does either of you have a known good and first known bad kernel? ___ Linuxppc-dev mailing list Linuxppc

Re: Question about Power8/9, PHB3/4 and setting of DMA mask

2019-04-03 Thread Christoph Hellwig
On Sun, Mar 31, 2019 at 12:50:21PM +0300, Oded Gabbay wrote: > Due to some limitation in Goya, the driver first need to allocate a > 2MB chunk in a DMA-able address under 39 bits and then we would like > to move to using up to 48 bits. Therefore, the driver first tries to > set the DMA mask to 39 b

Re: [patch V2 07/15] powerpc/ps3: Convert half completion to rcuwait

2020-03-19 Thread Christoph Hellwig
On Wed, Mar 18, 2020 at 09:43:09PM +0100, Thomas Gleixner wrote: > The PS3 notification interrupt and kthread use a hacked up completion to > communicate. Since we're wanting to change the completion implementation and > this is abuse anyway, replace it with a simple rcuwait since there is only >

Re: [PATCH -v2] treewide: Rename "unencrypted" to "decrypted"

2020-03-19 Thread Christoph Hellwig
On Thu, Mar 19, 2020 at 11:16:57AM +0100, Borislav Petkov wrote: > Hi, > > here's v2 with build breakage fixed on ppc and s390 (obviously I can't > grep :-\) and commit message extended to explain more why. I thought we agreed that decrypted is absolutely the wrong term. So NAK - if you want to

Re: [patch V2 11/15] completion: Use simple wait queues

2020-03-20 Thread Christoph Hellwig
On Fri, Mar 20, 2020 at 10:25:41AM +1100, Julian Calaby wrote: > > +++ b/drivers/usb/gadget/function/f_fs.c > > @@ -1703,7 +1703,7 @@ static void ffs_data_put(struct ffs_data > > pr_info("%s(): freeing\n", __func__); > > ffs_data_clear(ffs); > > BUG_O

generic DMA bypass flag v2

2020-03-20 Thread Christoph Hellwig
Hi all, I've recently beeing chatting with Lu about using dma-iommu and per-device DMA ops in the intel IOMMU driver, and one missing feature in dma-iommu is a bypass mode where the direct mapping is used even when an iommu is attached to improve performance. The powerpc code already has a simila

[PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-20 Thread Christoph Hellwig
Several IOMMU drivers have a bypass mode where they can use a direct mapping if the devices DMA mask is large enough. Add generic support to the core dma-mapping code to do that to switch those drivers to a common solution. Signed-off-by: Christoph Hellwig --- include/linux/device.h | 6

[PATCH 2/2] powerpc: use the generic dma_ops_bypass mode

2020-03-20 Thread Christoph Hellwig
werpc/pseries/dma: Allow SWIOTLB") Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/device.h | 5 -- arch/powerpc/kernel/dma-iommu.c | 90 --- 2 files changed, 9 insertions(+), 86 deletions(-) diff --git a/arch/powerpc/include/asm/device.h b/ar

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-23 Thread Christoph Hellwig
On Mon, Mar 23, 2020 at 12:28:34PM +1100, Alexey Kardashevskiy wrote: [full quote deleted, please follow proper quoting rules] > > +static bool dma_alloc_direct(struct device *dev, const struct dma_map_ops > > *ops) > > +{ > > + if (!ops) > > + return true; > > + > > + /* > > +

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-23 Thread Christoph Hellwig
On Mon, Mar 23, 2020 at 09:37:05AM +0100, Christoph Hellwig wrote: > > > + /* > > > + * Allows IOMMU drivers to bypass dynamic translations if the DMA mask > > > + * is large enough. > > > + */ > > > + if (dev->dma_ops_bypass) { > > &g

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-23 Thread Christoph Hellwig
On Mon, Mar 23, 2020 at 12:14:08PM +, Robin Murphy wrote: > On 2020-03-20 2:16 pm, Christoph Hellwig wrote: >> Several IOMMU drivers have a bypass mode where they can use a direct >> mapping if the devices DMA mask is large enough. Add generic support >> to the core d

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-23 Thread Christoph Hellwig
On Mon, Mar 23, 2020 at 07:58:01PM +1100, Alexey Kardashevskiy wrote: > >> 0x100.. .. 0x101.. > >> > >> 2x4G, each is 1TB aligned. And we can map directly only the first 4GB > >> (because of the maximum IOMMU table size) but not the other. And 1:1 on > >> that "pseries" is done with

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-23 Thread Christoph Hellwig
On Mon, Mar 23, 2020 at 09:07:38PM +0530, Aneesh Kumar K.V wrote: > > This is what I was trying, but considering I am new to DMA subsystem, I > am not sure I got all the details correct. The idea is to look at the > cpu addr and see if that can be used in direct map fashion(is > bus_dma_limit the

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-24 Thread Christoph Hellwig
On Tue, Mar 24, 2020 at 02:37:59PM +1100, Alexey Kardashevskiy wrote: > dma_alloc_direct() and dma_map_direct() do the same thing now which is > good, did I miss anything else? dma_alloc_direct looks at coherent_dma_mask, dma_map_direct looks at dma_mask.

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-24 Thread Christoph Hellwig
On Tue, Mar 24, 2020 at 02:05:54PM +1100, Alexey Kardashevskiy wrote: > This is for persistent memory which you can DMA to/from but yet it does > not appear in the system as a normal memory and therefore requires > special handling anyway (O_DIRECT or DAX, I do not know the exact > mechanics). All

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-24 Thread Christoph Hellwig
On Tue, Mar 24, 2020 at 12:00:09PM +0530, Aneesh Kumar K.V wrote: > dma_addr_t dma_direct_map_page(struct device *dev, struct page *page, > unsigned long offset, size_t size, enum dma_data_direction dir, > unsigned long attrs) > { > phys_addr_t phys = page_to_phys(

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-25 Thread Christoph Hellwig
On Wed, Mar 25, 2020 at 03:51:36PM +1100, Alexey Kardashevskiy wrote: > >> This is for persistent memory which you can DMA to/from but yet it does > >> not appear in the system as a normal memory and therefore requires > >> special handling anyway (O_DIRECT or DAX, I do not know the exact > >> mech

Re: [PATCH] powerpc/44x: Make AKEBONO depends on NET

2020-03-31 Thread Christoph Hellwig
Why would a board select a network driver? That is what defconfig files are for! I thin kthe select should just go away.

Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-04-06 Thread Christoph Hellwig
On Fri, Apr 03, 2020 at 07:38:11PM +1100, Alexey Kardashevskiy wrote: > > > On 26/03/2020 12:26, Alexey Kardashevskiy wrote: > > > > > > On 25/03/2020 19:37, Christoph Hellwig wrote: > >> On Wed, Mar 25, 2020 at 03:51:36PM +1100, Alexey Kardashevskiy w

remove set_fs calls from the exec and coredump code

2020-04-06 Thread Christoph Hellwig
Hi all, this series gets rid of playing with the address limit in the exec and coredump code. Most of this was fairly trivial, the biggest changes are those to the spufs coredump code.

[PATCH 1/6] powerpc/spufs: simplify spufs core dumping

2020-04-06 Thread Christoph Hellwig
id memory allocations as well. Signed-off-by: Christoph Hellwig --- arch/powerpc/platforms/cell/spufs/coredump.c | 87 ++ arch/powerpc/platforms/cell/spufs/file.c | 273 ++- arch/powerpc/platforms/cell/spufs/spufs.h| 3 +- 3 files changed, 170 insertions(+), 193 deletions

[PATCH 2/6] binfmt_elf: open code copy_siginfo_to_user to kernelspace buffer

2020-04-06 Thread Christoph Hellwig
Instead of messing with the address limit just open code the trivial memcpy + memset logic. Signed-off-by: Christoph Hellwig --- fs/binfmt_elf.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index f4713ea76e82..d744ce9a4b52 100644

[PATCH 3/6] binfmt_elf: remove the set_fs(KERNEL_DS) in elf_core_dump

2020-04-06 Thread Christoph Hellwig
There is no logic in elf_core_dump itself that uses uaccess routines on kernel pointers, the file writes are nicely encapsulated in dump_emit which does its own set_fs. Signed-off-by: Christoph Hellwig --- fs/binfmt_elf.c | 40 +--- 1 file changed, 13

[PATCH 4/6] binfmt_elf_fdpic: remove the set_fs(KERNEL_DS) in elf_fdpic_core_dump

2020-04-06 Thread Christoph Hellwig
There is no logic in elf_fdpic_core_dump itself that uses uaccess routines on kernel pointers, the file writes are nicely encapsulated in dump_emit which does its own set_fs. Signed-off-by: Christoph Hellwig --- fs/binfmt_elf_fdpic.c | 31 --- 1 file changed, 12

[PATCH 5/6] exec: simplify the copy_strings_kernel calling convention

2020-04-06 Thread Christoph Hellwig
copy_strings_kernel is always used with a single argument, adjust the calling convention to that. Signed-off-by: Christoph Hellwig --- fs/binfmt_em86.c| 6 +++--- fs/binfmt_misc.c| 4 ++-- fs/binfmt_script.c | 6 +++--- fs/exec.c | 13 ++--- include

  1   2   3   4   5   6   7   8   9   10   >