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

Arnd Bergmann arnd at arndb.de
Sun Sep 20 02:35:36 PDT 2026


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



More information about the linux-arm-kernel mailing list