From: Thomas Huth <thuth@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>
Cc: soc@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Bill Wendling" <morbo@google.com>,
"Justin Stitt" <justinstitt@google.com>,
linux-arch@vger.kernel.org, llvm@lists.linux.dev
Subject: [PATCH v5 11/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
Date: Fri, 23 Oct 2026 08:48:48 +0200 [thread overview]
Message-ID: <20261023064908.66707-12-thuth@redhat.com> (raw)
In-Reply-To: <20261023064908.66707-1-thuth@redhat.com>
While the GCC and Clang compilers already define __ASSEMBLER__ auto-
matically when compiling assembly code, __ASSEMBLY__ is a macro that
only gets defined by the Makefiles in the kernel. This can be very
confusing when switching between userspace and kernelspace coding, or
when dealing with uapi headers that rather should use __ASSEMBLER__
instead. Let's standardize now on the __ASSEMBLER__ macro to avoid
this confusion.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
include/asm-generic/barrier.h | 4 ++--
include/asm-generic/bug.h | 4 ++--
include/asm-generic/current.h | 2 +-
include/asm-generic/error-injection.h | 2 +-
include/asm-generic/int-ll64.h | 6 +++---
include/asm-generic/rwonce.h | 4 ++--
include/asm-generic/signal.h | 4 ++--
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h
index b99cb57dfcccc..c029b1e1854c4 100644
--- a/include/asm-generic/barrier.h
+++ b/include/asm-generic/barrier.h
@@ -11,7 +11,7 @@
#ifndef __ASM_GENERIC_BARRIER_H
#define __ASM_GENERIC_BARRIER_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <linux/compiler.h>
#include <linux/kcsan-checks.h>
@@ -302,5 +302,5 @@ do { \
# define smp_mb__after_switch_mm() smp_mb()
#endif
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __ASM_GENERIC_BARRIER_H */
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 09e8eccee8ed9..044ebc96f373c 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -26,7 +26,7 @@
#endif
#endif /* WARN_CONDITION_STR */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <linux/panic.h>
#include <linux/printk.h>
@@ -258,6 +258,6 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
# define WARN_ON_SMP(x) ({0;})
#endif
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif
diff --git a/include/asm-generic/current.h b/include/asm-generic/current.h
index 9c2aeecbd05a6..8e7d8f019377f 100644
--- a/include/asm-generic/current.h
+++ b/include/asm-generic/current.h
@@ -2,7 +2,7 @@
#ifndef __ASM_GENERIC_CURRENT_H
#define __ASM_GENERIC_CURRENT_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <linux/thread_info.h>
#define get_current() (current_thread_info()->task)
diff --git a/include/asm-generic/error-injection.h b/include/asm-generic/error-injection.h
index b05253f68eaa5..0a9ec33fa8f20 100644
--- a/include/asm-generic/error-injection.h
+++ b/include/asm-generic/error-injection.h
@@ -2,7 +2,7 @@
#ifndef _ASM_GENERIC_ERROR_INJECTION_H
#define _ASM_GENERIC_ERROR_INJECTION_H
-#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
+#if defined(__KERNEL__) && !defined(__ASSEMBLER__)
enum {
EI_ETYPE_NULL, /* Return NULL if failure */
EI_ETYPE_ERRNO, /* Return -ERRNO if failure */
diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h
index a248545f1e18c..58974e8abbfae 100644
--- a/include/asm-generic/int-ll64.h
+++ b/include/asm-generic/int-ll64.h
@@ -11,7 +11,7 @@
#include <uapi/asm-generic/int-ll64.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
typedef __s8 s8;
typedef __u8 u8;
@@ -31,7 +31,7 @@ typedef __u64 u64;
#define S64_C(x) x ## LL
#define U64_C(x) x ## ULL
-#else /* __ASSEMBLY__ */
+#else /* __ASSEMBLER__ */
#define S8_C(x) x
#define U8_C(x) x
@@ -42,6 +42,6 @@ typedef __u64 u64;
#define S64_C(x) x
#define U64_C(x) x
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_GENERIC_INT_LL64_H */
diff --git a/include/asm-generic/rwonce.h b/include/asm-generic/rwonce.h
index 52b969c7cef93..c35b262ee4223 100644
--- a/include/asm-generic/rwonce.h
+++ b/include/asm-generic/rwonce.h
@@ -20,7 +20,7 @@
#ifndef __ASM_GENERIC_RWONCE_H
#define __ASM_GENERIC_RWONCE_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <linux/compiler_types.h>
#include <linux/kasan-checks.h>
@@ -94,5 +94,5 @@ unsigned long read_word_at_a_time(const void *addr)
return *(unsigned long *)addr;
}
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* __ASM_GENERIC_RWONCE_H */
diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h
index 663dd6d0795dc..392e59fd3d8b9 100644
--- a/include/asm-generic/signal.h
+++ b/include/asm-generic/signal.h
@@ -4,10 +4,10 @@
#include <uapi/asm-generic/signal.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <asm/sigcontext.h>
#undef __HAVE_ARCH_SIG_BITOPS
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_GENERIC_SIGNAL_H */
--
2.56.0
next prev parent reply other threads:[~2026-10-23 6:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 6:48 [PATCH v5 00/13] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
2026-10-23 6:48 ` [PATCH v5 01/13] of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header file Thomas Huth
2026-10-23 6:48 ` [PATCH v5 02/13] smccc: Replace __ASSEMBLY__ with __ASSEMBLER__ Thomas Huth
2026-10-23 6:48 ` [PATCH v5 03/13] ARM: PXA: " Thomas Huth
2026-10-23 6:48 ` [PATCH v5 04/13] ARM: BCM7XXX: " Thomas Huth
2026-10-23 6:48 ` [PATCH v5 05/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in ptrace uapi header Thomas Huth
2026-10-23 6:48 ` [PATCH v5 06/13] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 07/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 08/13] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 09/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 10/13] uapi: " Thomas Huth
2026-10-23 6:48 ` Thomas Huth [this message]
2026-10-23 6:48 ` [PATCH v5 12/13] include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2026-10-23 6:48 ` [PATCH v5 13/13] treewide: Stop defining __ASSEMBLY__ for assembler files Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261023064908.66707-12-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=arnd@arndb.de \
--cc=justinstitt@google.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nsc@kernel.org \
--cc=soc@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®