Commit 438f7cd4 authored by Thomas Huth's avatar Thomas Huth Committed by Michal Simek
Browse files

microblaze: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi 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 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: Michal Simek <monstr@monstr.eu>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/r/20250314071013.1575167-19-thuth@redhat.com


Signed-off-by: default avatarMichal Simek <michal.simek@amd.com>
parent f0bff4e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@

#include <asm/types.h>

#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
#  define stringify_in_c(...)	__VA_ARGS__
#  define ASM_CONST(x)		x
#else
+2 −2
Original line number Diff line number Diff line
@@ -14,13 +14,13 @@
 * but check asm/microblaze/kernel/entry.S to be sure.
 */
#define CURRENT_TASK	r31
# ifndef __ASSEMBLY__
# ifndef __ASSEMBLER__
/*
 * Dedicate r31 to keeping the current task pointer
 */
register struct task_struct *current asm("r31");

# define get_current()	current
# endif /* __ASSEMBLY__ */
# endif /* __ASSEMBLER__ */

#endif /* _ASM_MICROBLAZE_CURRENT_H */
+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@

#define PER_CPU(var) var

# ifndef __ASSEMBLY__
# ifndef __ASSEMBLER__
DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
@@ -29,6 +29,6 @@ DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */

extern asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall);
# endif /* __ASSEMBLY__ */
# endif /* __ASSEMBLER__ */

#endif /* _ASM_MICROBLAZE_ENTRY_H */
+2 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
#define _ASM_MICROBLAZE_EXCEPTIONS_H

#ifdef __KERNEL__
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__

/* Macros to enable and disable HW exceptions in the MSR */
/* Define MSR enable bit for HW exceptions */
@@ -64,6 +64,6 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig);
void die(const char *str, struct pt_regs *fp, long err);
void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);

#endif /*__ASSEMBLY__ */
#endif /*__ASSEMBLER__ */
#endif /* __KERNEL__ */
#endif /* _ASM_MICROBLAZE_EXCEPTIONS_H */
+2 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
#ifndef _ASM_FIXMAP_H
#define _ASM_FIXMAP_H

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
#include <linux/kernel.h>
#include <asm/page.h>
#ifdef CONFIG_HIGHMEM
@@ -62,5 +62,5 @@ extern void __set_fixmap(enum fixed_addresses idx,

#include <asm-generic/fixmap.h>

#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLER__ */
#endif
Loading