lkml.org 
[lkml]   [2022]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARM: dts: armada-38x: Mark devices as dma-coherent
On Mon, Oct 24, 2022 at 08:51:02AM +0200, Marek Behún wrote:
> > Sure. In such a case the description of 380 variant (single core)
> > should remain untouched.
> >
> > We need to decide what to do with dual-CPU, i.e. Armada 385/388. How about:
> > - Don't change current behavior, i.e. perform a necessary kernel
> > configuration in "arm,pl310-cache" driver,
> > arch/arm/mach-mvebu/coherency.c + &coherencyfab:node in DT
> > - Satisfy of_dma_is_coherent() by adding `dma-coherent;` in
> > armada-385.dtsi only (IMO this would describe HW properly)
> > ?
>
> It will describe HW properly, but someone running older kernel compiled
> with no SMP support will see a performance drop. I wonder how many
> people do that.

If the kernel is built without SMP support, the page table entries will
not have the shared bit set, and the system will _not_ be DMA-coherent.
Having DT mark devices as "dma-coherent" in this case will lead to data
corruption, because the DMA API will believe them to be DMA-coherent
when the page tables are not setup for that to work.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

\
 
 \ /
  Last update: 2022-10-24 09:52    [W:0.052 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site