linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: Thomas Huth <thuth@redhat.com>
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	linux-arch@vger.kernel.org, Jonas Bonn <jonas@southpole.se>,
	Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
	linux-openrisc@vger.kernel.org
Subject: Re: [PATCH 23/41] openrisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
Date: Sat, 7 Jun 2025 06:53:56 +0100	[thread overview]
Message-ID: <aEPT9DeL2nfxG_L9@antec> (raw)
In-Reply-To: <20250314071013.1575167-24-thuth@redhat.com>

On Fri, Mar 14, 2025 at 08:09:54AM +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, 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).

Hi Thomas,

I have applied this to the OpenRISC queue, as discussed on 22.

Thanks,

-Stafford

> Cc: Jonas Bonn <jonas@southpole.se>
> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> Cc: Stafford Horne <shorne@gmail.com>
> Cc: linux-openrisc@vger.kernel.org
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  arch/openrisc/include/asm/mmu.h         | 2 +-
>  arch/openrisc/include/asm/page.h        | 8 ++++----
>  arch/openrisc/include/asm/pgtable.h     | 4 ++--
>  arch/openrisc/include/asm/processor.h   | 4 ++--
>  arch/openrisc/include/asm/ptrace.h      | 4 ++--
>  arch/openrisc/include/asm/setup.h       | 2 +-
>  arch/openrisc/include/asm/thread_info.h | 8 ++++----
>  7 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/arch/openrisc/include/asm/mmu.h b/arch/openrisc/include/asm/mmu.h
> index eb720110f3a20..e7826a681bc4a 100644
> --- a/arch/openrisc/include/asm/mmu.h
> +++ b/arch/openrisc/include/asm/mmu.h
> @@ -15,7 +15,7 @@
>  #ifndef __ASM_OPENRISC_MMU_H
>  #define __ASM_OPENRISC_MMU_H
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  typedef unsigned long mm_context_t;
>  #endif
>  
> diff --git a/arch/openrisc/include/asm/page.h b/arch/openrisc/include/asm/page.h
> index c589e96035e15..85797f94d1d74 100644
> --- a/arch/openrisc/include/asm/page.h
> +++ b/arch/openrisc/include/asm/page.h
> @@ -25,7 +25,7 @@
>   */
>  #include <asm/setup.h>
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  
>  #define clear_page(page)	memset((page), 0, PAGE_SIZE)
>  #define copy_page(to, from)	memcpy((to), (from), PAGE_SIZE)
> @@ -55,10 +55,10 @@ typedef struct page *pgtable_t;
>  #define __pgd(x)	((pgd_t) { (x) })
>  #define __pgprot(x)	((pgprot_t) { (x) })
>  
> -#endif /* !__ASSEMBLY__ */
> +#endif /* !__ASSEMBLER__ */
>  
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  
>  #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET))
>  #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
> @@ -73,7 +73,7 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
>  
>  #define virt_addr_valid(kaddr)	(pfn_valid(virt_to_pfn(kaddr)))
>  
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>  
>  #include <asm-generic/memory_model.h>
>  #include <asm-generic/getorder.h>
> diff --git a/arch/openrisc/include/asm/pgtable.h b/arch/openrisc/include/asm/pgtable.h
> index 60c6ce7ff2dcf..cd979bd28ab3b 100644
> --- a/arch/openrisc/include/asm/pgtable.h
> +++ b/arch/openrisc/include/asm/pgtable.h
> @@ -23,7 +23,7 @@
>  
>  #include <asm-generic/pgtable-nopmd.h>
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  #include <asm/mmu.h>
>  #include <asm/fixmap.h>
>  
> @@ -432,5 +432,5 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
>  
>  typedef pte_t *pte_addr_t;
>  
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>  #endif /* __ASM_OPENRISC_PGTABLE_H */
> diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h
> index e05d1b59e24e1..3ff893a67c13b 100644
> --- a/arch/openrisc/include/asm/processor.h
> +++ b/arch/openrisc/include/asm/processor.h
> @@ -39,7 +39,7 @@
>   */
>  #define TASK_UNMAPPED_BASE      (TASK_SIZE / 8 * 3)
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  
>  struct task_struct;
>  
> @@ -78,5 +78,5 @@ void show_registers(struct pt_regs *regs);
>  
>  #define cpu_relax()     barrier()
>  
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>  #endif /* __ASM_OPENRISC_PROCESSOR_H */
> diff --git a/arch/openrisc/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h
> index e5a282b670757..28facf2f3e00c 100644
> --- a/arch/openrisc/include/asm/ptrace.h
> +++ b/arch/openrisc/include/asm/ptrace.h
> @@ -27,7 +27,7 @@
>   * they share a cacheline (not done yet, though... future optimization).
>   */
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  /*
>   * This struct describes how the registers are laid out on the kernel stack
>   * during a syscall or other kernel entry.
> @@ -147,7 +147,7 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
>  	return *(unsigned long *)((unsigned long)regs + offset);
>  }
>  
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>  
>  /*
>   * Offsets used by 'ptrace' system call interface.
> diff --git a/arch/openrisc/include/asm/setup.h b/arch/openrisc/include/asm/setup.h
> index 9acbc5deda691..dce9f4d3b378f 100644
> --- a/arch/openrisc/include/asm/setup.h
> +++ b/arch/openrisc/include/asm/setup.h
> @@ -8,7 +8,7 @@
>  #include <linux/init.h>
>  #include <asm-generic/setup.h>
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  void __init or1k_early_setup(void *fdt);
>  #endif
>  
> diff --git a/arch/openrisc/include/asm/thread_info.h b/arch/openrisc/include/asm/thread_info.h
> index 4af3049c34c21..e338fff7efb0e 100644
> --- a/arch/openrisc/include/asm/thread_info.h
> +++ b/arch/openrisc/include/asm/thread_info.h
> @@ -17,7 +17,7 @@
>  
>  #ifdef __KERNEL__
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  #include <asm/types.h>
>  #include <asm/processor.h>
>  #endif
> @@ -38,7 +38,7 @@
>   * - if the contents of this structure are changed, the assembly constants
>   *   must also be changed
>   */
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  
>  struct thread_info {
>  	struct task_struct	*task;		/* main task structure */
> @@ -58,7 +58,7 @@ struct thread_info {
>   *
>   * preempt_count needs to be 1 initially, until the scheduler is functional.
>   */
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  #define INIT_THREAD_INFO(tsk)				\
>  {							\
>  	.task		= &tsk,				\
> @@ -75,7 +75,7 @@ register struct thread_info *current_thread_info_reg asm("r10");
>  #define get_thread_info(ti) get_task_struct((ti)->task)
>  #define put_thread_info(ti) put_task_struct((ti)->task)
>  
> -#endif /* !__ASSEMBLY__ */
> +#endif /* !__ASSEMBLER__ */
>  
>  /*
>   * thread information flags
> -- 
> 2.48.1
> 

  reply	other threads:[~2025-06-07  5:54 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 ` [PATCH 21/41] nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Thomas Huth
2025-03-14  7:09 ` [PATCH 22/41] openrisc: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers 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 [this message]
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=aEPT9DeL2nfxG_L9@antec \
    --to=shorne@gmail.com \
    --cc=arnd@arndb.de \
    --cc=jonas@southpole.se \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-openrisc@vger.kernel.org \
    --cc=stefan.kristiansson@saunalahti.fi \
    --cc=thuth@redhat.com \
    /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).