ptrace.h (95d002e0a34cb0f238abb39987f9980f325d8332) ptrace.h (2f7932b011e7fb9f98732f95a68f6017d4d8c542)
1/* SPDX-License-Identifier: GPL-2.0 */
2// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
3
4#ifndef _CSKY_PTRACE_H
5#define _CSKY_PTRACE_H
6
7#ifndef __ASSEMBLY__
8

--- 48 unchanged lines hidden (view full) ---

57({ (struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1; })
58
59#define user_stack_pointer(regs) ((regs)->usp)
60
61#define user_mode(regs) (!((regs)->sr & PS_S))
62#define instruction_pointer(regs) ((regs)->pc)
63#define profile_pc(regs) instruction_pointer(regs)
64
1/* SPDX-License-Identifier: GPL-2.0 */
2// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
3
4#ifndef _CSKY_PTRACE_H
5#define _CSKY_PTRACE_H
6
7#ifndef __ASSEMBLY__
8

--- 48 unchanged lines hidden (view full) ---

57({ (struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1; })
58
59#define user_stack_pointer(regs) ((regs)->usp)
60
61#define user_mode(regs) (!((regs)->sr & PS_S))
62#define instruction_pointer(regs) ((regs)->pc)
63#define profile_pc(regs) instruction_pointer(regs)
64
65static inline unsigned long regs_return_value(struct pt_regs *regs)
66{
67 return regs->a0;
68}
69
65#endif /* __KERNEL__ */
66#endif /* __ASSEMBLY__ */
67#endif /* _CSKY_PTRACE_H */
70#endif /* __KERNEL__ */
71#endif /* __ASSEMBLY__ */
72#endif /* _CSKY_PTRACE_H */