Loading arch/sparc/Kconfig +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ config SPARC select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER select MODULES_USE_ELF_RELA select GENERIC_KERNEL_THREAD select GENERIC_KERNEL_EXECVE config SPARC32 def_bool !64BIT Loading arch/sparc/include/asm/processor_32.h +0 −1 Original line number Diff line number Diff line Loading @@ -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 *); Loading arch/sparc/include/asm/processor_64.h +9 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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) \ Loading Loading @@ -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) Loading arch/sparc/include/asm/ptrace.h +7 −3 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -44,9 +47,7 @@ struct global_reg_snapshot { }; extern struct global_reg_snapshot global_reg_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)) Loading Loading @@ -89,6 +90,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]) Loading arch/sparc/include/asm/switch_to_64.h +1 −1 Original line number Diff line number Diff line Loading @@ -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__( \ Loading Loading
arch/sparc/Kconfig +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ config SPARC select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER select MODULES_USE_ELF_RELA select GENERIC_KERNEL_THREAD select GENERIC_KERNEL_EXECVE config SPARC32 def_bool !64BIT Loading
arch/sparc/include/asm/processor_32.h +0 −1 Original line number Diff line number Diff line Loading @@ -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 *); Loading
arch/sparc/include/asm/processor_64.h +9 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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) \ Loading Loading @@ -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) Loading
arch/sparc/include/asm/ptrace.h +7 −3 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -44,9 +47,7 @@ struct global_reg_snapshot { }; extern struct global_reg_snapshot global_reg_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)) Loading Loading @@ -89,6 +90,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]) Loading
arch/sparc/include/asm/switch_to_64.h +1 −1 Original line number Diff line number Diff line Loading @@ -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__( \ Loading