mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

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 almost a completely mechanical patch (done with a simple "sed -i" statement), with one comment tweaked manually in arch/m68k/include/asm/mac_baboon.h (which was missing underscores). Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Greg Ungerer <gerg@linux-m68k.org> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/20250611114056.118309-3-thuth@redhat.com Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
28 lines
645 B
C
28 lines
645 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _M68K_PTRACE_H
|
|
#define _M68K_PTRACE_H
|
|
|
|
#include <uapi/asm/ptrace.h>
|
|
|
|
#ifndef __ASSEMBLER__
|
|
|
|
#ifndef PS_S
|
|
#define PS_S (0x2000)
|
|
#define PS_M (0x1000)
|
|
#endif
|
|
|
|
#define user_mode(regs) (!((regs)->sr & PS_S))
|
|
#define instruction_pointer(regs) ((regs)->pc)
|
|
#define profile_pc(regs) instruction_pointer(regs)
|
|
#define current_pt_regs() \
|
|
(struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1
|
|
#define current_user_stack_pointer() rdusp()
|
|
|
|
#define arch_has_single_step() (1)
|
|
|
|
#ifdef CONFIG_MMU
|
|
#define arch_has_block_step() (1)
|
|
#endif
|
|
|
|
#endif /* __ASSEMBLER__ */
|
|
#endif /* _M68K_PTRACE_H */
|