arch/nios2/include/asm/processor.h

Source file repositories/reference/linux-study-clean/arch/nios2/include/asm/processor.h

File Facts

System
Linux kernel
Corpus path
arch/nios2/include/asm/processor.h
Extension
.h
Size
1869 bytes
Lines
78
Domain
Architecture Layer
Bucket
arch/nios2
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

struct thread_struct {
	struct pt_regs *kregs;

	/* Context switch saved kernel state. */
	unsigned long ksp;
	unsigned long kpsr;
};

# define INIT_THREAD {			\
	.kregs	= NULL,			\
	.ksp	= 0,			\
	.kpsr	= 0,			\
}

extern void start_thread(struct pt_regs *regs, unsigned long pc,
			unsigned long sp);

struct task_struct;

extern unsigned long __get_wchan(struct task_struct *p);

#define task_pt_regs(p) \
	((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)

/* Used by procfs */
#define KSTK_EIP(tsk)	((tsk)->thread.kregs->ea)
#define KSTK_ESP(tsk)	((tsk)->thread.kregs->sp)

#define cpu_relax()	barrier()

#endif /* __ASSEMBLER__ */

#endif /* _ASM_NIOS2_PROCESSOR_H */

Annotation

Implementation Notes