aboutsummaryrefslogtreecommitdiffstats
path: root/arch/nds32/include/asm/syscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/nds32/include/asm/syscall.h')
-rw-r--r--arch/nds32/include/asm/syscall.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/arch/nds32/include/asm/syscall.h b/arch/nds32/include/asm/syscall.h
index 899b2fb4b52f..7b5180d78e20 100644
--- a/arch/nds32/include/asm/syscall.h
+++ b/arch/nds32/include/asm/syscall.h
@@ -26,7 +26,8 @@ struct pt_regs;
26 * 26 *
27 * It's only valid to call this when @task is known to be blocked. 27 * It's only valid to call this when @task is known to be blocked.
28 */ 28 */
29int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) 29static inline int
30syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
30{ 31{
31 return regs->syscallno; 32 return regs->syscallno;
32} 33}
@@ -47,7 +48,8 @@ int syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
47 * system call instruction. This may not be the same as what the 48 * system call instruction. This may not be the same as what the
48 * register state looked like at system call entry tracing. 49 * register state looked like at system call entry tracing.
49 */ 50 */
50void syscall_rollback(struct task_struct *task, struct pt_regs *regs) 51static inline void
52syscall_rollback(struct task_struct *task, struct pt_regs *regs)
51{ 53{
52 regs->uregs[0] = regs->orig_r0; 54 regs->uregs[0] = regs->orig_r0;
53} 55}
@@ -62,7 +64,8 @@ void syscall_rollback(struct task_struct *task, struct pt_regs *regs)
62 * It's only valid to call this when @task is stopped for tracing on exit 64 * It's only valid to call this when @task is stopped for tracing on exit
63 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 65 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
64 */ 66 */
65long syscall_get_error(struct task_struct *task, struct pt_regs *regs) 67static inline long
68syscall_get_error(struct task_struct *task, struct pt_regs *regs)
66{ 69{
67 unsigned long error = regs->uregs[0]; 70 unsigned long error = regs->uregs[0];
68 return IS_ERR_VALUE(error) ? error : 0; 71 return IS_ERR_VALUE(error) ? error : 0;
@@ -79,7 +82,8 @@ long syscall_get_error(struct task_struct *task, struct pt_regs *regs)
79 * It's only valid to call this when @task is stopped for tracing on exit 82 * It's only valid to call this when @task is stopped for tracing on exit
80 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 83 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
81 */ 84 */
82long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) 85static inline long
86syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
83{ 87{
84 return regs->uregs[0]; 88 return regs->uregs[0];
85} 89}
@@ -99,8 +103,9 @@ long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
99 * It's only valid to call this when @task is stopped for tracing on exit 103 * It's only valid to call this when @task is stopped for tracing on exit
100 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 104 * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
101 */ 105 */
102void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, 106static inline void
103 int error, long val) 107syscall_set_return_value(struct task_struct *task, struct pt_regs *regs,
108 int error, long val)
104{ 109{
105 regs->uregs[0] = (long)error ? error : val; 110 regs->uregs[0] = (long)error ? error : val;
106} 111}
@@ -118,8 +123,9 @@ void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs,
118 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 123 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
119 */ 124 */
120#define SYSCALL_MAX_ARGS 6 125#define SYSCALL_MAX_ARGS 6
121void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, 126static inline void
122 unsigned long *args) 127syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
128 unsigned long *args)
123{ 129{
124 args[0] = regs->orig_r0; 130 args[0] = regs->orig_r0;
125 args++; 131 args++;
@@ -138,8 +144,9 @@ void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
138 * It's only valid to call this when @task is stopped for tracing on 144 * It's only valid to call this when @task is stopped for tracing on
139 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. 145 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
140 */ 146 */
141void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, 147static inline void
142 const unsigned long *args) 148syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,
149 const unsigned long *args)
143{ 150{
144 regs->orig_r0 = args[0]; 151 regs->orig_r0 = args[0];
145 args++; 152 args++;