Skip to contentSkip to conversation

sched: Replace __ASSEMBLY__ with __ASSEMBLER__ in sched.h header

PATCH Applied Thomas Huth 3 participants 3 messages Sep 22

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: Replace __ASSEMBLY__ with __ASSEMBLER__ in sched.h header

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.

---
Note: This has been split from an earlier bigger patch of mine into
this separate patch to ease reviewing.
I also thought I had sent out this earlier already, but I cannot find the patch on lore or any other public inbox anymore, so maybe it got lost along the way. Anyway, sorry if you got this twice!

 include/uapi/linux/sched.h                         | 2 +-
 tools/perf/trace/beauty/include/uapi/linux/sched.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/sched.h +1 -1
index 33a4624285cd4..19ffeba894283 100644
@@ -53,7 +53,7 @@
  */
 #define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace. */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /**
  * struct clone_args - arguments for the clone3 syscall
  * @flags:        Flags for the new process as listed above.
tools/perf/trace/beauty/include/uapi/linux/sched.h +1 -1
index 33a4624285cd4..19ffeba894283 100644
@@ -53,7 +53,7 @@
  */
 #define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace. */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /**
  * struct clone_args - arguments for the clone3 syscall
  * @flags:        Flags for the new process as listed above.
Signature · 1 line
2.55.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 9 lines

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.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
merge bot Applied
#2 lore raw

[tip: sched/core] sched/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in the <uapi/linux/sched.h> header

In reply to Thomas Huth
The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     a9b3c7570564de40acb0998ab85c89d546b2122f
Gitweb:        https://git.kernel.org/tip/a9b3c7570564de40acb0998ab85c89d546b2122f
Author:        Thomas Huth <[email protected]>
AuthorDate:    Tue, 22 Sep 2026 08:46:41 +02:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Tue, 22 Sep 2026 10:08:38 +02:00

sched/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in the <uapi/linux/sched.h> header

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.

---
 include/uapi/linux/sched.h                         | 2 +-
 tools/perf/trace/beauty/include/uapi/linux/sched.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/sched.h +1 -1
index 33a4624..19ffeba 100644
@@ -53,7 +53,7 @@
  */
 #define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace. */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /**
  * struct clone_args - arguments for the clone3 syscall
  * @flags:        Flags for the new process as listed above.
tools/perf/trace/beauty/include/uapi/linux/sched.h +1 -1
index 33a4624..19ffeba 100644
@@ -53,7 +53,7 @@
  */
 #define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace. */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 /**
  * struct clone_args - arguments for the clone3 syscall
  * @flags:        Flags for the new process as listed above.