Re: [RFC v4 3/5] atomic: Specify alignment for atomic_t and atomic64_t

From: Daniel Palmer

Date: Sun Nov 23 2025 - 19:23:46 EST


Hi Finn,

On Tue, 21 Oct 2025 at 07:39, Finn Thain <fthain@xxxxxxxxxxxxxx> 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). Specify the minimum alignment of atomic
> variables for fewer surprises and (hopefully) better performance.

FWIW I implemented jump labels for m68k and I think there is a problem
with this in there too.
jump_label_init() calls static_key_set_entries() and setting
key->entries in there is corrupting 'atomic_t enabled' at the start of
key.

With this patch the problem goes away.

Cheers,

Daniel