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

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

Version: ~ [ linux-5.16 ] ~ [ linux-5.15.13 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.90 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.170 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.224 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.261 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.296 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.298 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ 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 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_M68K_THREAD_INFO_H
  3 #define _ASM_M68K_THREAD_INFO_H
  4 
  5 #include <asm/types.h>
  6 #include <asm/page.h>
  7 #include <asm/segment.h>
  8 
  9 /*
 10  * On machines with 4k pages we default to an 8k thread size, though we
 11  * allow a 4k with config option. Any other machine page size then
 12  * the thread size must match the page size (which is 8k and larger here).
 13  */
 14 #if PAGE_SHIFT < 13
 15 #ifdef CONFIG_4KSTACKS
 16 #define THREAD_SIZE     4096
 17 #else
 18 #define THREAD_SIZE     8192
 19 #endif
 20 #else
 21 #define THREAD_SIZE     PAGE_SIZE
 22 #endif
 23 #define THREAD_SIZE_ORDER       ((THREAD_SIZE / PAGE_SIZE) - 1)
 24 
 25 #ifndef __ASSEMBLY__
 26 
 27 struct thread_info {
 28         struct task_struct      *task;          /* main task structure */
 29         unsigned long           flags;
 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 };
 35 #endif /* __ASSEMBLY__ */
 36 
 37 #define INIT_THREAD_INFO(tsk)                   \
 38 {                                               \
 39         .task           = &tsk,                 \
 40         .addr_limit     = KERNEL_DS,            \
 41         .preempt_count  = INIT_PREEMPT_COUNT,   \
 42 }
 43 
 44 #ifndef __ASSEMBLY__
 45 /* how to get the thread information struct from C */
 46 static inline struct thread_info *current_thread_info(void)
 47 {
 48         struct thread_info *ti;
 49         __asm__(
 50                 "move.l %%sp, %0 \n\t"
 51                 "and.l  %1, %0"
 52                 : "=&d"(ti)
 53                 : "di" (~(THREAD_SIZE-1))
 54                 );
 55         return ti;
 56 }
 57 #endif
 58 
 59 /* entry.S relies on these definitions!
 60  * bits 0-7 are tested at every exception exit
 61  * bits 8-15 are also tested at syscall exit
 62  */
 63 #define TIF_NOTIFY_RESUME       5       /* callback before returning to user */
 64 #define TIF_SIGPENDING          6       /* signal pending */
 65 #define TIF_NEED_RESCHED        7       /* rescheduling necessary */
 66 #define TIF_DELAYED_TRACE       14      /* single step a syscall */
 67 #define TIF_SYSCALL_TRACE       15      /* syscall trace active */
 68 #define TIF_MEMDIE              16      /* is terminating due to OOM killer */
 69 #define TIF_RESTORE_SIGMASK     18      /* restore signal mask in do_signal */
 70 
 71 #endif  /* _ASM_M68K_THREAD_INFO_H */
 72 

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