On Tue, Dec 16, 2025, at 07:31, Finn Thain wrote: > Some recent commits incorrectly assumed 4-byte alignment of locks. > That assumption fails on Linux/m68k (and, interestingly, would have > failed on Linux/cris also). The jump label implementation makes a > similar alignment assumption. > > The expectation that atomic_t and atomic64_t variables will be naturally > aligned seems reasonable, as indeed they are on 64-bit architectures. > But atomic64_t isn't naturally aligned on csky, m68k, microblaze, nios2, > openrisc and sh. Neither atomic_t nor atomic64_t are naturally aligned > on m68k. > > This patch brings a little uniformity by specifying natural alignment > for atomic types. One benefit is that atomic64_t variables do not get > split across a page boundary. The cost is that some structs grow which > leads to cache misses and wasted memory.
Reviewed-by: Arnd Bergmann <[email protected]>
