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

From: Arnd Bergmann

Date: Sun Sep 20 2026 - 05:34:13 EST


On Sun, Sep 20, 2026, at 11:24, Qingfang Deng wrote:
>
> Regarding unaligned accesses, the splitting can only happen when the
> address is known to be unaligned at compile-time. Do these accessors
> need to support unaligned MMIO? If so, I could add
> OPTIMIZER_HIDE_VAR(addr) to the generic accessors.

I think all architectures that have had this problem just started
using the inline asm variant, and I'd probably try to encourage
that more.

What might be helpful here would be to split out the __raw_* helpers
into a separate header that is explicitly included on architectures
without their own definitions, and an updated comment that explains
that architectures are encouraged to implement these as inline asm
instead of using the volatile load/store.

Arnd