atomic-specify-alignment-for-atomic_t-and-atomic64_t.patch removed from -mm tree
The quilt patch titled
Subject: atomic: specify alignment for atomic_t and atomic64_t
has been removed from the -mm tree. Its filename was
atomic-specify-alignment-for-atomic_t-and-atomic64_t.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Finn Thain <[email protected]>
Subject: atomic: specify alignment for atomic_t and atomic64_t
Date: Tue, 13 Jan 2026 16:22:28 +1100
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.
See also, commit bbf2a330d92c ("x86: atomic64: The atomic64_t data type should be 8 bytes aligned on 32-bit too").
---
include/asm-generic/atomic64.h | 2 +- include/linux/types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/asm-generic/atomic64.h renamed from include/asm-generic/atomic64.h~atomic-specify-alignment-for-atomic_t-and-atomic64_t +1 -1
@@ -10,7 +10,7 @@#include <linux/types.h> typedef struct { -s64 counter; +s64 __aligned(sizeof(s64)) counter; }atomic64_t ;#define ATOMIC64_INIT (i) { (i) }
include/linux/types.h renamed from include/linux/types.h~atomic-specify-alignment-for-atomic_t-and-atomic64_t +1 -1
@@ -179,7 +179,7 @@ typedef phys_addr_t resource_size_t;typedef unsigned long irq_hw_number_t ;typedef struct { -int counter; +int __aligned(sizeof(int)) counter; }atomic_t ;#define ATOMIC_INIT (i) { (i) }
_
Patches currently in -mm which might be from [email protected] are