Re: [PATCH 18/21] ARM: drop SMP support for ARM11MPCore

2023-03-30 Thread Neil Armstrong
Le 30/03/2023 à 12:03, Arnd Bergmann a écrit : On Thu, Mar 30, 2023, at 09:48, Neil Armstrong wrote: On 27/03/2023 14:13, Arnd Bergmann wrote: From: Arnd Bergmann The cache management operations for noncoherent DMA on ARMv6 work in two different ways: * When CONFIG_DMA_CACHE_RWFO is set,

Re: [PATCH 21/21] dma-mapping: replace custom code with generic implementation

2023-03-30 Thread Lad, Prabhakar
On Mon, Mar 27, 2023 at 1:20 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > Now that all of these have consistent behavior, replace them with > a single shared implementation of arch_sync_dma_for_device() and > arch_sync_dma_for_cpu() and three parameters to pick how they should > operate: >

Re: [PATCH 09/21] riscv: dma-mapping: skip invalidation before bidirectional DMA

2023-03-30 Thread Lad, Prabhakar
On Mon, Mar 27, 2023 at 1:16 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > For a DMA_BIDIRECTIONAL transfer, the caches have to be cleaned > first to let the device see data written by the CPU, and invalidated > after the transfer to let the CPU see data written by the device. > > riscv als

Re: [PATCH 08/21] riscv: dma-mapping: only invalidate after DMA, not flush

2023-03-30 Thread Lad, Prabhakar
On Mon, Mar 27, 2023 at 1:16 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > No other architecture intentionally writes back dirty cache lines into > a buffer that a device has just finished writing into. If the cache is > clean, this has no effect at all, but if a cacheline in the buffer has

Re: [PATCH 18/21] ARM: drop SMP support for ARM11MPCore

2023-03-30 Thread Ard Biesheuvel
On Mon, 27 Mar 2023 at 14:18, Arnd Bergmann wrote: > > From: Arnd Bergmann > > The cache management operations for noncoherent DMA on ARMv6 work > in two different ways: > > * When CONFIG_DMA_CACHE_RWFO is set, speculative prefetches on in-flight >DMA buffers lead to data corruption when the

Re: [PATCH 18/21] ARM: drop SMP support for ARM11MPCore

2023-03-30 Thread Arnd Bergmann
On Thu, Mar 30, 2023, at 09:48, Neil Armstrong wrote: > On 27/03/2023 14:13, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> The cache management operations for noncoherent DMA on ARMv6 work >> in two different ways: >> >> * When CONFIG_DMA_CACHE_RWFO is set, speculative prefetches on in-fli

Re: [PATCH 18/21] ARM: drop SMP support for ARM11MPCore

2023-03-30 Thread Linus Walleij
On Mon, Mar 27, 2023 at 2:16 PM Arnd Bergmann wrote: > From: Arnd Bergmann > > The cache management operations for noncoherent DMA on ARMv6 work > in two different ways: > > * When CONFIG_DMA_CACHE_RWFO is set, speculative prefetches on in-flight >DMA buffers lead to data corruption when th

Re: [PATCH 18/21] ARM: drop SMP support for ARM11MPCore

2023-03-30 Thread Neil Armstrong
On 27/03/2023 14:13, Arnd Bergmann wrote: From: Arnd Bergmann The cache management operations for noncoherent DMA on ARMv6 work in two different ways: * When CONFIG_DMA_CACHE_RWFO is set, speculative prefetches on in-flight DMA buffers lead to data corruption when the prefetched data is

Re: [PATCH 08/21] riscv: dma-mapping: only invalidate after DMA, not flush

2023-03-30 Thread Arnd Bergmann
On Wed, Mar 29, 2023, at 22:48, Conor Dooley wrote: > On Mon, Mar 27, 2023 at 02:13:04PM +0200, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> No other architecture intentionally writes back dirty cache lines into >> a buffer that a device has just finished writing into. If the cache is >> cle