aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/include/asm/syscall.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index 83bb439597d8..25fa651c937d 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -54,7 +54,7 @@ static inline void mips_syscall_update_nr(struct task_struct *task,
54 task_thread_info(task)->syscall = regs->regs[2]; 54 task_thread_info(task)->syscall = regs->regs[2];
55} 55}
56 56
57static inline unsigned long mips_get_syscall_arg(unsigned long *arg, 57static inline void mips_get_syscall_arg(unsigned long *arg,
58 struct task_struct *task, struct pt_regs *regs, unsigned int n) 58 struct task_struct *task, struct pt_regs *regs, unsigned int n)
59{ 59{
60 unsigned long usp __maybe_unused = regs->regs[29]; 60 unsigned long usp __maybe_unused = regs->regs[29];
@@ -63,23 +63,24 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
63 case 0: case 1: case 2: case 3: 63 case 0: case 1: case 2: case 3:
64 *arg = regs->regs[4 + n]; 64 *arg = regs->regs[4 + n];
65 65
66 return 0; 66 return;
67 67
68#ifdef CONFIG_32BIT 68#ifdef CONFIG_32BIT
69 case 4: case 5: case 6: case 7: 69 case 4: case 5: case 6: case 7:
70 return get_user(*arg, (int *)usp + n); 70 get_user(*arg, (int *)usp + n);
71 return;
71#endif 72#endif
72 73
73#ifdef CONFIG_64BIT 74#ifdef CONFIG_64BIT
74 case 4: case 5: case 6: case 7: 75 case 4: case 5: case 6: case 7:
75#ifdef CONFIG_MIPS32_O32 76#ifdef CONFIG_MIPS32_O32
76 if (test_tsk_thread_flag(task, TIF_32BIT_REGS)) 77 if (test_tsk_thread_flag(task, TIF_32BIT_REGS))
77 return get_user(*arg, (int *)usp + n); 78 get_user(*arg, (int *)usp + n);
78 else 79 else
79#endif 80#endif
80 *arg = regs->regs[4 + n]; 81 *arg = regs->regs[4 + n];
81 82
82 return 0; 83 return;
83#endif 84#endif
84 85
85 default: 86 default:
@@ -126,21 +127,13 @@ static inline void syscall_get_arguments(struct task_struct *task,
126{ 127{
127 unsigned int i = 0; 128 unsigned int i = 0;
128 unsigned int n = 6; 129 unsigned int n = 6;
129 int ret;
130 130
131 /* O32 ABI syscall() */ 131 /* O32 ABI syscall() */
132 if (mips_syscall_is_indirect(task, regs)) 132 if (mips_syscall_is_indirect(task, regs))
133 i++; 133 i++;
134 134
135 while (n--) 135 while (n--)
136 ret |= mips_get_syscall_arg(args++, task, regs, i++); 136 mips_get_syscall_arg(args++, task, regs, i++);
137
138 /*
139 * No way to communicate an error because this is a void function.
140 */
141#if 0
142 return ret;
143#endif
144} 137}
145 138
146extern const unsigned long sys_call_table[]; 139extern const unsigned long sys_call_table[];