thread_info.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * S390 version
  3. * Copyright IBM Corp. 2002, 2006
  4. * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
  5. */
  6. #ifndef _ASM_THREAD_INFO_H
  7. #define _ASM_THREAD_INFO_H
  8. #include <linux/const.h>
  9. /*
  10. * Size of kernel stack for each process
  11. */
  12. #define THREAD_SIZE_ORDER 2
  13. #define ASYNC_ORDER 2
  14. #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
  15. #define ASYNC_SIZE (PAGE_SIZE << ASYNC_ORDER)
  16. #ifndef __ASSEMBLY__
  17. #include <asm/lowcore.h>
  18. #include <asm/page.h>
  19. #include <asm/processor.h>
  20. /*
  21. * low level task data that entry.S needs immediate access to
  22. * - this struct should fit entirely inside of one cache line
  23. * - this struct shares the supervisor stack pages
  24. * - if the contents of this structure are changed, the assembly constants must also be changed
  25. */
  26. struct thread_info {
  27. unsigned long flags; /* low level flags */
  28. };
  29. /*
  30. * macros/functions for gaining access to the thread information structure
  31. */
  32. #define INIT_THREAD_INFO(tsk) \
  33. { \
  34. .flags = 0, \
  35. }
  36. #define init_stack (init_thread_union.stack)
  37. void arch_release_task_struct(struct task_struct *tsk);
  38. int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
  39. #endif
  40. /*
  41. * thread information flags bit numbers
  42. */
  43. /* _TIF_WORK bits */
  44. #define TIF_NOTIFY_RESUME 0 /* callback before returning to user */
  45. #define TIF_SIGPENDING 1 /* signal pending */
  46. #define TIF_NEED_RESCHED 2 /* rescheduling necessary */
  47. #define TIF_UPROBE 3 /* breakpointed or single-stepping */
  48. #define TIF_GUARDED_STORAGE 4 /* load guarded storage control block */
  49. #define TIF_PATCH_PENDING 5 /* pending live patching update */
  50. #define TIF_31BIT 16 /* 32bit process */
  51. #define TIF_MEMDIE 17 /* is terminating due to OOM killer */
  52. #define TIF_RESTORE_SIGMASK 18 /* restore signal mask in do_signal() */
  53. #define TIF_SINGLE_STEP 19 /* This task is single stepped */
  54. #define TIF_BLOCK_STEP 20 /* This task is block stepped */
  55. #define TIF_UPROBE_SINGLESTEP 21 /* This task is uprobe single stepped */
  56. /* _TIF_TRACE bits */
  57. #define TIF_SYSCALL_TRACE 24 /* syscall trace active */
  58. #define TIF_SYSCALL_AUDIT 25 /* syscall auditing active */
  59. #define TIF_SECCOMP 26 /* secure computing */
  60. #define TIF_SYSCALL_TRACEPOINT 27 /* syscall tracepoint instrumentation */
  61. #define _TIF_NOTIFY_RESUME _BITUL(TIF_NOTIFY_RESUME)
  62. #define _TIF_SIGPENDING _BITUL(TIF_SIGPENDING)
  63. #define _TIF_NEED_RESCHED _BITUL(TIF_NEED_RESCHED)
  64. #define _TIF_UPROBE _BITUL(TIF_UPROBE)
  65. #define _TIF_GUARDED_STORAGE _BITUL(TIF_GUARDED_STORAGE)
  66. #define _TIF_PATCH_PENDING _BITUL(TIF_PATCH_PENDING)
  67. #define _TIF_31BIT _BITUL(TIF_31BIT)
  68. #define _TIF_SINGLE_STEP _BITUL(TIF_SINGLE_STEP)
  69. #define _TIF_SYSCALL_TRACE _BITUL(TIF_SYSCALL_TRACE)
  70. #define _TIF_SYSCALL_AUDIT _BITUL(TIF_SYSCALL_AUDIT)
  71. #define _TIF_SECCOMP _BITUL(TIF_SECCOMP)
  72. #define _TIF_SYSCALL_TRACEPOINT _BITUL(TIF_SYSCALL_TRACEPOINT)
  73. #endif /* _ASM_THREAD_INFO_H */