thread_info.h 3.2 KB

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