Re: [PATCH v3 1/2] asm-generic: Add memory barrier dma_mb()

From: Arnd Bergmann
Date: Mon May 23 2022 - 05:37:30 EST


On Mon, May 23, 2022 at 4:00 AM Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> wrote:
>
> The memory barrier dma_mb() is introduced by commit a76a37777f2c
> ("iommu/arm-smmu-v3: Ensure queue is read after updating prod pointer"),
> which is used to ensure that prior (both reads and writes) accesses
> to memory by a CPU are ordered w.r.t. a subsequent MMIO write, this
> is only defined on arm64, but it is a generic memory barrier, let's
> add dma_mb() into documentation and include/asm-generic/barrier.h.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
> ---

I assume you plan this to get merged through the arm64 tree.

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx> # for asm-generic