[PATCH 5/7] x86: Remove the unused non-atomic local_t functions
From: Jerome Marchand
Date: Mon Oct 26 2026 - 07:20:30 EST
While working on a fix for a tracing soft lockup, it came to my
attention that __local_dec() was broken on ppc64 and other arches (it
actually increment the value). My first instinct was to fix it but the
fact that this function was utterly broken for so long, decades for
some arches makes me thing that those functions have not been used for
a long time, if ever.
Anyway, they're not used now, so remove them.
Signed-off-by: Jerome Marchand <jmarchan@xxxxxxxxxx>
---
arch/x86/include/asm/local.h | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h
index 68af7b74450af..6d0bca91915cd 100644
--- a/arch/x86/include/asm/local.h
+++ b/arch/x86/include/asm/local.h
@@ -170,13 +170,4 @@ local_add_unless(local_t *l, long a, long u)
#define local_inc_not_zero(l) local_add_unless((l), 1, 0)
-/* On x86_32, these are no better than the atomic variants.
- * On x86-64 these are better than the atomic variants on SMP kernels
- * because they dont use a lock prefix.
- */
-#define __local_inc(l) local_inc(l)
-#define __local_dec(l) local_dec(l)
-#define __local_add(i, l) local_add((i), (l))
-#define __local_sub(i, l) local_sub((i), (l))
-
#endif /* _ASM_X86_LOCAL_H */
--
2.56.0