~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/score/include/asm/processor.h

Version: ~ [ linux-6.1-rc7 ] ~ [ linux-6.0.10 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.80 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.156 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.225 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.267 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.300 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.334 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_SCORE_PROCESSOR_H
  2 #define _ASM_SCORE_PROCESSOR_H
  3 
  4 #include <linux/cpumask.h>
  5 #include <linux/threads.h>
  6 
  7 #include <asm/segment.h>
  8 
  9 struct task_struct;
 10 
 11 /*
 12  * System setup and hardware flags..
 13  */
 14 extern void (*cpu_wait)(void);
 15 
 16 extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
 17 extern unsigned long thread_saved_pc(struct task_struct *tsk);
 18 extern void start_thread(struct pt_regs *regs,
 19                         unsigned long pc, unsigned long sp);
 20 extern unsigned long get_wchan(struct task_struct *p);
 21 
 22 /*
 23  * Return current * instruction pointer ("program counter").
 24  */
 25 #define current_text_addr() ({ __label__ _l; _l: &&_l; })
 26 
 27 #define cpu_relax()             barrier()
 28 #define release_thread(thread)  do {} while (0)
 29 #define prepare_to_copy(tsk)    do {} while (0)
 30 
 31 /*
 32  * User space process size: 2GB. This is hardcoded into a few places,
 33  * so don't change it unless you know what you are doing.
 34  */
 35 #define TASK_SIZE       0x7fff8000UL
 36 
 37 /*
 38  * This decides where the kernel will search for a free chunk of vm
 39  * space during mmap's.
 40  */
 41 #define TASK_UNMAPPED_BASE      ((TASK_SIZE / 3) & ~(PAGE_SIZE))
 42 
 43 #ifdef __KERNEL__
 44 #define STACK_TOP       TASK_SIZE
 45 #define STACK_TOP_MAX   TASK_SIZE
 46 #endif
 47 
 48 /*
 49  * If you change thread_struct remember to change the #defines below too!
 50  */
 51 struct thread_struct {
 52         unsigned long reg0, reg2, reg3;
 53         unsigned long reg12, reg13, reg14, reg15, reg16;
 54         unsigned long reg17, reg18, reg19, reg20, reg21;
 55 
 56         unsigned long cp0_psr;
 57         unsigned long cp0_ema;          /* Last user fault */
 58         unsigned long cp0_badvaddr;     /* Last user fault */
 59         unsigned long cp0_baduaddr;     /* Last kernel fault accessing USEG */
 60         unsigned long error_code;
 61         unsigned long trap_no;
 62 
 63         unsigned long mflags;
 64         unsigned long reg29;
 65 
 66         unsigned long single_step;
 67         unsigned long ss_nextcnt;
 68 
 69         unsigned long insn1_type;
 70         unsigned long addr1;
 71         unsigned long insn1;
 72 
 73         unsigned long insn2_type;
 74         unsigned long addr2;
 75         unsigned long insn2;
 76 
 77         mm_segment_t current_ds;
 78 };
 79 
 80 #define INIT_THREAD {                                           \
 81         .reg0                   = 0,                            \
 82         .reg2                   = 0,                            \
 83         .reg3                   = 0,                            \
 84         .reg12                  = 0,                            \
 85         .reg13                  = 0,                            \
 86         .reg14                  = 0,                            \
 87         .reg15                  = 0,                            \
 88         .reg16                  = 0,                            \
 89         .reg17                  = 0,                            \
 90         .reg18                  = 0,                            \
 91         .reg19                  = 0,                            \
 92         .reg20                  = 0,                            \
 93         .reg21                  = 0,                            \
 94         .cp0_psr                = 0,                            \
 95         .error_code             = 0,                            \
 96         .trap_no                = 0,                            \
 97 }
 98 
 99 #define kstk_tos(tsk)           \
100         ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32)
101 #define task_pt_regs(tsk)       ((struct pt_regs *)kstk_tos(tsk) - 1)
102 
103 #define KSTK_EIP(tsk)           (task_pt_regs(tsk)->cp0_epc)
104 #define KSTK_ESP(tsk)           (task_pt_regs(tsk)->regs[29])
105 
106 #endif /* _ASM_SCORE_PROCESSOR_H */
107 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp