From: Thomas Huth <thuth@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-arch@vger.kernel.org, Thomas Huth <thuth@redhat.com>,
Dinh Nguyen <dinguyen@kernel.org>
Subject: [PATCH 21/41] nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
Date: Fri, 14 Mar 2025 08:09:52 +0100 [thread overview]
Message-ID: <20250314071013.1575167-22-thuth@redhat.com> (raw)
In-Reply-To: <20250314071013.1575167-1-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 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: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
arch/nios2/include/asm/entry.h | 4 ++--
arch/nios2/include/asm/page.h | 4 ++--
arch/nios2/include/asm/processor.h | 4 ++--
arch/nios2/include/asm/ptrace.h | 4 ++--
arch/nios2/include/asm/registers.h | 4 ++--
arch/nios2/include/asm/setup.h | 4 ++--
arch/nios2/include/asm/thread_info.h | 4 ++--
arch/nios2/include/asm/traps.h | 2 +-
8 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/arch/nios2/include/asm/entry.h b/arch/nios2/include/asm/entry.h
index bafb7b2ca59fc..cb25ed56450ab 100644
--- a/arch/nios2/include/asm/entry.h
+++ b/arch/nios2/include/asm/entry.h
@@ -10,7 +10,7 @@
#ifndef _ASM_NIOS2_ENTRY_H
#define _ASM_NIOS2_ENTRY_H
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
#include <asm/processor.h>
#include <asm/registers.h>
@@ -117,5 +117,5 @@
addi sp, sp, SWITCH_STACK_SIZE
.endm
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_NIOS2_ENTRY_H */
diff --git a/arch/nios2/include/asm/page.h b/arch/nios2/include/asm/page.h
index 2897ec1b74f61..00a51623d38a5 100644
--- a/arch/nios2/include/asm/page.h
+++ b/arch/nios2/include/asm/page.h
@@ -26,7 +26,7 @@
#define PAGE_OFFSET \
(CONFIG_NIOS2_MEM_BASE + CONFIG_NIOS2_KERNEL_REGION_BASE)
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
/*
* This gives the physical RAM offset.
@@ -90,6 +90,6 @@ extern struct page *mem_map;
#include <asm-generic/getorder.h>
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif /* _ASM_NIOS2_PAGE_H */
diff --git a/arch/nios2/include/asm/processor.h b/arch/nios2/include/asm/processor.h
index eb44130364a9a..d9521c3c2df98 100644
--- a/arch/nios2/include/asm/processor.h
+++ b/arch/nios2/include/asm/processor.h
@@ -36,7 +36,7 @@
/* Kuser helpers is mapped to this user space address */
#define KUSER_BASE 0x1000
#define KUSER_SIZE (PAGE_SIZE)
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
# define TASK_SIZE 0x7FFF0000UL
# define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
@@ -72,6 +72,6 @@ extern unsigned long __get_wchan(struct task_struct *p);
#define cpu_relax() barrier()
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_NIOS2_PROCESSOR_H */
diff --git a/arch/nios2/include/asm/ptrace.h b/arch/nios2/include/asm/ptrace.h
index 9da34c3022a27..96cbcd40c7ce5 100644
--- a/arch/nios2/include/asm/ptrace.h
+++ b/arch/nios2/include/asm/ptrace.h
@@ -18,7 +18,7 @@
/* This struct defines the way the registers are stored on the
stack during a system call. */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct pt_regs {
unsigned long r8; /* r8-r15 Caller-saved GP registers */
unsigned long r9;
@@ -78,5 +78,5 @@ extern void show_regs(struct pt_regs *);
int do_syscall_trace_enter(void);
void do_syscall_trace_exit(void);
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_NIOS2_PTRACE_H */
diff --git a/arch/nios2/include/asm/registers.h b/arch/nios2/include/asm/registers.h
index 95b67dd16f818..165dab26221f2 100644
--- a/arch/nios2/include/asm/registers.h
+++ b/arch/nios2/include/asm/registers.h
@@ -6,7 +6,7 @@
#ifndef _ASM_NIOS2_REGISTERS_H
#define _ASM_NIOS2_REGISTERS_H
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#include <asm/cpuinfo.h>
#endif
@@ -44,7 +44,7 @@
/* tlbmisc register bits */
#define TLBMISC_PID_SHIFT 4
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#define TLBMISC_PID_MASK ((1UL << cpuinfo.tlb_pid_num_bits) - 1)
#endif
#define TLBMISC_WAY_MASK 0xf
diff --git a/arch/nios2/include/asm/setup.h b/arch/nios2/include/asm/setup.h
index 908a1526d1bd7..6d3f26a71cb51 100644
--- a/arch/nios2/include/asm/setup.h
+++ b/arch/nios2/include/asm/setup.h
@@ -8,7 +8,7 @@
#include <asm-generic/setup.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#ifdef __KERNEL__
extern char exception_handler_hook[];
@@ -18,6 +18,6 @@ extern char fast_handler_end[];
extern void pagetable_init(void);
#endif/* __KERNEL__ */
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_NIOS2_SETUP_H */
diff --git a/arch/nios2/include/asm/thread_info.h b/arch/nios2/include/asm/thread_info.h
index 5abac9893b32b..83df79286d62e 100644
--- a/arch/nios2/include/asm/thread_info.h
+++ b/arch/nios2/include/asm/thread_info.h
@@ -24,7 +24,7 @@
#define THREAD_SIZE_ORDER 1
#define THREAD_SIZE 8192 /* 2 * PAGE_SIZE */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
/*
* low level task data that entry.S needs immediate access to
@@ -61,7 +61,7 @@ static inline struct thread_info *current_thread_info(void)
return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
}
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
/*
* thread information flags
diff --git a/arch/nios2/include/asm/traps.h b/arch/nios2/include/asm/traps.h
index afd77bef01c65..133a3dedbc3e8 100644
--- a/arch/nios2/include/asm/traps.h
+++ b/arch/nios2/include/asm/traps.h
@@ -12,7 +12,7 @@
#define TRAP_ID_SYSCALL 0
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
void _exception(int signo, struct pt_regs *regs, int code, unsigned long addr);
void do_page_fault(struct pt_regs *regs, unsigned long cause,
unsigned long address);
--
2.48.1
next prev parent reply other threads:[~2025-03-14 7:12 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 7:09 [PATCH 00/41] treewide: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Thomas Huth
2025-03-14 7:09 ` [PATCH 01/41] uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 02/41] include: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 03/41] alpha: Replace __ASSEMBLY__ with __ASSEMBLER__ in the alpha headers Thomas Huth
2025-03-14 7:09 ` [PATCH 04/41] arc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 05/41] arc: Replace __ASSEMBLY__ with __ASSEMBLER__ in the non-uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 06/41] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 07/41] arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 08/41] arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 11:55 ` Will Deacon
2025-03-14 12:05 ` Arnd Bergmann
2025-03-14 13:42 ` Will Deacon
2025-03-14 18:01 ` Thomas Huth
2025-03-14 7:09 ` [PATCH 09/41] arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 10/41] csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi header Thomas Huth
2025-03-14 7:09 ` [PATCH 11/41] csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 12/41] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 13/41] hexagon: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-04-08 15:16 ` Brian Cain
2025-03-14 7:09 ` [PATCH 14/41] loongarch: Replace __ASSEMBLY__ with __ASSEMBLER__ in the loongarch headers Thomas Huth
2025-03-14 7:09 ` [PATCH 15/41] m68k: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 16/41] m68k: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 17/41] microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-06-10 13:19 ` Michal Simek
2025-03-14 7:09 ` [PATCH 18/41] microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-06-10 7:26 ` Michal Simek
2025-06-10 13:19 ` Michal Simek
2025-03-14 7:09 ` [PATCH 19/41] mips: Replace __ASSEMBLY__ with __ASSEMBLER__ in the mips headers Thomas Huth
2025-03-20 12:56 ` Philippe Mathieu-Daudé
2025-03-14 7:09 ` [PATCH 20/41] nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:09 ` Thomas Huth [this message]
2025-03-14 7:09 ` [PATCH 22/41] openrisc: " Thomas Huth
2025-06-07 5:52 ` Stafford Horne
2025-03-14 7:09 ` [PATCH 23/41] openrisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-06-07 5:53 ` Stafford Horne
2025-03-14 7:09 ` [PATCH 24/41] parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-05-04 18:53 ` Helge Deller
2025-03-14 7:09 ` [PATCH 25/41] parisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-05-04 18:53 ` Helge Deller
2025-03-14 7:09 ` [PATCH 26/41] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 27/41] powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:09 ` [PATCH 28/41] riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:10 ` [PATCH 29/41] riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:10 ` [PATCH 30/41] s390/uapi: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:10 ` [PATCH 31/41] s390x: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:10 ` [PATCH 32/41] sh: Replace __ASSEMBLY__ with __ASSEMBLER__ in the SuperH headers Thomas Huth
2025-06-07 13:11 ` John Paul Adrian Glaubitz
2025-03-14 7:10 ` [PATCH 33/41] sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:10 ` [PATCH 34/41] sparc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-08-03 13:33 ` John Paul Adrian Glaubitz
2025-08-04 6:01 ` Thomas Huth
2025-08-04 8:00 ` Arnd Bergmann
2025-08-04 18:04 ` David Laight
2025-08-05 9:50 ` Thomas Huth
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-03-14 7:10 ` [PATCH 36/41] x86: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:10 ` [PATCH 37/41] x86: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:10 ` [PATCH 38/41] xtensa: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers Thomas Huth
2025-03-14 7:10 ` [PATCH 39/41] xtensa: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14 7:10 ` [PATCH 40/41] scripts/dtc: Update fdt.h to the latest version Thomas Huth
2025-03-14 20:47 ` Rob Herring
2025-03-17 5:53 ` Thomas Huth
2025-03-14 7:10 ` [PATCH 41/41] treewide: Stop defining __ASSEMBLY__ for assembler files Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250314071013.1575167-22-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=arnd@arndb.de \
--cc=dinguyen@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).