[PATCH v2 2/3] riscv: use generic MMIO accessors
Arnd Bergmann
arnd at arndb.de
Sun Sep 20 01:11:51 PDT 2026
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 at linux.dev>
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
More information about the linux-riscv
mailing list