Merge branches 'no-rebases', 'arch-avr32', 'arch-blackfin', 'arch-cris', 'arch-h8300', 'arch-m32r', 'arch-mn10300', 'arch-score', 'arch-sh' and 'arch-powerpc' into for-next
This commit is contained in:

@@ -106,7 +106,6 @@ static inline void start_thread(struct pt_regs * regs, unsigned long pc,
|
||||
|
||||
/* Free all resources held by a thread. */
|
||||
#define release_thread(tsk) do { } while(0)
|
||||
extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
||||
|
||||
extern unsigned long get_wchan(struct task_struct *);
|
||||
|
||||
|
@@ -94,6 +94,7 @@ struct thread_struct {
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/fpumacro.h>
|
||||
|
||||
/* Return saved PC of a blocked thread. */
|
||||
struct task_struct;
|
||||
@@ -143,6 +144,10 @@ do { \
|
||||
: \
|
||||
: "r" (regs), "r" (sp - sizeof(struct reg_window) - STACK_BIAS), \
|
||||
"i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0]))); \
|
||||
fprs_write(0); \
|
||||
current_thread_info()->xfsr[0] = 0; \
|
||||
current_thread_info()->fpsaved[0] = 0; \
|
||||
regs->tstate &= ~TSTATE_PEF; \
|
||||
} while (0)
|
||||
|
||||
#define start_thread32(regs, pc, sp) \
|
||||
@@ -183,13 +188,15 @@ do { \
|
||||
: \
|
||||
: "r" (regs), "r" (sp - sizeof(struct reg_window32)), \
|
||||
"i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0]))); \
|
||||
fprs_write(0); \
|
||||
current_thread_info()->xfsr[0] = 0; \
|
||||
current_thread_info()->fpsaved[0] = 0; \
|
||||
regs->tstate &= ~TSTATE_PEF; \
|
||||
} while (0)
|
||||
|
||||
/* Free all resources held by a thread. */
|
||||
#define release_thread(tsk) do { } while (0)
|
||||
|
||||
extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
||||
|
||||
extern unsigned long get_wchan(struct task_struct *task);
|
||||
|
||||
#define task_pt_regs(tsk) (task_thread_info(tsk)->kregs)
|
||||
|
@@ -32,6 +32,9 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
|
||||
#define arch_ptrace_stop(exit_code, info) \
|
||||
synchronize_user_stack()
|
||||
|
||||
#define current_pt_regs() \
|
||||
((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE) - 1)
|
||||
|
||||
struct global_reg_snapshot {
|
||||
unsigned long tstate;
|
||||
unsigned long tpc;
|
||||
@@ -55,9 +58,7 @@ union global_cpu_snapshot {
|
||||
|
||||
extern union global_cpu_snapshot global_cpu_snapshot[NR_CPUS];
|
||||
|
||||
#define force_successful_syscall_return() \
|
||||
do { current_thread_info()->syscall_noerror = 1; \
|
||||
} while (0)
|
||||
#define force_successful_syscall_return() set_thread_noerror(1)
|
||||
#define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV))
|
||||
#define instruction_pointer(regs) ((regs)->tpc)
|
||||
#define instruction_pointer_set(regs, val) ((regs)->tpc = (val))
|
||||
@@ -100,6 +101,9 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
|
||||
#define arch_ptrace_stop(exit_code, info) \
|
||||
synchronize_user_stack()
|
||||
|
||||
#define current_pt_regs() \
|
||||
((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE) - 1)
|
||||
|
||||
#define user_mode(regs) (!((regs)->psr & PSR_PS))
|
||||
#define instruction_pointer(regs) ((regs)->pc)
|
||||
#define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])
|
||||
|
@@ -23,7 +23,7 @@ do { flush_tlb_pending(); \
|
||||
/* If you are tempted to conditionalize the following */ \
|
||||
/* so that ASI is only written if it changes, think again. */ \
|
||||
__asm__ __volatile__("wr %%g0, %0, %%asi" \
|
||||
: : "r" (__thread_flag_byte_ptr(task_thread_info(next))[TI_FLAG_BYTE_CURRENT_DS]));\
|
||||
: : "r" (task_thread_info(next)->current_ds));\
|
||||
trap_block[current_thread_info()->cpu].thread = \
|
||||
task_thread_info(next); \
|
||||
__asm__ __volatile__( \
|
||||
|
@@ -8,6 +8,4 @@ extern asmlinkage long sparc_do_fork(unsigned long clone_flags,
|
||||
struct pt_regs *regs,
|
||||
unsigned long stack_size);
|
||||
|
||||
extern asmlinkage int sparc_execve(struct pt_regs *regs);
|
||||
|
||||
#endif /* _SPARC64_SYSCALLS_H */
|
||||
|
@@ -14,12 +14,12 @@
|
||||
#define TI_FLAG_FAULT_CODE_SHIFT 56
|
||||
#define TI_FLAG_BYTE_WSTATE 1
|
||||
#define TI_FLAG_WSTATE_SHIFT 48
|
||||
#define TI_FLAG_BYTE_CWP 2
|
||||
#define TI_FLAG_CWP_SHIFT 40
|
||||
#define TI_FLAG_BYTE_CURRENT_DS 3
|
||||
#define TI_FLAG_CURRENT_DS_SHIFT 32
|
||||
#define TI_FLAG_BYTE_FPDEPTH 4
|
||||
#define TI_FLAG_FPDEPTH_SHIFT 24
|
||||
#define TI_FLAG_BYTE_NOERROR 2
|
||||
#define TI_FLAG_BYTE_NOERROR_SHIFT 40
|
||||
#define TI_FLAG_BYTE_FPDEPTH 3
|
||||
#define TI_FLAG_FPDEPTH_SHIFT 32
|
||||
#define TI_FLAG_BYTE_CWP 4
|
||||
#define TI_FLAG_CWP_SHIFT 24
|
||||
#define TI_FLAG_BYTE_WSAVED 5
|
||||
#define TI_FLAG_WSAVED_SHIFT 16
|
||||
|
||||
@@ -47,7 +47,7 @@ struct thread_info {
|
||||
struct exec_domain *exec_domain;
|
||||
int preempt_count; /* 0 => preemptable, <0 => BUG */
|
||||
__u8 new_child;
|
||||
__u8 syscall_noerror;
|
||||
__u8 current_ds;
|
||||
__u16 cpu;
|
||||
|
||||
unsigned long *utraps;
|
||||
@@ -74,9 +74,9 @@ struct thread_info {
|
||||
#define TI_FAULT_CODE (TI_FLAGS + TI_FLAG_BYTE_FAULT_CODE)
|
||||
#define TI_WSTATE (TI_FLAGS + TI_FLAG_BYTE_WSTATE)
|
||||
#define TI_CWP (TI_FLAGS + TI_FLAG_BYTE_CWP)
|
||||
#define TI_CURRENT_DS (TI_FLAGS + TI_FLAG_BYTE_CURRENT_DS)
|
||||
#define TI_FPDEPTH (TI_FLAGS + TI_FLAG_BYTE_FPDEPTH)
|
||||
#define TI_WSAVED (TI_FLAGS + TI_FLAG_BYTE_WSAVED)
|
||||
#define TI_SYS_NOERROR (TI_FLAGS + TI_FLAG_BYTE_NOERROR)
|
||||
#define TI_FPSAVED 0x00000010
|
||||
#define TI_KSP 0x00000018
|
||||
#define TI_FAULT_ADDR 0x00000020
|
||||
@@ -84,7 +84,7 @@ struct thread_info {
|
||||
#define TI_EXEC_DOMAIN 0x00000030
|
||||
#define TI_PRE_COUNT 0x00000038
|
||||
#define TI_NEW_CHILD 0x0000003c
|
||||
#define TI_SYS_NOERROR 0x0000003d
|
||||
#define TI_CURRENT_DS 0x0000003d
|
||||
#define TI_CPU 0x0000003e
|
||||
#define TI_UTRAPS 0x00000040
|
||||
#define TI_REG_WINDOW 0x00000048
|
||||
@@ -121,7 +121,7 @@ struct thread_info {
|
||||
#define INIT_THREAD_INFO(tsk) \
|
||||
{ \
|
||||
.task = &tsk, \
|
||||
.flags = ((unsigned long)ASI_P) << TI_FLAG_CURRENT_DS_SHIFT, \
|
||||
.current_ds = ASI_P, \
|
||||
.exec_domain = &default_exec_domain, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
.restart_block = { \
|
||||
@@ -153,13 +153,12 @@ register struct thread_info *current_thread_info_reg asm("g6");
|
||||
#define set_thread_wstate(val) (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_WSTATE] = (val))
|
||||
#define get_thread_cwp() (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_CWP])
|
||||
#define set_thread_cwp(val) (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_CWP] = (val))
|
||||
#define get_thread_current_ds() (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_CURRENT_DS])
|
||||
#define set_thread_current_ds(val) (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_CURRENT_DS] = (val))
|
||||
#define get_thread_noerror() (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_NOERROR])
|
||||
#define set_thread_noerror(val) (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_NOERROR] = (val))
|
||||
#define get_thread_fpdepth() (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_FPDEPTH])
|
||||
#define set_thread_fpdepth(val) (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_FPDEPTH] = (val))
|
||||
#define get_thread_wsaved() (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_WSAVED])
|
||||
#define set_thread_wsaved(val) (__cur_thread_flag_byte_ptr[TI_FLAG_BYTE_WSAVED] = (val))
|
||||
|
||||
#endif /* !(__ASSEMBLY__) */
|
||||
|
||||
/*
|
||||
|
@@ -38,14 +38,14 @@
|
||||
#define VERIFY_READ 0
|
||||
#define VERIFY_WRITE 1
|
||||
|
||||
#define get_fs() ((mm_segment_t) { get_thread_current_ds() })
|
||||
#define get_fs() ((mm_segment_t){(current_thread_info()->current_ds)})
|
||||
#define get_ds() (KERNEL_DS)
|
||||
|
||||
#define segment_eq(a,b) ((a).seg == (b).seg)
|
||||
|
||||
#define set_fs(val) \
|
||||
do { \
|
||||
set_thread_current_ds((val).seg); \
|
||||
current_thread_info()->current_ds =(val).seg; \
|
||||
__asm__ __volatile__ ("wr %%g0, %0, %%asi" : : "r" ((val).seg)); \
|
||||
} while(0)
|
||||
|
||||
|
@@ -46,6 +46,7 @@
|
||||
#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
|
||||
#define __ARCH_WANT_COMPAT_SYS_SENDFILE
|
||||
#endif
|
||||
#define __ARCH_WANT_SYS_EXECVE
|
||||
|
||||
/*
|
||||
* "Conditional" syscalls
|
||||
|
Reference in New Issue
Block a user