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

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

Version: ~ [ linux-5.1-rc1 ] ~ [ linux-5.0.3 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.30 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.107 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.164 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.176 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.136 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.63 ] ~ [ 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-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ 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 /* thread_info.h: h8300 low-level thread information
  3  * adapted from the i386 and PPC versions by Yoshinori Sato <ysato@users.sourceforge.jp>
  4  *
  5  * Copyright (C) 2002  David Howells (dhowells@redhat.com)
  6  * - Incorporating suggestions made by Linus Torvalds and Dave Miller
  7  */
  8 
  9 #ifndef _ASM_THREAD_INFO_H
 10 #define _ASM_THREAD_INFO_H
 11 
 12 #include <asm/page.h>
 13 #include <asm/segment.h>
 14 
 15 #ifdef __KERNEL__
 16 
 17 /*
 18  * Size of kernel stack for each process. This must be a power of 2...
 19  */
 20 #define THREAD_SIZE_ORDER       1
 21 #define THREAD_SIZE             8192    /* 2 pages */
 22 
 23 #ifndef __ASSEMBLY__
 24 
 25 /*
 26  * low level task data.
 27  * If you change this, change the TI_* offsets below to match.
 28  */
 29 struct thread_info {
 30         struct task_struct *task;               /* main task structure */
 31         unsigned long      flags;               /* low level flags */
 32         int                cpu;                 /* cpu we're on */
 33         int                preempt_count;       /* 0 => preemptable, <0 => BUG */
 34         mm_segment_t            addr_limit;
 35 };
 36 
 37 /*
 38  * macros/functions for gaining access to the thread information structure
 39  */
 40 #define INIT_THREAD_INFO(tsk)                   \
 41 {                                               \
 42         .task =         &tsk,                   \
 43         .flags =        0,                      \
 44         .cpu =          0,                      \
 45         .preempt_count = INIT_PREEMPT_COUNT,    \
 46         .addr_limit     = KERNEL_DS,            \
 47 }
 48 
 49 /* how to get the thread information struct from C */
 50 static inline struct thread_info *current_thread_info(void)
 51 {
 52         struct thread_info *ti;
 53 
 54         __asm__("mov.l  sp, %0\n\t"
 55                 "and.w  %1, %T0"
 56                 : "=&r"(ti)
 57                 : "i" (~(THREAD_SIZE-1) & 0xffff));
 58         return ti;
 59 }
 60 
 61 #endif /* __ASSEMBLY__ */
 62 
 63 /*
 64  * thread information flag bit numbers
 65  */
 66 #define TIF_SYSCALL_TRACE       0       /* syscall trace active */
 67 #define TIF_SIGPENDING          1       /* signal pending */
 68 #define TIF_NEED_RESCHED        2       /* rescheduling necessary */
 69 #define TIF_SINGLESTEP          3       /* singlestepping active */
 70 #define TIF_MEMDIE              4       /* is terminating due to OOM killer */
 71 #define TIF_RESTORE_SIGMASK     5       /* restore signal mask in do_signal() */
 72 #define TIF_NOTIFY_RESUME       6       /* callback before returning to user */
 73 #define TIF_SYSCALL_AUDIT       7       /* syscall auditing active */
 74 #define TIF_SYSCALL_TRACEPOINT  8       /* for ftrace syscall instrumentation */
 75 #define TIF_POLLING_NRFLAG      9       /* true if poll_idle() is polling TIF_NEED_RESCHED */
 76 
 77 /* as above, but as bit values */
 78 #define _TIF_SYSCALL_TRACE      (1 << TIF_SYSCALL_TRACE)
 79 #define _TIF_SIGPENDING         (1 << TIF_SIGPENDING)
 80 #define _TIF_NEED_RESCHED       (1 << TIF_NEED_RESCHED)
 81 #define _TIF_NOTIFY_RESUME      (1 << TIF_NOTIFY_RESUME)
 82 #define _TIF_SINGLESTEP         (1 << TIF_SINGLESTEP)
 83 #define _TIF_SYSCALL_AUDIT      (1 << TIF_SYSCALL_AUDIT)
 84 #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
 85 #define _TIF_POLLING_NRFLAG     (1 << TIF_POLLING_NRFLAG)
 86 
 87 /* work to do in syscall trace */
 88 #define _TIF_WORK_SYSCALL_MASK  (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
 89                                  _TIF_SYSCALL_AUDIT | _TIF_SYSCALL_TRACEPOINT)
 90 
 91 /* work to do on any return to u-space */
 92 #define _TIF_ALLWORK_MASK       (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING      | \
 93                                  _TIF_NEED_RESCHED  | _TIF_SYSCALL_AUDIT   | \
 94                                  _TIF_SINGLESTEP    | _TIF_NOTIFY_RESUME   | \
 95                                  _TIF_SYSCALL_TRACEPOINT)
 96 
 97 /* work to do on interrupt/exception return */
 98 #define _TIF_WORK_MASK          (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \
 99                                  _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP))
100 
101 #endif /* __KERNEL__ */
102 
103 #endif /* _ASM_THREAD_INFO_H */
104 

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