mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-19 06:38:26 -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 now on the __ASSEMBLER__ macro that is provided by the compilers. This is a mostly mechanical patch (done with a simple "sed -i" statement), except for the following files where comments with mis-spelled macros were tweaked manually: arch/arm64/include/asm/stacktrace/frame.h arch/arm64/include/asm/kvm_ptrauth.h arch/arm64/include/asm/debug-monitors.h arch/arm64/include/asm/esr.h arch/arm64/include/asm/scs.h arch/arm64/include/asm/memory.h Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef __ASM_STACKTRACE_FRAME_H
|
|
#define __ASM_STACKTRACE_FRAME_H
|
|
|
|
/*
|
|
* - FRAME_META_TYPE_NONE
|
|
*
|
|
* This value is reserved.
|
|
*
|
|
* - FRAME_META_TYPE_FINAL
|
|
*
|
|
* The record is the last entry on the stack.
|
|
* Unwinding should terminate successfully.
|
|
*
|
|
* - FRAME_META_TYPE_PT_REGS
|
|
*
|
|
* The record is embedded within a struct pt_regs, recording the registers at
|
|
* an arbitrary point in time.
|
|
* Unwinding should consume pt_regs::pc, followed by pt_regs::lr.
|
|
*
|
|
* Note: all other values are reserved and should result in unwinding
|
|
* terminating with an error.
|
|
*/
|
|
#define FRAME_META_TYPE_NONE 0
|
|
#define FRAME_META_TYPE_FINAL 1
|
|
#define FRAME_META_TYPE_PT_REGS 2
|
|
|
|
#ifndef __ASSEMBLER__
|
|
/*
|
|
* A standard AAPCS64 frame record.
|
|
*/
|
|
struct frame_record {
|
|
u64 fp;
|
|
u64 lr;
|
|
};
|
|
|
|
/*
|
|
* A metadata frame record indicating a special unwind.
|
|
* The record::{fp,lr} fields must be zero to indicate the presence of
|
|
* metadata.
|
|
*/
|
|
struct frame_record_meta {
|
|
struct frame_record record;
|
|
u64 type;
|
|
};
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif /* __ASM_STACKTRACE_FRAME_H */
|