On Mon, Nov 05, 2018 at 01:19:31PM +0100, Christoph Hellwig wrote:
> The csky code was largely copied from arm/arm64, so switch to the
> generic arm64-based implementation instead.
>
> Signed-off-by: Christoph Hellwig
> ---
> arch/csky/Kconfig | 2 +-
> arch/csky/mm/dma-mapping.c |
Hi,
On 11/5/18 10:51 PM, Christoph Hellwig wrote:
Please use EXPORT_SYMBOL_GPL like most of the vfio code.
Sure. Will use this in the next version.
Best regards,
Lu Baolu
___
iommu mailing list
iommu@lists.linux-foundation.org
On Fri, Nov 02, 2018 at 07:35:42AM +0100, Christoph Hellwig wrote:
> On Thu, Nov 01, 2018 at 02:07:55PM +, Robin Murphy wrote:
> > On 31/10/2018 20:03, Nicolin Chen wrote:
> >> The addresses within a single page are always contiguous, so it's
> >> not so necessary to allocate one single page
Hi Maciej,
On Thu, Nov 01, 2018 at 07:54:24AM +, Maciej W. Rozycki wrote:
> Fix a MIPS `dma_alloc_coherent' regression from commit bc3ec75de545
> ("dma-mapping: merge direct and noncoherent ops") that causes a cached
> allocation to be returned on noncoherent cache systems.
>
> This is due
On Mon, Nov 05, 2018 at 01:19:30PM +0100, Christoph Hellwig wrote:
> csky does not implement ZONE_DMA, which means passing GFP_DMA is a no-op.
>
> Signed-off-by: Christoph Hellwig
> ---
> arch/csky/mm/dma-mapping.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
On Mon, Nov 05, 2018 at 01:19:29PM +0100, Christoph Hellwig wrote:
> This option is gone past Linux 4.19.
>
> Signed-off-by: Christoph Hellwig
> ---
> arch/csky/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
> index
On Fri, Nov 02, 2018 at 04:36:13PM -0700, Nicolin Chen wrote:
> > What if the pages came from highmem? I know that doesn't happen on arm64
> > today, but the point of this code *is* to be generic, and other users will
> > arrive eventually.
>
> Hmm, so it probably should use sg_miter_start/stop()
Please use EXPORT_SYMBOL_GPL like most of the vfio code.
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
csky does not implement ZONE_DMA, which means passing GFP_DMA is a no-op.
Signed-off-by: Christoph Hellwig
---
arch/csky/mm/dma-mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/csky/mm/dma-mapping.c b/arch/csky/mm/dma-mapping.c
index 85437b21e045..ad4046939713
Do not waste vmalloc space on allocations that do not require a mapping
into the kernel address space.
Signed-off-by: Christoph Hellwig
---
kernel/dma/remap.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/kernel/dma/remap.c b/kernel/dma/remap.c
index
The csky code was largely copied from arm/arm64, so switch to the
generic arm64-based implementation instead.
Signed-off-by: Christoph Hellwig
---
arch/csky/Kconfig | 2 +-
arch/csky/mm/dma-mapping.c | 142 +
2 files changed, 3 insertions(+), 141
By using __dma_direct_alloc_pages we can deal entirely with struct page
instead of having to derive a kernel virtual address.
Signed-off-by: Christoph Hellwig
---
kernel/dma/remap.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/dma/remap.c
This option is gone past Linux 4.19.
Signed-off-by: Christoph Hellwig
---
arch/csky/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index 8a30e006a845..c0cf8e948821 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -8,7 +8,6 @@ config
The arm64 codebase to implement coherent dma allocation for architectures
with non-coherent DMA is a good start for a generic implementation, given
that is uses the generic remap helpers, provides the atomic pool for
allocations that can't sleep and still is realtively simple and well
tested.
The dma remap code only really makes sense for not cache coherent
architectures, and currently is only used by arm, arm64 and xtensa.
Split it out into a separate file with a separate Kconfig symbol,
which gets the right copyright notice given that this code was
written by Laura Abbott working for
dma_alloc_from_contiguous can return highmem pages depending on the
setup, which a plain non-remapping DMA allocator can't handle. Detect
this case and try the normal page allocator instead.
Signed-off-by: Christoph Hellwig
---
kernel/dma/direct.c | 12
1 file changed, 12
Some architectures support remapping highmem into DMA coherent
allocations. To use the common code for them we need variants of
dma_direct_{alloc,free}_pages that do not use kernel virtual addresses.
Signed-off-by: Christoph Hellwig
---
include/linux/dma-direct.h | 3 +++
kernel/dma/direct.c
Hi all,
this series moves the existing arm64 implementation of arch_dma_alloc and
arch_dma_free to common code given that it is not arm64-specific, and
then also uses it for csky. Given how many architectures remap memory
for the DMA coherent implementation it should be usable for many more,
and
18 matches
Mail list logo