atomic-add-option-for-weaker-alignment-check.patch removed from -mm tree
The quilt patch titled
Subject: atomic: add option for weaker alignment check
has been removed from the -mm tree. Its filename was
atomic-add-option-for-weaker-alignment-check.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: add option for weaker alignment check
Date: Tue, 13 Jan 2026 16:22:28 +1100
Add a new Kconfig symbol to make CONFIG_DEBUG_ATOMIC more useful on those architectures which do not align dynamic allocations to 8-byte boundaries. Without this, CONFIG_DEBUG_ATOMIC produces excessive WARN splats.
---
include/linux/instrumented.h | 8 +++++++- lib/Kconfig.debug | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-)
include/linux/instrumented.h renamed from include/linux/instrumented.h~atomic-add-option-for-weaker-alignment-check +7 -1
@@ -59,7 +59,13 @@ static __always_inline void instrument_r static __always_inline void instrument_atomic_check_alignment(const volatile void *v, size_t size) {#ifndef __DISABLE_EXPORTS -WARN_ON_ONCE (IS_ENABLED (CONFIG_DEBUG_ATOMIC ) && ((unsigned long )v & (size -1 ))); +if (IS_ENABLED (CONFIG_DEBUG_ATOMIC )) { +unsigned int mask = size -1 ; + +if (IS_ENABLED (CONFIG_DEBUG_ATOMIC_LARGEST_ALIGN )) + mask &= sizeof(struct { long x; } __aligned_largest) - 1; +WARN_ON_ONCE ((unsigned long )v & mask); + }#endif }
lib/Kconfig.debug renamed from lib/Kconfig.debug~atomic-add-option-for-weaker-alignment-check +8 -0
@@ -1370,6 +1370,14 @@ config DEBUG_ATOMIC This option has potentially significant overhead. +config DEBUG_ATOMIC_LARGEST_ALIGN + bool "Check alignment only up to __aligned_largest" + depends on DEBUG_ATOMIC + help + If you say Y here then the check for natural alignment of + atomic accesses will be constrained to the compiler's largest + alignment for scalar types. + menu "Lock Debugging (spinlocks, mutexes, etc...)" config LOCK_DEBUGGING_SUPPORT
_
Patches currently in -mm which might be from [email protected] are