mbox series

[0/2] arm64: mm: Fix cache maintenance for non-coherent streaming DMA

Message ID 20220610151228.4562-1-will@kernel.org (mailing list archive)
Headers show
Series arm64: mm: Fix cache maintenance for non-coherent streaming DMA | expand

Message

Will Deacon June 10, 2022, 3:12 p.m. UTC
Hi all,

This pair of patches follows-up on the discussion we had on linux-arch
earlier this week and addresses the reported problem for arm64 only.

Other architectures should be able to do something similar if they wish,
but this all came out of discussion and code inspection rather than a
concrete failure.

Cheers,

Will

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Russell King <linux@armlinux.org.uk>

--->8

Will Deacon (2):
  arm64: mm: Don't invalidate FROM_DEVICE buffers at start of DMA
    transfer
  arm64: mm: Remove assembly DMA cache maintenance wrappers

 arch/arm64/include/asm/cacheflush.h |  7 -----
 arch/arm64/mm/cache.S               | 43 -----------------------------
 arch/arm64/mm/dma-mapping.c         | 19 +++++++++----
 3 files changed, 14 insertions(+), 55 deletions(-)

Comments

Ard Biesheuvel June 11, 2022, 8:01 a.m. UTC | #1
On Fri, 10 Jun 2022 at 17:12, Will Deacon <will@kernel.org> wrote:
>
> Hi all,
>
> This pair of patches follows-up on the discussion we had on linux-arch
> earlier this week and addresses the reported problem for arm64 only.
>
> Other architectures should be able to do something similar if they wish,
> but this all came out of discussion and code inspection rather than a
> concrete failure.
>
> Cheers,
>
> Will
>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Robin Murphy <robin.murphy@arm.com>
> Cc: Russell King <linux@armlinux.org.uk>
>
> --->8
>
> Will Deacon (2):
>   arm64: mm: Don't invalidate FROM_DEVICE buffers at start of DMA
>     transfer
>   arm64: mm: Remove assembly DMA cache maintenance wrappers
>

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Catalin Marinas June 17, 2022, 6:25 p.m. UTC | #2
On Fri, 10 Jun 2022 16:12:26 +0100, Will Deacon wrote:
> This pair of patches follows-up on the discussion we had on linux-arch
> earlier this week and addresses the reported problem for arm64 only.
> 
> Other architectures should be able to do something similar if they wish,
> but this all came out of discussion and code inspection rather than a
> concrete failure.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/2] arm64: mm: Don't invalidate FROM_DEVICE buffers at start of DMA transfer
      https://git.kernel.org/arm64/c/c50f11c6196f