Skip to content

Commit 3cec82b

Browse files
huthlinmag7
authored andcommitted
alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers
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). 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> Reviewed-by: Magnus Lindholm <linmag7@gmail.com> Link: https://lore.kernel.org/r/20251121100044.282684-2-thuth@redhat.com Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
1 parent 3a86608 commit 3cec82b

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

arch/alpha/include/asm/console.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <uapi/asm/console.h>
66

7-
#ifndef __ASSEMBLY__
7+
#ifndef __ASSEMBLER__
88
extern long callback_puts(long unit, const char *s, long length);
99
extern long callback_getc(long unit);
1010
extern long callback_open_console(void);
@@ -26,5 +26,5 @@ struct crb_struct;
2626
struct hwrpb_struct;
2727
extern int callback_init_done;
2828
extern void * callback_init(void *);
29-
#endif /* __ASSEMBLY__ */
29+
#endif /* __ASSEMBLER__ */
3030
#endif /* __AXP_CONSOLE_H */

arch/alpha/include/asm/page.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <asm/pal.h>
77
#include <vdso/page.h>
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#define STRICT_MM_TYPECHECKS
1212

@@ -74,7 +74,7 @@ typedef struct page *pgtable_t;
7474
#define PAGE_OFFSET 0xfffffc0000000000
7575
#endif
7676

77-
#endif /* !__ASSEMBLY__ */
77+
#endif /* !__ASSEMBLER__ */
7878

7979
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
8080
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))

arch/alpha/include/asm/pal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <uapi/asm/pal.h>
66

7-
#ifndef __ASSEMBLY__
7+
#ifndef __ASSEMBLER__
88

99
extern void halt(void) __attribute__((noreturn));
1010
#define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
@@ -183,5 +183,5 @@ qemu_get_vmtime(void)
183183
return v0;
184184
}
185185

186-
#endif /* !__ASSEMBLY__ */
186+
#endif /* !__ASSEMBLER__ */
187187
#endif /* __ALPHA_PAL_H */

arch/alpha/include/asm/thread_info.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
#ifdef __KERNEL__
66

7-
#ifndef __ASSEMBLY__
7+
#ifndef __ASSEMBLER__
88
#include <asm/processor.h>
99
#include <asm/types.h>
1010
#include <asm/hwrpb.h>
1111
#include <asm/sysinfo.h>
1212
#endif
1313

14-
#ifndef __ASSEMBLY__
14+
#ifndef __ASSEMBLER__
1515
struct thread_info {
1616
struct pcb_struct pcb; /* palcode state */
1717

@@ -44,7 +44,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
4444

4545
register unsigned long *current_stack_pointer __asm__ ("$30");
4646

47-
#endif /* __ASSEMBLY__ */
47+
#endif /* __ASSEMBLER__ */
4848

4949
/* Thread information allocation. */
5050
#define THREAD_SIZE_ORDER 1
@@ -110,7 +110,7 @@ register unsigned long *current_stack_pointer __asm__ ("$30");
110110
put_user(res, (int __user *)(value)); \
111111
})
112112

113-
#ifndef __ASSEMBLY__
113+
#ifndef __ASSEMBLER__
114114
extern void __save_fpu(void);
115115

116116
static inline void save_fpu(void)

0 commit comments

Comments
 (0)