arch/loongarch/include/asm/unwind_hints.h

Source file repositories/reference/linux-study-clean/arch/loongarch/include/asm/unwind_hints.h

File Facts

System
Linux kernel
Corpus path
arch/loongarch/include/asm/unwind_hints.h
Extension
.h
Size
791 bytes
Lines
37
Domain
Architecture Layer
Bucket
arch/loongarch
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ASM_LOONGARCH_UNWIND_HINTS_H
#define _ASM_LOONGARCH_UNWIND_HINTS_H

#include <linux/objtool.h>
#include <asm/orc_types.h>

#ifdef __ASSEMBLER__

.macro UNWIND_HINT_UNDEFINED
	UNWIND_HINT type=UNWIND_HINT_TYPE_UNDEFINED
.endm

.macro UNWIND_HINT_END_OF_STACK
	UNWIND_HINT type=UNWIND_HINT_TYPE_END_OF_STACK
.endm

.macro UNWIND_HINT_REGS
	UNWIND_HINT sp_reg=ORC_REG_SP type=UNWIND_HINT_TYPE_REGS
.endm

.macro UNWIND_HINT_FUNC
	UNWIND_HINT sp_reg=ORC_REG_SP type=UNWIND_HINT_TYPE_CALL
.endm

#else /* !__ASSEMBLER__ */

#define UNWIND_HINT_SAVE \
	UNWIND_HINT(UNWIND_HINT_TYPE_SAVE, 0, 0, 0)

#define UNWIND_HINT_RESTORE \
	UNWIND_HINT(UNWIND_HINT_TYPE_RESTORE, 0, 0, 0)

#endif /* !__ASSEMBLER__ */

#endif /* _ASM_LOONGARCH_UNWIND_HINTS_H */

Annotation

Implementation Notes