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)
commit81b23ba645e6b2b446093b2d927c261a17f7dee3
tree2f2b5cbb6afd1653fd4ac1ef330d05f8b84b3a06
parent609488bc979f99f805f34e9a32c1e3b71179d10b
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