Commit 44a4ef59 authored by Thomas Huth's avatar Thomas Huth Committed by Max Filippov
Browse files

xtensa: 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: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Message-Id: <20250314071013.1575167-40-thuth@redhat.com>
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent da787016
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
#define BP_TAG_FIRST		0x7B0B  /* first tag with a version number */
#define BP_TAG_LAST 		0x7E0B	/* last tag */

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__

/* All records are aligned to 4 bytes */

+2 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
#ifndef _XTENSA_CMPXCHG_H
#define _XTENSA_CMPXCHG_H

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__

#include <linux/bits.h>
#include <linux/stringify.h>
@@ -220,6 +220,6 @@ __arch_xchg(unsigned long x, volatile void * ptr, int size)
	}
}

#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */

#endif /* _XTENSA_CMPXCHG_H */
+4 −4
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
#include <asm/core.h>
#include <asm/types.h>

#ifdef __ASSEMBLY__
#ifdef __ASSEMBLER__
# include <variant/tie-asm.h>

.macro	xchal_sa_start  a b
@@ -69,7 +69,7 @@



#endif	/* __ASSEMBLY__ */
#endif	/* __ASSEMBLER__ */

/*
 * XTENSA_HAVE_COPROCESSOR(x) returns 1 if coprocessor x is configured.
@@ -87,7 +87,7 @@
#define XTENSA_HAVE_IO_PORTS						\
	XCHAL_CP_PORT_MASK

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__

/*
 * Additional registers.
@@ -151,5 +151,5 @@ void local_coprocessors_flush_release_all(void);

#endif	/* XTENSA_HAVE_COPROCESSORS */

#endif	/* !__ASSEMBLY__ */
#endif	/* !__ASSEMBLER__ */
#endif	/* _XTENSA_COPROCESSOR_H */
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@

#include <asm/thread_info.h>

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__

#include <linux/thread_info.h>

+4 −4
Original line number Diff line number Diff line
@@ -12,20 +12,20 @@

#include <asm/processor.h>

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
extern unsigned long return_address(unsigned level);
#define ftrace_return_address(n) return_address(n)
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */

#ifdef CONFIG_FUNCTION_TRACER

#define MCOUNT_ADDR ((unsigned long)(_mcount))
#define MCOUNT_INSN_SIZE 3

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLER__
extern void _mcount(void);
#define mcount _mcount
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLER__ */
#endif /* CONFIG_FUNCTION_TRACER */

#endif /* _XTENSA_FTRACE_H */
Loading