0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef _ASM_THREAD_INFO_H
0013 #define _ASM_THREAD_INFO_H
0014
0015 #ifdef __KERNEL__
0016
0017 #ifndef __ASSEMBLY__
0018
0019 #include <asm/ptrace.h>
0020 #include <asm/page.h>
0021
0022
0023
0024
0025
0026
0027 #define NSWINS 8
0028 struct thread_info {
0029 unsigned long uwinmask;
0030 struct task_struct *task;
0031 unsigned long flags;
0032 int cpu;
0033 int preempt_count;
0034
0035 int softirq_count;
0036 int hardirq_count;
0037
0038 u32 __unused;
0039
0040
0041 unsigned long ksp;
0042 unsigned long kpc;
0043 unsigned long kpsr;
0044 unsigned long kwim;
0045
0046
0047
0048
0049 struct reg_window32 reg_window[NSWINS];
0050 unsigned long rwbuf_stkptrs[NSWINS];
0051 unsigned long w_saved;
0052 };
0053
0054
0055
0056
0057 #define INIT_THREAD_INFO(tsk) \
0058 { \
0059 .uwinmask = 0, \
0060 .task = &tsk, \
0061 .flags = 0, \
0062 .cpu = 0, \
0063 .preempt_count = INIT_PREEMPT_COUNT, \
0064 }
0065
0066
0067 register struct thread_info *current_thread_info_reg asm("g6");
0068 #define current_thread_info() (current_thread_info_reg)
0069
0070
0071
0072
0073 #define THREAD_SIZE_ORDER 1
0074
0075 #endif
0076
0077
0078 #define THREAD_SIZE (2 * PAGE_SIZE)
0079
0080
0081
0082
0083
0084 #define TI_UWINMASK 0x00
0085 #define TI_TASK 0x04
0086 #define TI_FLAGS 0x08
0087 #define TI_CPU 0x0c
0088 #define TI_PREEMPT 0x10
0089 #define TI_SOFTIRQ 0x14
0090 #define TI_HARDIRQ 0x18
0091 #define TI_KSP 0x20
0092 #define TI_KPC 0x24
0093 #define TI_KPSR 0x28
0094 #define TI_KWIM 0x2c
0095 #define TI_REG_WINDOW 0x30
0096 #define TI_RWIN_SPTRS 0x230
0097 #define TI_W_SAVED 0x250
0098
0099
0100
0101
0102 #define TIF_SYSCALL_TRACE 0
0103 #define TIF_NOTIFY_RESUME 1
0104 #define TIF_SIGPENDING 2
0105 #define TIF_NEED_RESCHED 3
0106 #define TIF_RESTORE_SIGMASK 4
0107 #define TIF_NOTIFY_SIGNAL 5
0108 #define TIF_USEDFPU 8
0109
0110 #define TIF_POLLING_NRFLAG 9
0111
0112 #define TIF_MEMDIE 10
0113
0114
0115 #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
0116 #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
0117 #define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
0118 #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
0119 #define _TIF_NOTIFY_SIGNAL (1<<TIF_NOTIFY_SIGNAL)
0120 #define _TIF_USEDFPU (1<<TIF_USEDFPU)
0121 #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
0122
0123 #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \
0124 _TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)
0125
0126 #define is_32bit_task() (1)
0127
0128 #endif
0129
0130 #endif