]> 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)
commit1a8a58b375691e1492dfaf4879c42058b8675f56
tree2f2b5cbb6afd1653fd4ac1ef330d05f8b84b3a06
parent41a187cd24925e8550afd67e1bda36b35bf2bd6a
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