* [PATCH] vdso: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
@ 2026-06-19 10:06 Thomas Huth
2026-06-29 8:18 ` Vincenzo Frascino
2026-06-29 13:46 ` [tip: timers/vdso] " tip-bot2 for Thomas Huth
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2026-06-19 10:06 UTC (permalink / raw)
To: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino, linux-kernel
Cc: linux-arch
From: Thomas Huth <thuth@redhat.com>
While the GCC and Clang compilers already define __ASSEMBLER__
automatically 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. So let's standardize now
on the __ASSEMBLER__ macro that is provided by the compilers.
This is a completely mechanical patch (done with a simple "sed -i"
statement).
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
Note: This patch has been split from an earlier bigger patch of mine
to ease reviewing.
include/asm-generic/vdso/vsyscall.h | 4 ++--
include/vdso/datapage.h | 6 +++---
include/vdso/helpers.h | 4 ++--
include/vdso/processor.h | 4 ++--
include/vdso/vsyscall.h | 4 ++--
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/asm-generic/vdso/vsyscall.h b/include/asm-generic/vdso/vsyscall.h
index 5c6d9799f4e74..a6b03cfba0e24 100644
--- a/include/asm-generic/vdso/vsyscall.h
+++ b/include/asm-generic/vdso/vsyscall.h
@@ -2,7 +2,7 @@
#ifndef __ASM_GENERIC_VSYSCALL_H
#define __ASM_GENERIC_VSYSCALL_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#ifndef __arch_get_vdso_u_time_data
static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void)
@@ -30,6 +30,6 @@ static __always_inline void __arch_sync_vdso_time_data(struct vdso_time_data *vd
}
#endif /* __arch_sync_vdso_time_data */
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __ASM_GENERIC_VSYSCALL_H */
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
index 5977723fb3b5d..09897f76ae07a 100644
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -2,7 +2,7 @@
#ifndef __VDSO_DATAPAGE_H
#define __VDSO_DATAPAGE_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <linux/types.h>
@@ -176,7 +176,7 @@ enum vdso_pages {
VDSO_NR_PAGES
};
-#else /* !__ASSEMBLY__ */
+#else /* !__ASSEMBLER__ */
#ifdef CONFIG_VDSO_GETRANDOM
#define __vdso_u_rng_data PROVIDE(vdso_u_rng_data = vdso_u_data + 2 * PAGE_SIZE);
@@ -197,6 +197,6 @@ enum vdso_pages {
__vdso_u_arch_data \
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __VDSO_DATAPAGE_H */
diff --git a/include/vdso/helpers.h b/include/vdso/helpers.h
index a3bf4f1c0d37d..65151b681c4f5 100644
--- a/include/vdso/helpers.h
+++ b/include/vdso/helpers.h
@@ -2,7 +2,7 @@
#ifndef __VDSO_HELPERS_H
#define __VDSO_HELPERS_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <asm/barrier.h>
#include <vdso/datapage.h>
@@ -111,6 +111,6 @@ static __always_inline void vdso_write_end(struct vdso_time_data *vd)
vdso_write_seq_end(&vc[CS_RAW]);
}
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __VDSO_HELPERS_H */
diff --git a/include/vdso/processor.h b/include/vdso/processor.h
index fbe8265ea3c49..cc781912a696e 100644
--- a/include/vdso/processor.h
+++ b/include/vdso/processor.h
@@ -5,10 +5,10 @@
#ifndef __VDSO_PROCESSOR_H
#define __VDSO_PROCESSOR_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <asm/vdso/processor.h>
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* __VDSO_PROCESSOR_H */
diff --git a/include/vdso/vsyscall.h b/include/vdso/vsyscall.h
index b0fdc9c6bf439..c5c2a2c078571 100644
--- a/include/vdso/vsyscall.h
+++ b/include/vdso/vsyscall.h
@@ -2,13 +2,13 @@
#ifndef __VDSO_VSYSCALL_H
#define __VDSO_VSYSCALL_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <asm/vdso/vsyscall.h>
unsigned long vdso_update_begin(void);
void vdso_update_end(unsigned long flags);
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __VDSO_VSYSCALL_H */
--
2.54.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vdso: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
2026-06-19 10:06 [PATCH] vdso: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
@ 2026-06-29 8:18 ` Vincenzo Frascino
2026-06-29 13:46 ` [tip: timers/vdso] " tip-bot2 for Thomas Huth
1 sibling, 0 replies; 3+ messages in thread
From: Vincenzo Frascino @ 2026-06-29 8:18 UTC (permalink / raw)
To: Thomas Huth, Andy Lutomirski, Thomas Gleixner, linux-kernel; +Cc: linux-arch
Hi Thomas,
thank you for your patch.
On 19/06/2026 11:06, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> While the GCC and Clang compilers already define __ASSEMBLER__
> automatically 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. So let's standardize now
> on the __ASSEMBLER__ macro that is provided by the compilers.
>
> This is a completely mechanical patch (done with a simple "sed -i"
> statement).
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> Note: This patch has been split from an earlier bigger patch of mine
> to ease reviewing.
>
> include/asm-generic/vdso/vsyscall.h | 4 ++--
> include/vdso/datapage.h | 6 +++---
> include/vdso/helpers.h | 4 ++--
> include/vdso/processor.h | 4 ++--
> include/vdso/vsyscall.h | 4 ++--
> 5 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/include/asm-generic/vdso/vsyscall.h b/include/asm-generic/vdso/vsyscall.h
> index 5c6d9799f4e74..a6b03cfba0e24 100644
> --- a/include/asm-generic/vdso/vsyscall.h
> +++ b/include/asm-generic/vdso/vsyscall.h
> @@ -2,7 +2,7 @@
> #ifndef __ASM_GENERIC_VSYSCALL_H
> #define __ASM_GENERIC_VSYSCALL_H
>
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>
> #ifndef __arch_get_vdso_u_time_data
> static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void)
> @@ -30,6 +30,6 @@ static __always_inline void __arch_sync_vdso_time_data(struct vdso_time_data *vd
> }
> #endif /* __arch_sync_vdso_time_data */
>
> -#endif /* !__ASSEMBLY__ */
> +#endif /* !__ASSEMBLER__ */
>
> #endif /* __ASM_GENERIC_VSYSCALL_H */
> diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
> index 5977723fb3b5d..09897f76ae07a 100644
> --- a/include/vdso/datapage.h
> +++ b/include/vdso/datapage.h
> @@ -2,7 +2,7 @@
> #ifndef __VDSO_DATAPAGE_H
> #define __VDSO_DATAPAGE_H
>
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>
> #include <linux/types.h>
>
> @@ -176,7 +176,7 @@ enum vdso_pages {
> VDSO_NR_PAGES
> };
>
> -#else /* !__ASSEMBLY__ */
> +#else /* !__ASSEMBLER__ */
>
> #ifdef CONFIG_VDSO_GETRANDOM
> #define __vdso_u_rng_data PROVIDE(vdso_u_rng_data = vdso_u_data + 2 * PAGE_SIZE);
> @@ -197,6 +197,6 @@ enum vdso_pages {
> __vdso_u_arch_data \
>
>
> -#endif /* !__ASSEMBLY__ */
> +#endif /* !__ASSEMBLER__ */
>
> #endif /* __VDSO_DATAPAGE_H */
> diff --git a/include/vdso/helpers.h b/include/vdso/helpers.h
> index a3bf4f1c0d37d..65151b681c4f5 100644
> --- a/include/vdso/helpers.h
> +++ b/include/vdso/helpers.h
> @@ -2,7 +2,7 @@
> #ifndef __VDSO_HELPERS_H
> #define __VDSO_HELPERS_H
>
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>
> #include <asm/barrier.h>
> #include <vdso/datapage.h>
> @@ -111,6 +111,6 @@ static __always_inline void vdso_write_end(struct vdso_time_data *vd)
> vdso_write_seq_end(&vc[CS_RAW]);
> }
>
> -#endif /* !__ASSEMBLY__ */
> +#endif /* !__ASSEMBLER__ */
>
> #endif /* __VDSO_HELPERS_H */
> diff --git a/include/vdso/processor.h b/include/vdso/processor.h
> index fbe8265ea3c49..cc781912a696e 100644
> --- a/include/vdso/processor.h
> +++ b/include/vdso/processor.h
> @@ -5,10 +5,10 @@
> #ifndef __VDSO_PROCESSOR_H
> #define __VDSO_PROCESSOR_H
>
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>
> #include <asm/vdso/processor.h>
>
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>
> #endif /* __VDSO_PROCESSOR_H */
> diff --git a/include/vdso/vsyscall.h b/include/vdso/vsyscall.h
> index b0fdc9c6bf439..c5c2a2c078571 100644
> --- a/include/vdso/vsyscall.h
> +++ b/include/vdso/vsyscall.h
> @@ -2,13 +2,13 @@
> #ifndef __VDSO_VSYSCALL_H
> #define __VDSO_VSYSCALL_H
>
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>
> #include <asm/vdso/vsyscall.h>
>
> unsigned long vdso_update_begin(void);
> void vdso_update_end(unsigned long flags);
>
> -#endif /* !__ASSEMBLY__ */
> +#endif /* !__ASSEMBLER__ */
>
> #endif /* __VDSO_VSYSCALL_H */
--
Regards,
Vincenzo
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: timers/vdso] vdso: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
2026-06-19 10:06 [PATCH] vdso: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
2026-06-29 8:18 ` Vincenzo Frascino
@ 2026-06-29 13:46 ` tip-bot2 for Thomas Huth
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Thomas Huth @ 2026-06-29 13:46 UTC (permalink / raw)
To: linux-tip-commits
Cc: Thomas Huth, Thomas Gleixner, Vincenzo Frascino, x86, linux-kernel
The following commit has been merged into the timers/vdso branch of tip:
Commit-ID: 02475538bec2c47d1cce1211823c0453175af6a9
Gitweb: https://git.kernel.org/tip/02475538bec2c47d1cce1211823c0453175af6a9
Author: Thomas Huth <thuth@redhat.com>
AuthorDate: Fri, 19 Jun 2026 12:06:00 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Mon, 29 Jun 2026 15:44:08 +02:00
vdso: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files
While the GCC and Clang compilers already define __ASSEMBLER__
automatically 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.
So standardize now on the __ASSEMBLER__ macro that is provided by the
compilers.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://patch.msgid.link/20260619100600.121042-1-thuth@redhat.com
---
include/asm-generic/vdso/vsyscall.h | 4 ++--
include/vdso/datapage.h | 6 +++---
include/vdso/helpers.h | 4 ++--
include/vdso/processor.h | 4 ++--
include/vdso/vsyscall.h | 4 ++--
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/asm-generic/vdso/vsyscall.h b/include/asm-generic/vdso/vsyscall.h
index 5c6d979..a6b03cf 100644
--- a/include/asm-generic/vdso/vsyscall.h
+++ b/include/asm-generic/vdso/vsyscall.h
@@ -2,7 +2,7 @@
#ifndef __ASM_GENERIC_VSYSCALL_H
#define __ASM_GENERIC_VSYSCALL_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#ifndef __arch_get_vdso_u_time_data
static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void)
@@ -30,6 +30,6 @@ static __always_inline void __arch_sync_vdso_time_data(struct vdso_time_data *vd
}
#endif /* __arch_sync_vdso_time_data */
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __ASM_GENERIC_VSYSCALL_H */
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
index 5977723..09897f7 100644
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -2,7 +2,7 @@
#ifndef __VDSO_DATAPAGE_H
#define __VDSO_DATAPAGE_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <linux/types.h>
@@ -176,7 +176,7 @@ enum vdso_pages {
VDSO_NR_PAGES
};
-#else /* !__ASSEMBLY__ */
+#else /* !__ASSEMBLER__ */
#ifdef CONFIG_VDSO_GETRANDOM
#define __vdso_u_rng_data PROVIDE(vdso_u_rng_data = vdso_u_data + 2 * PAGE_SIZE);
@@ -197,6 +197,6 @@ enum vdso_pages {
__vdso_u_arch_data \
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __VDSO_DATAPAGE_H */
diff --git a/include/vdso/helpers.h b/include/vdso/helpers.h
index a3bf4f1..65151b6 100644
--- a/include/vdso/helpers.h
+++ b/include/vdso/helpers.h
@@ -2,7 +2,7 @@
#ifndef __VDSO_HELPERS_H
#define __VDSO_HELPERS_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <asm/barrier.h>
#include <vdso/datapage.h>
@@ -111,6 +111,6 @@ static __always_inline void vdso_write_end(struct vdso_time_data *vd)
vdso_write_seq_end(&vc[CS_RAW]);
}
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __VDSO_HELPERS_H */
diff --git a/include/vdso/processor.h b/include/vdso/processor.h
index fbe8265..cc78191 100644
--- a/include/vdso/processor.h
+++ b/include/vdso/processor.h
@@ -5,10 +5,10 @@
#ifndef __VDSO_PROCESSOR_H
#define __VDSO_PROCESSOR_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <asm/vdso/processor.h>
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* __VDSO_PROCESSOR_H */
diff --git a/include/vdso/vsyscall.h b/include/vdso/vsyscall.h
index b0fdc9c..c5c2a2c 100644
--- a/include/vdso/vsyscall.h
+++ b/include/vdso/vsyscall.h
@@ -2,13 +2,13 @@
#ifndef __VDSO_VSYSCALL_H
#define __VDSO_VSYSCALL_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <asm/vdso/vsyscall.h>
unsigned long vdso_update_begin(void);
void vdso_update_end(unsigned long flags);
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* __VDSO_VSYSCALL_H */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-29 13:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-19 10:06 [PATCH] vdso: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
2026-06-29 8:18 ` Vincenzo Frascino
2026-06-29 13:46 ` [tip: timers/vdso] " tip-bot2 for Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox