linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 35/41] um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers
       [not found] <20250314071013.1575167-1-thuth@redhat.com>
@ 2025-03-14  7:10 ` Thomas Huth
  2025-03-18  9:59   ` Johannes Berg
  2025-06-06  7:27   ` Thomas Huth
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2025-03-14  7:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Arnd Bergmann, linux-arch, Thomas Huth, Richard Weinberger,
	Anton Ivanov, Johannes Berg, linux-um

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, so let's standardize on the __ASSEMBLER__
macro that is provided by the compilers now.

This is a completely mechanical patch (done with a simple "sed -i"
statement).

Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-um@lists.infradead.org
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 arch/um/include/asm/cpufeature.h     | 4 ++--
 arch/um/include/asm/current.h        | 4 ++--
 arch/um/include/asm/page.h           | 4 ++--
 arch/um/include/asm/ptrace-generic.h | 2 +-
 arch/um/include/asm/thread_info.h    | 2 +-
 arch/um/include/shared/as-layout.h   | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/um/include/asm/cpufeature.h b/arch/um/include/asm/cpufeature.h
index 1eb8b834fbec3..4354f6984271c 100644
--- a/arch/um/include/asm/cpufeature.h
+++ b/arch/um/include/asm/cpufeature.h
@@ -4,7 +4,7 @@
 
 #include <asm/processor.h>
 
-#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
+#if defined(__KERNEL__) && !defined(__ASSEMBLER__)
 
 #include <asm/asm.h>
 #include <linux/bitops.h>
@@ -137,5 +137,5 @@ static __always_inline bool _static_cpu_has(u16 bit)
 #define CPU_FEATURE_TYPEVAL		boot_cpu_data.x86_vendor, boot_cpu_data.x86, \
 					boot_cpu_data.x86_model
 
-#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
+#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */
 #endif /* _ASM_UM_CPUFEATURE_H */
diff --git a/arch/um/include/asm/current.h b/arch/um/include/asm/current.h
index de64e032d66c1..8accc6d6f5026 100644
--- a/arch/um/include/asm/current.h
+++ b/arch/um/include/asm/current.h
@@ -5,7 +5,7 @@
 #include <linux/compiler.h>
 #include <linux/threads.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct task_struct;
 extern struct task_struct *cpu_tasks[NR_CPUS];
@@ -18,6 +18,6 @@ static __always_inline struct task_struct *get_current(void)
 
 #define current get_current()
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* __ASM_CURRENT_H */
diff --git a/arch/um/include/asm/page.h b/arch/um/include/asm/page.h
index 3d516f3ca9c74..6f54254aaf443 100644
--- a/arch/um/include/asm/page.h
+++ b/arch/um/include/asm/page.h
@@ -11,7 +11,7 @@
 
 #include <vdso/page.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 struct page;
 
@@ -94,7 +94,7 @@ extern unsigned long uml_physmem;
 #include <asm-generic/memory_model.h>
 #include <asm-generic/getorder.h>
 
-#endif	/* __ASSEMBLY__ */
+#endif	/* __ASSEMBLER__ */
 
 #ifdef CONFIG_X86_32
 #define __HAVE_ARCH_GATE_AREA 1
diff --git a/arch/um/include/asm/ptrace-generic.h b/arch/um/include/asm/ptrace-generic.h
index 4696f24d14920..86d74f9d33cf2 100644
--- a/arch/um/include/asm/ptrace-generic.h
+++ b/arch/um/include/asm/ptrace-generic.h
@@ -6,7 +6,7 @@
 #ifndef __UM_PTRACE_GENERIC_H
 #define __UM_PTRACE_GENERIC_H
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <sysdep/ptrace.h>
 
diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h
index f9ad06fcc991a..398e86fe3d051 100644
--- a/arch/um/include/asm/thread_info.h
+++ b/arch/um/include/asm/thread_info.h
@@ -9,7 +9,7 @@
 #define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER
 #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <asm/types.h>
 #include <asm/page.h>
diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h
index ea65f151bf484..07721d7210b1f 100644
--- a/arch/um/include/shared/as-layout.h
+++ b/arch/um/include/shared/as-layout.h
@@ -26,7 +26,7 @@
 #define STUB_DATA_PAGES 2 /* must be a power of two */
 #define STUB_END (STUB_DATA + STUB_DATA_PAGES * UM_KERN_PAGE_SIZE)
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #include <sysdep/ptrace.h>
 
-- 
2.48.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 35/41] um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers
  2025-03-14  7:10 ` [PATCH 35/41] um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers Thomas Huth
@ 2025-03-18  9:59   ` Johannes Berg
  2025-06-06  7:27   ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2025-03-18  9:59 UTC (permalink / raw)
  To: Thomas Huth, linux-kernel
  Cc: Arnd Bergmann, linux-arch, Richard Weinberger, Anton Ivanov,
	linux-um

On Fri, 2025-03-14 at 08:10 +0100, Thomas Huth wrote:
> 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, so let's standardize on the __ASSEMBLER__
> macro that is provided by the compilers now.
> 
> This is a completely mechanical patch (done with a simple "sed -i"
> statement).
> 

Looks fine, I guess - I'll assume that since it's part of a larger
series you'll merge it elsewhere.

johannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 35/41] um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers
  2025-03-14  7:10 ` [PATCH 35/41] um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers Thomas Huth
  2025-03-18  9:59   ` Johannes Berg
@ 2025-06-06  7:27   ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2025-06-06  7:27 UTC (permalink / raw)
  To: Richard Weinberger, Anton Ivanov, Johannes Berg; +Cc: linux-um

On 14/03/2025 08.10, Thomas Huth wrote:
> 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, so let's standardize on the __ASSEMBLER__
> macro that is provided by the compilers now.
> 
> This is a completely mechanical patch (done with a simple "sed -i"
> statement).
> 
> Cc: Richard Weinberger <richard@nod.at>
> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Cc: linux-um@lists.infradead.org
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   arch/um/include/asm/cpufeature.h     | 4 ++--
>   arch/um/include/asm/current.h        | 4 ++--
>   arch/um/include/asm/page.h           | 4 ++--
>   arch/um/include/asm/ptrace-generic.h | 2 +-
>   arch/um/include/asm/thread_info.h    | 2 +-
>   arch/um/include/shared/as-layout.h   | 2 +-
>   6 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/um/include/asm/cpufeature.h b/arch/um/include/asm/cpufeature.h
> index 1eb8b834fbec3..4354f6984271c 100644
> --- a/arch/um/include/asm/cpufeature.h
> +++ b/arch/um/include/asm/cpufeature.h
> @@ -4,7 +4,7 @@
>   
>   #include <asm/processor.h>
>   
> -#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
> +#if defined(__KERNEL__) && !defined(__ASSEMBLER__)
>   
>   #include <asm/asm.h>
>   #include <linux/bitops.h>
> @@ -137,5 +137,5 @@ static __always_inline bool _static_cpu_has(u16 bit)
>   #define CPU_FEATURE_TYPEVAL		boot_cpu_data.x86_vendor, boot_cpu_data.x86, \
>   					boot_cpu_data.x86_model
>   
> -#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
> +#endif /* defined(__KERNEL__) && !defined(__ASSEMBLER__) */
>   #endif /* _ASM_UM_CPUFEATURE_H */
> diff --git a/arch/um/include/asm/current.h b/arch/um/include/asm/current.h
> index de64e032d66c1..8accc6d6f5026 100644
> --- a/arch/um/include/asm/current.h
> +++ b/arch/um/include/asm/current.h
> @@ -5,7 +5,7 @@
>   #include <linux/compiler.h>
>   #include <linux/threads.h>
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   
>   struct task_struct;
>   extern struct task_struct *cpu_tasks[NR_CPUS];
> @@ -18,6 +18,6 @@ static __always_inline struct task_struct *get_current(void)
>   
>   #define current get_current()
>   
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>   
>   #endif /* __ASM_CURRENT_H */
> diff --git a/arch/um/include/asm/page.h b/arch/um/include/asm/page.h
> index 3d516f3ca9c74..6f54254aaf443 100644
> --- a/arch/um/include/asm/page.h
> +++ b/arch/um/include/asm/page.h
> @@ -11,7 +11,7 @@
>   
>   #include <vdso/page.h>
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   
>   struct page;
>   
> @@ -94,7 +94,7 @@ extern unsigned long uml_physmem;
>   #include <asm-generic/memory_model.h>
>   #include <asm-generic/getorder.h>
>   
> -#endif	/* __ASSEMBLY__ */
> +#endif	/* __ASSEMBLER__ */
>   
>   #ifdef CONFIG_X86_32
>   #define __HAVE_ARCH_GATE_AREA 1
> diff --git a/arch/um/include/asm/ptrace-generic.h b/arch/um/include/asm/ptrace-generic.h
> index 4696f24d14920..86d74f9d33cf2 100644
> --- a/arch/um/include/asm/ptrace-generic.h
> +++ b/arch/um/include/asm/ptrace-generic.h
> @@ -6,7 +6,7 @@
>   #ifndef __UM_PTRACE_GENERIC_H
>   #define __UM_PTRACE_GENERIC_H
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   
>   #include <sysdep/ptrace.h>
>   
> diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h
> index f9ad06fcc991a..398e86fe3d051 100644
> --- a/arch/um/include/asm/thread_info.h
> +++ b/arch/um/include/asm/thread_info.h
> @@ -9,7 +9,7 @@
>   #define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER
>   #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   
>   #include <asm/types.h>
>   #include <asm/page.h>
> diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h
> index ea65f151bf484..07721d7210b1f 100644
> --- a/arch/um/include/shared/as-layout.h
> +++ b/arch/um/include/shared/as-layout.h
> @@ -26,7 +26,7 @@
>   #define STUB_DATA_PAGES 2 /* must be a power of two */
>   #define STUB_END (STUB_DATA + STUB_DATA_PAGES * UM_KERN_PAGE_SIZE)
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   
>   #include <sysdep/ptrace.h>
>   


Friendly ping!

Richard, Anton, Johannes, could you maybe pick this patch up via your "um" 
tree? (x86 and parisc already got merge via their respective architecture 
trees, so I guess the same should happen for this patch here, too).

  Thanks,
   Thomas



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-06  7:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250314071013.1575167-1-thuth@redhat.com>
2025-03-14  7:10 ` [PATCH 35/41] um: Replace __ASSEMBLY__ with __ASSEMBLER__ in the usermode headers Thomas Huth
2025-03-18  9:59   ` Johannes Berg
2025-06-06  7:27   ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).