diff options
| author | Ingo Molnar <mingo@kernel.org> | 2019-04-26 12:01:33 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2019-04-26 12:01:33 +0200 |
| commit | da398dbd7d871bae332a800f7d194af18a2a9058 (patch) | |
| tree | 2dbdc51bd9caa1539480b3d80d082adfdb8179c3 /arch/powerpc/include/asm/syscall.h | |
| parent | 2792107dc3af29ecc1a9b3dc5bc873dac4b61cd6 (diff) | |
| parent | 8113a85f872003a9f5c58f9f143054b0d8ec73a5 (diff) | |
| download | linux-da398dbd7d871bae332a800f7d194af18a2a9058.tar.gz linux-da398dbd7d871bae332a800f7d194af18a2a9058.tar.bz2 linux-da398dbd7d871bae332a800f7d194af18a2a9058.zip | |
Merge branch 'linus' into x86/mm, to pick up dependent fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/powerpc/include/asm/syscall.h')
| -rw-r--r-- | arch/powerpc/include/asm/syscall.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h index 1a0e7a8b1c81..1243045bad2d 100644 --- a/arch/powerpc/include/asm/syscall.h +++ b/arch/powerpc/include/asm/syscall.h @@ -65,22 +65,20 @@ static inline void syscall_set_return_value(struct task_struct *task, static inline void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, - unsigned int i, unsigned int n, unsigned long *args) { unsigned long val, mask = -1UL; - - BUG_ON(i + n > 6); + unsigned int n = 6; #ifdef CONFIG_COMPAT if (test_tsk_thread_flag(task, TIF_32BIT)) mask = 0xffffffff; #endif while (n--) { - if (n == 0 && i == 0) + if (n == 0) val = regs->orig_gpr3; else - val = regs->gpr[3 + i + n]; + val = regs->gpr[3 + n]; args[n] = val & mask; } @@ -88,15 +86,12 @@ static inline void syscall_get_arguments(struct task_struct *task, static inline void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, - unsigned int i, unsigned int n, const unsigned long *args) { - BUG_ON(i + n > 6); - memcpy(®s->gpr[3 + i], args, n * sizeof(args[0])); + memcpy(®s->gpr[3], args, 6 * sizeof(args[0])); /* Also copy the first argument into orig_gpr3 */ - if (i == 0 && n > 0) - regs->orig_gpr3 = args[0]; + regs->orig_gpr3 = args[0]; } static inline int syscall_get_arch(void) |
