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

From: Arnd Bergmann

Date: Sun Sep 20 2026 - 05:43:07 EST


On Sun, Sep 20, 2026, at 11:30, Arnd Bergmann wrote:
> 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.

Also, I have only seen this problem in combination with driver bugs
that define their MMIO registers as a __packed data structure
instead of the usual 'void __iomem*' with constant offset or a
normal structure without packing.

Arnd