Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3653b9a8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
parents 52af894c 878a5535
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@ struct sparc_stackf {

#ifdef __KERNEL__

#include <asm/system.h>

static inline bool pt_regs_is_syscall(struct pt_regs *regs)
{
	return (regs->psr & PSR_SYSCALL);
@@ -72,6 +74,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
	return (regs->psr &= ~PSR_SYSCALL);
}

#define arch_ptrace_stop_needed(exit_code, info) \
({	flush_user_windows(); \
	current_thread_info()->w_saved != 0;	\
})

#define arch_ptrace_stop(exit_code, info) \
	synchronize_user_stack()

#define user_mode(regs) (!((regs)->psr & PSR_PS))
#define instruction_pointer(regs) ((regs)->pc)
#define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])
+9 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ struct sparc_trapf {
#ifdef __KERNEL__

#include <linux/threads.h>
#include <asm/system.h>

static inline int pt_regs_trap_type(struct pt_regs *regs)
{
@@ -130,6 +131,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
	return (regs->tstate &= ~TSTATE_SYSCALL);
}

#define arch_ptrace_stop_needed(exit_code, info) \
({	flush_user_windows(); \
	get_thread_wsaved() != 0; \
})

#define arch_ptrace_stop(exit_code, info) \
	synchronize_user_stack()

struct global_reg_snapshot {
	unsigned long		tstate;
	unsigned long		tpc;