Re: [PATCH] MIPS: lantiq: lock DMA register accesses for SMP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 30, 2016 at 12:18:27PM +0100, Hauke Mehrtens wrote:

> The DMA controller channel and port configuration is changed by
> selecting the port or channel in one register and then update the
> configuration in other registers. This has to be done in an atomic
> operation. Previously only the local interrupts were deactivated which
> works for single CPU systems. If the system supports SMP a better
> locking is needed, use spinlocks instead.
> On more recent SoCs (at least xrx200 and later) there are two memory
> regions to change the configuration, there we could use one area for
> each CPU and do not have to synchronize between the CPUs and more.

You should always use proper locking, not interrupt fiddlery for proper
serialization.  On UP kernels the spinlocks will expand to call just
the local_irq_* so no overhead.

Applied,

  Ralf




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux