Re: [PATCH v2 2/3] riscv: use generic MMIO accessors

From: Arnd Bergmann

Date: Sun Sep 20 2026 - 04:12:59 EST


On Sun, Sep 20, 2026, at 03:43, Qingfang Deng wrote:
> RISC-V implements its raw MMIO loads and stores in inline assembly and
> duplicates the generic ordered and relaxed accessors.
>
> Use asm-generic/mmio.h for these accessors and retain the RISC-V barrier
> hooks. This preserves the ordering and MMIOWB tracking while allowing
> the compiler to emit the native-width loads and stores.
>
> Assisted-by: Codex:gpt-6-astra
> Signed-off-by: Qingfang Deng <qingfang.deng@xxxxxxxxx>

Your changelog does not explain why change it. Using inline asm is
definitely the preferred way to defined the __raw_* helpers, so it
would be better not to change that aspect, same as for the arm64
patch.

The other simplifications look good to me, those are the bits we
definitely want to have common between architectures as much as
possible.

Arnd