2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* S390 version
|
2012-07-20 17:15:04 +08:00
|
|
|
* Copyright IBM Corp. 2002, 2006
|
2005-04-17 06:20:36 +08:00
|
|
|
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASM_THREAD_INFO_H
|
|
|
|
#define _ASM_THREAD_INFO_H
|
|
|
|
|
2015-10-06 22:23:39 +08:00
|
|
|
#include <linux/const.h>
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* Size of kernel stack for each process
|
|
|
|
*/
|
2016-11-14 21:39:16 +08:00
|
|
|
#define THREAD_SIZE_ORDER 2
|
2005-04-17 06:20:36 +08:00
|
|
|
#define ASYNC_ORDER 2
|
|
|
|
|
2016-11-14 21:39:16 +08:00
|
|
|
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
|
2005-04-17 06:20:36 +08:00
|
|
|
#define ASYNC_SIZE (PAGE_SIZE << ASYNC_ORDER)
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <asm/lowcore.h>
|
2009-04-14 21:36:16 +08:00
|
|
|
#include <asm/page.h>
|
|
|
|
#include <asm/processor.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* low level task data that entry.S needs immediate access to
|
|
|
|
* - this struct should fit entirely inside of one cache line
|
|
|
|
* - this struct shares the supervisor stack pages
|
|
|
|
* - if the contents of this structure are changed, the assembly constants must also be changed
|
|
|
|
*/
|
|
|
|
struct thread_info {
|
|
|
|
unsigned long flags; /* low level flags */
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* macros/functions for gaining access to the thread information structure
|
|
|
|
*/
|
|
|
|
#define INIT_THREAD_INFO(tsk) \
|
|
|
|
{ \
|
|
|
|
.flags = 0, \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define init_stack (init_thread_union.stack)
|
|
|
|
|
2015-03-16 19:46:38 +08:00
|
|
|
void arch_release_task_struct(struct task_struct *tsk);
|
2016-05-07 18:15:21 +08:00
|
|
|
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
|
2015-03-16 19:46:38 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* thread information flags bit numbers
|
|
|
|
*/
|
2014-04-15 18:55:07 +08:00
|
|
|
#define TIF_NOTIFY_RESUME 0 /* callback before returning to user */
|
|
|
|
#define TIF_SIGPENDING 1 /* signal pending */
|
|
|
|
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
|
|
|
|
#define TIF_SYSCALL_TRACE 3 /* syscall trace active */
|
|
|
|
#define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */
|
|
|
|
#define TIF_SECCOMP 5 /* secure computing */
|
|
|
|
#define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */
|
2014-09-22 22:39:06 +08:00
|
|
|
#define TIF_UPROBE 7 /* breakpointed or single-stepping */
|
2014-04-15 18:55:07 +08:00
|
|
|
#define TIF_31BIT 16 /* 32bit process */
|
|
|
|
#define TIF_MEMDIE 17 /* is terminating due to OOM killer */
|
|
|
|
#define TIF_RESTORE_SIGMASK 18 /* restore signal mask in do_signal() */
|
|
|
|
#define TIF_SINGLE_STEP 19 /* This task is single stepped */
|
|
|
|
#define TIF_BLOCK_STEP 20 /* This task is block stepped */
|
2014-09-22 22:39:06 +08:00
|
|
|
#define TIF_UPROBE_SINGLESTEP 21 /* This task is uprobe single stepped */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2015-10-06 22:23:39 +08:00
|
|
|
#define _TIF_NOTIFY_RESUME _BITUL(TIF_NOTIFY_RESUME)
|
|
|
|
#define _TIF_SIGPENDING _BITUL(TIF_SIGPENDING)
|
|
|
|
#define _TIF_NEED_RESCHED _BITUL(TIF_NEED_RESCHED)
|
|
|
|
#define _TIF_SYSCALL_TRACE _BITUL(TIF_SYSCALL_TRACE)
|
|
|
|
#define _TIF_SYSCALL_AUDIT _BITUL(TIF_SYSCALL_AUDIT)
|
|
|
|
#define _TIF_SECCOMP _BITUL(TIF_SECCOMP)
|
|
|
|
#define _TIF_SYSCALL_TRACEPOINT _BITUL(TIF_SYSCALL_TRACEPOINT)
|
|
|
|
#define _TIF_UPROBE _BITUL(TIF_UPROBE)
|
|
|
|
#define _TIF_31BIT _BITUL(TIF_31BIT)
|
|
|
|
#define _TIF_SINGLE_STEP _BITUL(TIF_SINGLE_STEP)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#endif /* _ASM_THREAD_INFO_H */
|