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

TOMOYO Linux Cross Reference
Linux/arch/m68k/include/asm/thread_info.h

Version: ~ [ linux-5.7-rc7 ] ~ [ linux-5.6.14 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.42 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.124 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.181 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.224 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.224 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.84 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ 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.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_M68K_THREAD_INFO_H
  2 #define _ASM_M68K_THREAD_INFO_H
  3 
  4 #include <asm/types.h>
  5 #include <asm/page.h>
  6 #include <asm/segment.h>
  7 
  8 /*
  9  * On machines with 4k pages we default to an 8k thread size, though we
 10  * allow a 4k with config option. Any other machine page size then
 11  * the thread size must match the page size (which is 8k and larger here).
 12  */
 13 #if PAGE_SHIFT < 13
 14 #ifdef CONFIG_4KSTACKS
 15 #define THREAD_SIZE     4096
 16 #else
 17 #define THREAD_SIZE     8192
 18 #endif
 19 #else
 20 #define THREAD_SIZE     PAGE_SIZE
 21 #endif
 22 #define THREAD_SIZE_ORDER       ((THREAD_SIZE / PAGE_SIZE) - 1)
 23 
 24 #ifndef __ASSEMBLY__
 25 
 26 struct thread_info {
 27         struct task_struct      *task;          /* main task structure */
 28         unsigned long           flags;
 29         struct exec_domain      *exec_domain;   /* execution domain */
 30         mm_segment_t            addr_limit;     /* thread address space */
 31         int                     preempt_count;  /* 0 => preemptable, <0 => BUG */
 32         __u32                   cpu;            /* should always be 0 on m68k */
 33         unsigned long           tp_value;       /* thread pointer */
 34         struct restart_block    restart_block;
 35 };
 36 #endif /* __ASSEMBLY__ */
 37 
 38 #define INIT_THREAD_INFO(tsk)                   \
 39 {                                               \
 40         .task           = &tsk,                 \
 41         .exec_domain    = &default_exec_domain, \
 42         .addr_limit     = KERNEL_DS,            \
 43         .preempt_count  = INIT_PREEMPT_COUNT,   \
 44         .restart_block = {                      \
 45                 .fn = do_no_restart_syscall,    \
 46         },                                      \
 47 }
 48 
 49 #define init_stack              (init_thread_union.stack)
 50 
 51 #ifndef __ASSEMBLY__
 52 /* how to get the thread information struct from C */
 53 static inline struct thread_info *current_thread_info(void)
 54 {
 55         struct thread_info *ti;
 56         __asm__(
 57                 "move.l %%sp, %0 \n\t"
 58                 "and.l  %1, %0"
 59                 : "=&d"(ti)
 60                 : "di" (~(THREAD_SIZE-1))
 61                 );
 62         return ti;
 63 }
 64 #endif
 65 
 66 #define init_thread_info        (init_thread_union.thread_info)
 67 
 68 /* entry.S relies on these definitions!
 69  * bits 0-7 are tested at every exception exit
 70  * bits 8-15 are also tested at syscall exit
 71  */
 72 #define TIF_NOTIFY_RESUME       5       /* callback before returning to user */
 73 #define TIF_SIGPENDING          6       /* signal pending */
 74 #define TIF_NEED_RESCHED        7       /* rescheduling necessary */
 75 #define TIF_DELAYED_TRACE       14      /* single step a syscall */
 76 #define TIF_SYSCALL_TRACE       15      /* syscall trace active */
 77 #define TIF_MEMDIE              16      /* is terminating due to OOM killer */
 78 #define TIF_RESTORE_SIGMASK     18      /* restore signal mask in do_signal */
 79 
 80 #endif  /* _ASM_M68K_THREAD_INFO_H */
 81 

~ [ 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