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

TOMOYO Linux Cross Reference
Linux/arch/sparc/include/asm/thread_info_32.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 */
  2 /*
  3  * thread_info.h: sparc low-level thread information
  4  * adapted from the ppc version by Pete Zaitcev, which was
  5  * adapted from the i386 version by Paul Mackerras
  6  *
  7  * Copyright (C) 2002  David Howells (dhowells@redhat.com)
  8  * Copyright (c) 2002  Pete Zaitcev (zaitcev@yahoo.com)
  9  * - Incorporating suggestions made by Linus Torvalds and Dave Miller
 10  */
 11 
 12 #ifndef _ASM_THREAD_INFO_H
 13 #define _ASM_THREAD_INFO_H
 14 
 15 #ifdef __KERNEL__
 16 
 17 #ifndef __ASSEMBLY__
 18 
 19 #include <asm/ptrace.h>
 20 #include <asm/page.h>
 21 
 22 /*
 23  * Low level task data.
 24  *
 25  * If you change this, change the TI_* offsets below to match.
 26  */
 27 #define NSWINS 8
 28 struct thread_info {
 29         unsigned long           uwinmask;
 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,
 34                                                    <0 => BUG */
 35         int                     softirq_count;
 36         int                     hardirq_count;
 37 
 38         u32 __unused;
 39 
 40         /* Context switch saved kernel state. */
 41         unsigned long ksp;      /* ... ksp __attribute__ ((aligned (8))); */
 42         unsigned long kpc;
 43         unsigned long kpsr;
 44         unsigned long kwim;
 45 
 46         /* A place to store user windows and stack pointers
 47          * when the stack needs inspection.
 48          */
 49         struct reg_window32     reg_window[NSWINS];     /* align for ldd! */
 50         unsigned long           rwbuf_stkptrs[NSWINS];
 51         unsigned long           w_saved;
 52 };
 53 
 54 /*
 55  * macros/functions for gaining access to the thread information structure
 56  */
 57 #define INIT_THREAD_INFO(tsk)                           \
 58 {                                                       \
 59         .uwinmask       =       0,                      \
 60         .task           =       &tsk,                   \
 61         .flags          =       0,                      \
 62         .cpu            =       0,                      \
 63         .preempt_count  =       INIT_PREEMPT_COUNT,     \
 64 }
 65 
 66 /* how to get the thread information struct from C */
 67 register struct thread_info *current_thread_info_reg asm("g6");
 68 #define current_thread_info()   (current_thread_info_reg)
 69 
 70 /*
 71  * thread information allocation
 72  */
 73 #define THREAD_SIZE_ORDER  1
 74 
 75 #endif /* __ASSEMBLY__ */
 76 
 77 /* Size of kernel stack for each process */
 78 #define THREAD_SIZE             (2 * PAGE_SIZE)
 79 
 80 /*
 81  * Offsets in thread_info structure, used in assembly code
 82  * The "#define REGWIN_SZ 0x40" was abolished, so no multiplications.
 83  */
 84 #define TI_UWINMASK     0x00    /* uwinmask */
 85 #define TI_TASK         0x04
 86 #define TI_FLAGS        0x08
 87 #define TI_CPU          0x0c
 88 #define TI_PREEMPT      0x10    /* preempt_count */
 89 #define TI_SOFTIRQ      0x14    /* softirq_count */
 90 #define TI_HARDIRQ      0x18    /* hardirq_count */
 91 #define TI_KSP          0x20    /* ksp */
 92 #define TI_KPC          0x24    /* kpc (ldd'ed with kpc) */
 93 #define TI_KPSR         0x28    /* kpsr */
 94 #define TI_KWIM         0x2c    /* kwim (ldd'ed with kpsr) */
 95 #define TI_REG_WINDOW   0x30
 96 #define TI_RWIN_SPTRS   0x230
 97 #define TI_W_SAVED      0x250
 98 
 99 /*
100  * thread information flag bit numbers
101  */
102 #define TIF_SYSCALL_TRACE       0       /* syscall trace active */
103 #define TIF_NOTIFY_RESUME       1       /* callback before returning to user */
104 #define TIF_SIGPENDING          2       /* signal pending */
105 #define TIF_NEED_RESCHED        3       /* rescheduling necessary */
106 #define TIF_RESTORE_SIGMASK     4       /* restore signal mask in do_signal() */
107 #define TIF_NOTIFY_SIGNAL       5       /* signal notifications exist */
108 #define TIF_USEDFPU             8       /* FPU was used by this task
109                                          * this quantum (SMP) */
110 #define TIF_POLLING_NRFLAG      9       /* true if poll_idle() is polling
111                                          * TIF_NEED_RESCHED */
112 #define TIF_MEMDIE              10      /* is terminating due to OOM killer */
113 
114 /* as above, but as bit values */
115 #define _TIF_SYSCALL_TRACE      (1<<TIF_SYSCALL_TRACE)
116 #define _TIF_NOTIFY_RESUME      (1<<TIF_NOTIFY_RESUME)
117 #define _TIF_SIGPENDING         (1<<TIF_SIGPENDING)
118 #define _TIF_NEED_RESCHED       (1<<TIF_NEED_RESCHED)
119 #define _TIF_NOTIFY_SIGNAL      (1<<TIF_NOTIFY_SIGNAL)
120 #define _TIF_USEDFPU            (1<<TIF_USEDFPU)
121 #define _TIF_POLLING_NRFLAG     (1<<TIF_POLLING_NRFLAG)
122 
123 #define _TIF_DO_NOTIFY_RESUME_MASK      (_TIF_NOTIFY_RESUME | \
124                                          _TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)
125 
126 #define is_32bit_task() (1)
127 
128 #endif /* __KERNEL__ */
129 
130 #endif /* _ASM_THREAD_INFO_H */
131 

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