| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * OpenRISC Linux |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 9 | 10 | * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com> |
|---|
| 10 | 11 | * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se> |
|---|
| 11 | 12 | * et al. |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 14 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 15 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 16 | | - * (at your option) any later version. |
|---|
| 17 | 13 | */ |
|---|
| 18 | 14 | |
|---|
| 19 | 15 | #ifndef __ASM_OPENRISC_SYSCALL_H__ |
|---|
| .. | .. |
|---|
| 56 | 52 | |
|---|
| 57 | 53 | static inline void |
|---|
| 58 | 54 | syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, |
|---|
| 59 | | - unsigned int i, unsigned int n, unsigned long *args) |
|---|
| 55 | + unsigned long *args) |
|---|
| 60 | 56 | { |
|---|
| 61 | | - BUG_ON(i + n > 6); |
|---|
| 62 | | - |
|---|
| 63 | | - memcpy(args, ®s->gpr[3 + i], n * sizeof(args[0])); |
|---|
| 57 | + memcpy(args, ®s->gpr[3], 6 * sizeof(args[0])); |
|---|
| 64 | 58 | } |
|---|
| 65 | 59 | |
|---|
| 66 | 60 | static inline void |
|---|
| 67 | 61 | syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, |
|---|
| 68 | | - unsigned int i, unsigned int n, const unsigned long *args) |
|---|
| 62 | + const unsigned long *args) |
|---|
| 69 | 63 | { |
|---|
| 70 | | - BUG_ON(i + n > 6); |
|---|
| 71 | | - |
|---|
| 72 | | - memcpy(®s->gpr[3 + i], args, n * sizeof(args[0])); |
|---|
| 64 | + memcpy(®s->gpr[3], args, 6 * sizeof(args[0])); |
|---|
| 73 | 65 | } |
|---|
| 74 | 66 | |
|---|
| 75 | | -static inline int syscall_get_arch(void) |
|---|
| 67 | +static inline int syscall_get_arch(struct task_struct *task) |
|---|
| 76 | 68 | { |
|---|
| 77 | 69 | return AUDIT_ARCH_OPENRISC; |
|---|
| 78 | 70 | } |
|---|