]> git.baikalelectronics.ru Git - kernel.git/commit
csky: Fixup mb() synchronization problem
authorGuo Ren <ren_guo@c-sky.com>
Tue, 30 Jul 2019 06:08:07 +0000 (14:08 +0800)
committerGuo Ren <ren_guo@c-sky.com>
Wed, 31 Jul 2019 03:04:29 +0000 (11:04 +0800)
commit0f0e19974006715c30522341f2cd82eafe493d4a
tree2f2b5cbb6afd1653fd4ac1ef330d05f8b84b3a06
parentbfe2de5a355e71917b08e947fe3e805ec2f51c71
csky: Fixup mb() synchronization problem

The mb() is the superset of dma and smp. Using bar.xxx to implement
mb() will cause problem when sync data with dma device, becasue
bar.xxx couldn't guarantee bus transactions finished at outside bus
level.

We must use sync.s instead of bar.xxx for dma data synchronization
and it will guarantee retirement after getting the bus bresponse.

Changes for V2:
 - Use sync.s for all mb, rmb, wmb, dma_wmb, dma_rmb.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Cc: Arnd Bergmann <arnd@arndb.de>
arch/csky/include/asm/barrier.h