arch/loongarch/include/asm/branch.h

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

File Facts

System
Linux kernel
Corpus path
arch/loongarch/include/asm/branch.h
Extension
.h
Size
388 bytes
Lines
21
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_BRANCH_H
#define _ASM_BRANCH_H

#include <asm/ptrace.h>

static inline unsigned long exception_era(struct pt_regs *regs)
{
	return regs->csr_era;
}

static inline void compute_return_era(struct pt_regs *regs)
{
	regs->csr_era += 4;
}

#endif /* _ASM_BRANCH_H */

Annotation

Implementation Notes