diff options
Diffstat (limited to 'arch/nds32/include')
| -rw-r--r-- | arch/nds32/include/asm/syscall.h | 27 |
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 | */ |
| 29 | int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) | 29 | static inline int |
| 30 | syscall_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 | */ |
| 50 | void syscall_rollback(struct task_struct *task, struct pt_regs *regs) | 51 | static inline void |
| 52 | syscall_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 | */ |
| 65 | long syscall_get_error(struct task_struct *task, struct pt_regs *regs) | 67 | static inline long |
| 68 | syscall_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 | */ |
| 82 | long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) | 85 | static inline long |
| 86 | syscall_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 | */ |
| 102 | void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, | 106 | static inline void |
| 103 | int error, long val) | 107 | syscall_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 |
| 121 | void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, | 126 | static inline void |
| 122 | unsigned long *args) | 127 | syscall_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 | */ |
| 141 | void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, | 147 | static inline void |
| 142 | const unsigned long *args) | 148 | syscall_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++; |
