mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-17 16:00:38 -05: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 a completely mechanical patch (done with a simple "sed -i" statement). Cc: Michal Simek <monstr@monstr.eu> Signed-off-by: Thomas Huth <thuth@redhat.com> Link: https://lore.kernel.org/r/20250314071013.1575167-19-thuth@redhat.com Signed-off-by: Michal Simek <michal.simek@amd.com>
25 lines
593 B
C
25 lines
593 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2006 Atmark Techno, Inc.
|
|
*/
|
|
#ifndef _ASM_MICROBLAZE_PTRACE_H
|
|
#define _ASM_MICROBLAZE_PTRACE_H
|
|
|
|
#include <uapi/asm/ptrace.h>
|
|
|
|
#ifndef __ASSEMBLER__
|
|
#define kernel_mode(regs) ((regs)->pt_mode)
|
|
#define user_mode(regs) (!kernel_mode(regs))
|
|
|
|
#define instruction_pointer(regs) ((regs)->pc)
|
|
#define profile_pc(regs) instruction_pointer(regs)
|
|
#define user_stack_pointer(regs) ((regs)->r1)
|
|
|
|
static inline long regs_return_value(struct pt_regs *regs)
|
|
{
|
|
return regs->r3;
|
|
}
|
|
|
|
#endif /* __ASSEMBLER__ */
|
|
#endif /* _ASM_MICROBLAZE_PTRACE_H */
|