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

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

Version: ~ [ linux-5.18-rc6 ] ~ [ linux-5.17.6 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.38 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.114 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.192 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.241 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.277 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.312 ] ~ [ 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 /*
  2  * Copyright 2004-2010 Analog Devices Inc.
  3  *
  4  * Licensed under the GPL-2 or later.
  5  */
  6 
  7 #ifndef _ASM_THREAD_INFO_H
  8 #define _ASM_THREAD_INFO_H
  9 
 10 #include <asm/page.h>
 11 #include <asm/entry.h>
 12 #include <asm/l1layout.h>
 13 #include <linux/compiler.h>
 14 
 15 #ifdef __KERNEL__
 16 
 17 /* Thread Align Mask to reach to the top of the stack
 18  * for any process
 19  */
 20 #define ALIGN_PAGE_MASK         0xffffe000
 21 
 22 /*
 23  * Size of kernel stack for each process. This must be a power of 2...
 24  */
 25 #define THREAD_SIZE_ORDER       1
 26 #define THREAD_SIZE             8192    /* 2 pages */
 27 #define STACK_WARN              (THREAD_SIZE/8)
 28 
 29 #ifndef __ASSEMBLY__
 30 
 31 typedef unsigned long mm_segment_t;
 32 
 33 /*
 34  * low level task data.
 35  * If you change this, change the TI_* offsets below to match.
 36  */
 37 
 38 struct thread_info {
 39         struct task_struct *task;       /* main task structure */
 40         unsigned long flags;    /* low level flags */
 41         int cpu;                /* cpu we're on */
 42         int preempt_count;      /* 0 => preemptable, <0 => BUG */
 43         mm_segment_t addr_limit;        /* address limit */
 44 #ifndef CONFIG_SMP
 45         struct l1_scratch_task_info l1_task_info;
 46 #endif
 47 };
 48 
 49 /*
 50  * macros/functions for gaining access to the thread information structure
 51  */
 52 #define INIT_THREAD_INFO(tsk)                   \
 53 {                                               \
 54         .task           = &tsk,                 \
 55         .flags          = 0,                    \
 56         .cpu            = 0,                    \
 57         .preempt_count  = INIT_PREEMPT_COUNT,   \
 58 }
 59 #define init_thread_info        (init_thread_union.thread_info)
 60 #define init_stack              (init_thread_union.stack)
 61 
 62 /* Given a task stack pointer, you can find its corresponding
 63  * thread_info structure just by masking it to the THREAD_SIZE
 64  * boundary (currently 8K as you can see above).
 65  */
 66 __attribute_const__
 67 static inline struct thread_info *current_thread_info(void)
 68 {
 69         struct thread_info *ti;
 70         __asm__("%0 = sp;" : "=da"(ti));
 71         return (struct thread_info *)((long)ti & ~((long)THREAD_SIZE-1));
 72 }
 73 
 74 #endif                          /* __ASSEMBLY__ */
 75 
 76 /*
 77  * thread information flag bit numbers
 78  */
 79 #define TIF_SYSCALL_TRACE       0       /* syscall trace active */
 80 #define TIF_SIGPENDING          1       /* signal pending */
 81 #define TIF_NEED_RESCHED        2       /* rescheduling necessary */
 82 #define TIF_MEMDIE              4       /* is terminating due to OOM killer */
 83 #define TIF_RESTORE_SIGMASK     5       /* restore signal mask in do_signal() */
 84 #define TIF_IRQ_SYNC            7       /* sync pipeline stage */
 85 #define TIF_NOTIFY_RESUME       8       /* callback before returning to user */
 86 #define TIF_SINGLESTEP          9
 87 
 88 /* as above, but as bit values */
 89 #define _TIF_SYSCALL_TRACE      (1<<TIF_SYSCALL_TRACE)
 90 #define _TIF_SIGPENDING         (1<<TIF_SIGPENDING)
 91 #define _TIF_NEED_RESCHED       (1<<TIF_NEED_RESCHED)
 92 #define _TIF_IRQ_SYNC           (1<<TIF_IRQ_SYNC)
 93 #define _TIF_NOTIFY_RESUME      (1<<TIF_NOTIFY_RESUME)
 94 #define _TIF_SINGLESTEP         (1<<TIF_SINGLESTEP)
 95 
 96 #define _TIF_WORK_MASK          0x0000FFFE      /* work to do on interrupt/exception return */
 97 
 98 #endif                          /* __KERNEL__ */
 99 
100 #endif                          /* _ASM_THREAD_INFO_H */
101 

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