]> git.baikalelectronics.ru Git - kernel.git/commit
asm-generic: introduce io_stop_wc() and add implementation for ARM64
authorXiongfeng Wang <wangxiongfeng2@huawei.com>
Tue, 21 Dec 2021 03:55:56 +0000 (11:55 +0800)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 22 Dec 2021 10:44:53 +0000 (10:44 +0000)
commitd3033d5f3d463e7becf708fea1cde88c7401c9e6
tree15c4737e7664df0afd23cbca92a32e7ed7c47a0d
parentf16a35dd51334024ac843ac5c33d540ed8cde038
asm-generic: introduce io_stop_wc() and add implementation for ARM64

For memory accesses with write-combining attributes (e.g. those returned
by ioremap_wc()), the CPU may wait for prior accesses to be merged with
subsequent ones. But in some situation, such wait is bad for the
performance.

We introduce io_stop_wc() to prevent the merging of write-combining
memory accesses before this macro with those after it.

We add implementation for ARM64 using DGH instruction and provide NOP
implementation for other architectures.

Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Suggested-by: Will Deacon <will@kernel.org>
Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20211221035556.60346-1-wangxiongfeng2@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Documentation/memory-barriers.txt
arch/arm64/include/asm/barrier.h
include/asm-generic/barrier.h