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

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

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Thread support for the Hexagon architecture
  4  *
  5  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  6  */
  7 
  8 #ifndef _ASM_THREAD_INFO_H
  9 #define _ASM_THREAD_INFO_H
 10 
 11 #ifdef __KERNEL__
 12 
 13 #ifndef __ASSEMBLY__
 14 #include <asm/processor.h>
 15 #include <asm/registers.h>
 16 #include <asm/page.h>
 17 #endif
 18 
 19 #define THREAD_SHIFT            12
 20 #define THREAD_SIZE             (1<<THREAD_SHIFT)
 21 #define THREAD_SIZE_ORDER       (THREAD_SHIFT - PAGE_SHIFT)
 22 
 23 #ifndef __ASSEMBLY__
 24 
 25 /*
 26  * This is union'd with the "bottom" of the kernel stack.
 27  * It keeps track of thread info which is handy for routines
 28  * to access quickly.
 29  */
 30 
 31 struct thread_info {
 32         struct task_struct      *task;          /* main task structure */
 33         unsigned long           flags;          /* low level flags */
 34         __u32                   cpu;            /* current cpu */
 35         int                     preempt_count;  /* 0=>preemptible,<0=>BUG */
 36         /*
 37          * used for syscalls somehow;
 38          * seems to have a function pointer and four arguments
 39          */
 40         /* Points to the current pt_regs frame  */
 41         struct pt_regs          *regs;
 42         /*
 43          * saved kernel sp at switch_to time;
 44          * not sure if this is used (it's not in the VM model it seems;
 45          * see thread_struct)
 46          */
 47         unsigned long           sp;
 48 };
 49 
 50 #else /* !__ASSEMBLY__ */
 51 
 52 #include <asm/asm-offsets.h>
 53 
 54 #endif  /* __ASSEMBLY__  */
 55 
 56 #ifndef __ASSEMBLY__
 57 
 58 #define INIT_THREAD_INFO(tsk)                   \
 59 {                                               \
 60         .task           = &tsk,                 \
 61         .flags          = 0,                    \
 62         .cpu            = 0,                    \
 63         .preempt_count  = 1,                    \
 64         .sp = 0,                                \
 65         .regs = NULL,                   \
 66 }
 67 
 68 /* Tacky preprocessor trickery */
 69 #define qqstr(s) qstr(s)
 70 #define qstr(s) #s
 71 #define QUOTED_THREADINFO_REG qqstr(THREADINFO_REG)
 72 
 73 register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
 74 #define current_thread_info()  __current_thread_info
 75 
 76 #endif /* __ASSEMBLY__ */
 77 
 78 /*
 79  * thread information flags
 80  * - these are process state flags that various assembly files
 81  *   may need to access
 82  * - pending work-to-be-done flags are in LSW
 83  * - other flags in MSW
 84  */
 85 
 86 #define TIF_SYSCALL_TRACE       0       /* syscall trace active */
 87 #define TIF_NOTIFY_RESUME       1       /* resumption notification requested */
 88 #define TIF_SIGPENDING          2       /* signal pending */
 89 #define TIF_NEED_RESCHED        3       /* rescheduling necessary */
 90 #define TIF_SINGLESTEP          4       /* restore ss @ return to usr mode */
 91 #define TIF_RESTORE_SIGMASK     6       /* restore sig mask in do_signal() */
 92 #define TIF_NOTIFY_SIGNAL       7       /* signal notifications exist */
 93 /* true if poll_idle() is polling TIF_NEED_RESCHED */
 94 #define TIF_MEMDIE              17      /* OOM killer killed process */
 95 
 96 #define _TIF_SYSCALL_TRACE      (1 << TIF_SYSCALL_TRACE)
 97 #define _TIF_NOTIFY_RESUME      (1 << TIF_NOTIFY_RESUME)
 98 #define _TIF_SIGPENDING         (1 << TIF_SIGPENDING)
 99 #define _TIF_NEED_RESCHED       (1 << TIF_NEED_RESCHED)
100 #define _TIF_SINGLESTEP         (1 << TIF_SINGLESTEP)
101 #define _TIF_NOTIFY_SIGNAL      (1 << TIF_NOTIFY_SIGNAL)
102 
103 /* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */
104 #define _TIF_WORK_MASK          (0x0000FFFF & ~_TIF_SYSCALL_TRACE)
105 
106 /* work to do on any return to u-space */
107 #define _TIF_ALLWORK_MASK       0x0000FFFF
108 
109 #endif /* __KERNEL__ */
110 
111 #endif
112 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php