arm64: dts: Revert "specify console via command line"
[linux/fpc-iii.git] / arch / unicore32 / include / asm / processor.h
blob6f01620da3d10c6f5a37ab081585766d060a5b2c
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * linux/arch/unicore32/include/asm/processor.h
5 * Code specific to PKUnity SoC and UniCore ISA
7 * Copyright (C) 2001-2010 GUAN Xue-tao
8 */
10 #ifndef __UNICORE_PROCESSOR_H__
11 #define __UNICORE_PROCESSOR_H__
13 #ifdef __KERNEL__
15 #include <asm/ptrace.h>
16 #include <asm/types.h>
18 #ifdef __KERNEL__
19 #define STACK_TOP TASK_SIZE
20 #define STACK_TOP_MAX TASK_SIZE
21 #endif
23 struct debug_entry {
24 u32 address;
25 u32 insn;
28 struct debug_info {
29 int nsaved;
30 struct debug_entry bp[2];
33 struct thread_struct {
34 /* fault info */
35 unsigned long address;
36 unsigned long trap_no;
37 unsigned long error_code;
38 /* debugging */
39 struct debug_info debug;
42 #define INIT_THREAD { }
44 #define start_thread(regs, pc, sp) \
45 ({ \
46 unsigned long *stack = (unsigned long *)sp; \
47 memset(regs->uregs, 0, sizeof(regs->uregs)); \
48 regs->UCreg_asr = USER_MODE; \
49 regs->UCreg_pc = pc & ~1; /* pc */ \
50 regs->UCreg_sp = sp; /* sp */ \
51 regs->UCreg_02 = stack[2]; /* r2 (envp) */ \
52 regs->UCreg_01 = stack[1]; /* r1 (argv) */ \
53 regs->UCreg_00 = stack[0]; /* r0 (argc) */ \
56 /* Forward declaration, a strange C thing */
57 struct task_struct;
59 /* Free all resources held by a thread. */
60 extern void release_thread(struct task_struct *);
62 unsigned long get_wchan(struct task_struct *p);
64 #define cpu_relax() barrier()
66 #define task_pt_regs(p) \
67 ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1)
69 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->UCreg_pc)
70 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->UCreg_sp)
72 #endif
74 #endif /* __UNICORE_PROCESSOR_H__ */