linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/41] alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers
       [not found] <20250314071013.1575167-1-thuth@redhat.com>
@ 2025-03-14  7:09 ` Thomas Huth
  2025-06-05 18:12   ` Thomas Huth
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2025-03-14  7:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: Arnd Bergmann, linux-arch, Thomas Huth, Richard Henderson,
	Matt Turner, linux-alpha

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 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 Henderson <richard.henderson@linaro.org>
Cc: Matt Turner <mattst88@gmail.com>
Cc: linux-alpha@vger.kernel.org
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 arch/alpha/include/asm/console.h     | 4 ++--
 arch/alpha/include/asm/page.h        | 4 ++--
 arch/alpha/include/asm/pal.h         | 4 ++--
 arch/alpha/include/asm/thread_info.h | 8 ++++----
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/alpha/include/asm/console.h b/arch/alpha/include/asm/console.h
index 088b7b9eb15ae..1cabdb6064bbe 100644
--- a/arch/alpha/include/asm/console.h
+++ b/arch/alpha/include/asm/console.h
@@ -4,7 +4,7 @@
 
 #include <uapi/asm/console.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern long callback_puts(long unit, const char *s, long length);
 extern long callback_getc(long unit);
 extern long callback_open_console(void);
@@ -26,5 +26,5 @@ struct crb_struct;
 struct hwrpb_struct;
 extern int callback_init_done;
 extern void * callback_init(void *);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* __AXP_CONSOLE_H */
diff --git a/arch/alpha/include/asm/page.h b/arch/alpha/include/asm/page.h
index 5ec4c77e432e0..d2c6667d73e9e 100644
--- a/arch/alpha/include/asm/page.h
+++ b/arch/alpha/include/asm/page.h
@@ -6,7 +6,7 @@
 #include <asm/pal.h>
 #include <vdso/page.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #define STRICT_MM_TYPECHECKS
 
@@ -74,7 +74,7 @@ typedef struct page *pgtable_t;
 #define PAGE_OFFSET		0xfffffc0000000000
 #endif
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 
 #define __pa(x)			((unsigned long) (x) - PAGE_OFFSET)
 #define __va(x)			((void *)((unsigned long) (x) + PAGE_OFFSET))
diff --git a/arch/alpha/include/asm/pal.h b/arch/alpha/include/asm/pal.h
index db2b3b18b34c7..799a64c051984 100644
--- a/arch/alpha/include/asm/pal.h
+++ b/arch/alpha/include/asm/pal.h
@@ -4,7 +4,7 @@
 
 #include <uapi/asm/pal.h>
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 extern void halt(void) __attribute__((noreturn));
 #define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
@@ -183,5 +183,5 @@ qemu_get_vmtime(void)
 	return v0;
 }
 
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
 #endif /* __ALPHA_PAL_H */
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h
index 4a4d00b37986e..98ccbca64984c 100644
--- a/arch/alpha/include/asm/thread_info.h
+++ b/arch/alpha/include/asm/thread_info.h
@@ -4,14 +4,14 @@
 
 #ifdef __KERNEL__
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 #include <asm/processor.h>
 #include <asm/types.h>
 #include <asm/hwrpb.h>
 #include <asm/sysinfo.h>
 #endif
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 struct thread_info {
 	struct pcb_struct	pcb;		/* palcode state */
 
@@ -44,7 +44,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
 
 register unsigned long *current_stack_pointer __asm__ ("$30");
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 
 /* Thread information allocation.  */
 #define THREAD_SIZE_ORDER 1
@@ -110,7 +110,7 @@ register unsigned long *current_stack_pointer __asm__ ("$30");
 	put_user(res, (int __user *)(value));				\
 	})
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 extern void __save_fpu(void);
 
 static inline void save_fpu(void)
-- 
2.48.1


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

* Re: [PATCH 03/41] alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers
  2025-03-14  7:09 ` [PATCH 03/41] alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers Thomas Huth
@ 2025-06-05 18:12   ` Thomas Huth
  2025-07-30  7:15     ` Thomas Huth
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2025-06-05 18:12 UTC (permalink / raw)
  To: Richard Henderson, Matt Turner; +Cc: linux-alpha

On 14/03/2025 08.09, 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, or when dealing with uapi headers that
> rather should use __ASSEMBLER__ instead. 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 Henderson <richard.henderson@linaro.org>
> Cc: Matt Turner <mattst88@gmail.com>
> Cc: linux-alpha@vger.kernel.org
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   arch/alpha/include/asm/console.h     | 4 ++--
>   arch/alpha/include/asm/page.h        | 4 ++--
>   arch/alpha/include/asm/pal.h         | 4 ++--
>   arch/alpha/include/asm/thread_info.h | 8 ++++----
>   4 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/alpha/include/asm/console.h b/arch/alpha/include/asm/console.h
> index 088b7b9eb15ae..1cabdb6064bbe 100644
> --- a/arch/alpha/include/asm/console.h
> +++ b/arch/alpha/include/asm/console.h
> @@ -4,7 +4,7 @@
>   
>   #include <uapi/asm/console.h>
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   extern long callback_puts(long unit, const char *s, long length);
>   extern long callback_getc(long unit);
>   extern long callback_open_console(void);
> @@ -26,5 +26,5 @@ struct crb_struct;
>   struct hwrpb_struct;
>   extern int callback_init_done;
>   extern void * callback_init(void *);
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>   #endif /* __AXP_CONSOLE_H */
> diff --git a/arch/alpha/include/asm/page.h b/arch/alpha/include/asm/page.h
> index 5ec4c77e432e0..d2c6667d73e9e 100644
> --- a/arch/alpha/include/asm/page.h
> +++ b/arch/alpha/include/asm/page.h
> @@ -6,7 +6,7 @@
>   #include <asm/pal.h>
>   #include <vdso/page.h>
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   
>   #define STRICT_MM_TYPECHECKS
>   
> @@ -74,7 +74,7 @@ typedef struct page *pgtable_t;
>   #define PAGE_OFFSET		0xfffffc0000000000
>   #endif
>   
> -#endif /* !__ASSEMBLY__ */
> +#endif /* !__ASSEMBLER__ */
>   
>   #define __pa(x)			((unsigned long) (x) - PAGE_OFFSET)
>   #define __va(x)			((void *)((unsigned long) (x) + PAGE_OFFSET))
> diff --git a/arch/alpha/include/asm/pal.h b/arch/alpha/include/asm/pal.h
> index db2b3b18b34c7..799a64c051984 100644
> --- a/arch/alpha/include/asm/pal.h
> +++ b/arch/alpha/include/asm/pal.h
> @@ -4,7 +4,7 @@
>   
>   #include <uapi/asm/pal.h>
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   
>   extern void halt(void) __attribute__((noreturn));
>   #define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
> @@ -183,5 +183,5 @@ qemu_get_vmtime(void)
>   	return v0;
>   }
>   
> -#endif /* !__ASSEMBLY__ */
> +#endif /* !__ASSEMBLER__ */
>   #endif /* __ALPHA_PAL_H */
> diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h
> index 4a4d00b37986e..98ccbca64984c 100644
> --- a/arch/alpha/include/asm/thread_info.h
> +++ b/arch/alpha/include/asm/thread_info.h
> @@ -4,14 +4,14 @@
>   
>   #ifdef __KERNEL__
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   #include <asm/processor.h>
>   #include <asm/types.h>
>   #include <asm/hwrpb.h>
>   #include <asm/sysinfo.h>
>   #endif
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   struct thread_info {
>   	struct pcb_struct	pcb;		/* palcode state */
>   
> @@ -44,7 +44,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
>   
>   register unsigned long *current_stack_pointer __asm__ ("$30");
>   
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>   
>   /* Thread information allocation.  */
>   #define THREAD_SIZE_ORDER 1
> @@ -110,7 +110,7 @@ register unsigned long *current_stack_pointer __asm__ ("$30");
>   	put_user(res, (int __user *)(value));				\
>   	})
>   
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>   extern void __save_fpu(void);
>   
>   static inline void save_fpu(void)

Friendly ping!

Richard, Matt, could you maybe pick this up via your alpha 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

* Re: [PATCH 03/41] alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers
  2025-06-05 18:12   ` Thomas Huth
@ 2025-07-30  7:15     ` Thomas Huth
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2025-07-30  7:15 UTC (permalink / raw)
  To: Richard Henderson, Matt Turner; +Cc: linux-alpha

On 05/06/2025 20.12, Thomas Huth wrote:
> On 14/03/2025 08.09, 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, or when dealing with uapi headers that
>> rather should use __ASSEMBLER__ instead. 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 Henderson <richard.henderson@linaro.org>
>> Cc: Matt Turner <mattst88@gmail.com>
>> Cc: linux-alpha@vger.kernel.org
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   arch/alpha/include/asm/console.h     | 4 ++--
>>   arch/alpha/include/asm/page.h        | 4 ++--
>>   arch/alpha/include/asm/pal.h         | 4 ++--
>>   arch/alpha/include/asm/thread_info.h | 8 ++++----
>>   4 files changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/alpha/include/asm/console.h b/arch/alpha/include/asm/ 
>> console.h
>> index 088b7b9eb15ae..1cabdb6064bbe 100644
>> --- a/arch/alpha/include/asm/console.h
>> +++ b/arch/alpha/include/asm/console.h
>> @@ -4,7 +4,7 @@
>>   #include <uapi/asm/console.h>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>   extern long callback_puts(long unit, const char *s, long length);
>>   extern long callback_getc(long unit);
>>   extern long callback_open_console(void);
>> @@ -26,5 +26,5 @@ struct crb_struct;
>>   struct hwrpb_struct;
>>   extern int callback_init_done;
>>   extern void * callback_init(void *);
>> -#endif /* __ASSEMBLY__ */
>> +#endif /* __ASSEMBLER__ */
>>   #endif /* __AXP_CONSOLE_H */
>> diff --git a/arch/alpha/include/asm/page.h b/arch/alpha/include/asm/page.h
>> index 5ec4c77e432e0..d2c6667d73e9e 100644
>> --- a/arch/alpha/include/asm/page.h
>> +++ b/arch/alpha/include/asm/page.h
>> @@ -6,7 +6,7 @@
>>   #include <asm/pal.h>
>>   #include <vdso/page.h>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>   #define STRICT_MM_TYPECHECKS
>> @@ -74,7 +74,7 @@ typedef struct page *pgtable_t;
>>   #define PAGE_OFFSET        0xfffffc0000000000
>>   #endif
>> -#endif /* !__ASSEMBLY__ */
>> +#endif /* !__ASSEMBLER__ */
>>   #define __pa(x)            ((unsigned long) (x) - PAGE_OFFSET)
>>   #define __va(x)            ((void *)((unsigned long) (x) + PAGE_OFFSET))
>> diff --git a/arch/alpha/include/asm/pal.h b/arch/alpha/include/asm/pal.h
>> index db2b3b18b34c7..799a64c051984 100644
>> --- a/arch/alpha/include/asm/pal.h
>> +++ b/arch/alpha/include/asm/pal.h
>> @@ -4,7 +4,7 @@
>>   #include <uapi/asm/pal.h>
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>   extern void halt(void) __attribute__((noreturn));
>>   #define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : 
>> "i" (PAL_halt))
>> @@ -183,5 +183,5 @@ qemu_get_vmtime(void)
>>       return v0;
>>   }
>> -#endif /* !__ASSEMBLY__ */
>> +#endif /* !__ASSEMBLER__ */
>>   #endif /* __ALPHA_PAL_H */
>> diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/ 
>> asm/thread_info.h
>> index 4a4d00b37986e..98ccbca64984c 100644
>> --- a/arch/alpha/include/asm/thread_info.h
>> +++ b/arch/alpha/include/asm/thread_info.h
>> @@ -4,14 +4,14 @@
>>   #ifdef __KERNEL__
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>   #include <asm/processor.h>
>>   #include <asm/types.h>
>>   #include <asm/hwrpb.h>
>>   #include <asm/sysinfo.h>
>>   #endif
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>   struct thread_info {
>>       struct pcb_struct    pcb;        /* palcode state */
>> @@ -44,7 +44,7 @@ register struct thread_info *__current_thread_info 
>> __asm__("$8");
>>   register unsigned long *current_stack_pointer __asm__ ("$30");
>> -#endif /* __ASSEMBLY__ */
>> +#endif /* __ASSEMBLER__ */
>>   /* Thread information allocation.  */
>>   #define THREAD_SIZE_ORDER 1
>> @@ -110,7 +110,7 @@ register unsigned long *current_stack_pointer __asm__ 
>> ("$30");
>>       put_user(res, (int __user *)(value));                \
>>       })
>> -#ifndef __ASSEMBLY__
>> +#ifndef __ASSEMBLER__
>>   extern void __save_fpu(void);
>>   static inline void save_fpu(void)
> 
> Friendly ping!
> 
> Richard, Matt, could you maybe pick this up via your alpha tree? (x86 and 
> parisc already got merge via their respective architecture trees, so I guess 
> the same should happen for this patch here, too).

Ping^2! Any chance that you could pick this up for Linux v6.17 ?

  Thanks,
   Thomas


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

end of thread, other threads:[~2025-07-30  7:15 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:09 ` [PATCH 03/41] alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers Thomas Huth
2025-06-05 18:12   ` Thomas Huth
2025-07-30  7:15     ` 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).