Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / arm64 / include / asm / stacktrace / frame.h
blob0ee0f6ba0fd86423d8ab83f4c79ad0eae5e835bc
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef __ASM_STACKTRACE_FRAME_H
3 #define __ASM_STACKTRACE_FRAME_H
5 /*
6 * - FRAME_META_TYPE_NONE
8 * This value is reserved.
10 * - FRAME_META_TYPE_FINAL
12 * The record is the last entry on the stack.
13 * Unwinding should terminate successfully.
15 * - FRAME_META_TYPE_PT_REGS
17 * The record is embedded within a struct pt_regs, recording the registers at
18 * an arbitrary point in time.
19 * Unwinding should consume pt_regs::pc, followed by pt_regs::lr.
21 * Note: all other values are reserved and should result in unwinding
22 * terminating with an error.
24 #define FRAME_META_TYPE_NONE 0
25 #define FRAME_META_TYPE_FINAL 1
26 #define FRAME_META_TYPE_PT_REGS 2
28 #ifndef __ASSEMBLY__
29 /*
30 * A standard AAPCS64 frame record.
32 struct frame_record {
33 u64 fp;
34 u64 lr;
38 * A metadata frame record indicating a special unwind.
39 * The record::{fp,lr} fields must be zero to indicate the presence of
40 * metadata.
42 struct frame_record_meta {
43 struct frame_record record;
44 u64 type;
46 #endif /* __ASSEMBLY */
48 #endif /* __ASM_STACKTRACE_FRAME_H */