hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/arch/parisc/include/asm/syscall.h
....@@ -18,29 +18,22 @@
1818 }
1919
2020 static inline void syscall_get_arguments(struct task_struct *tsk,
21
- struct pt_regs *regs, unsigned int i,
22
- unsigned int n, unsigned long *args)
21
+ struct pt_regs *regs,
22
+ unsigned long *args)
2323 {
24
- BUG_ON(i);
24
+ args[5] = regs->gr[21];
25
+ args[4] = regs->gr[22];
26
+ args[3] = regs->gr[23];
27
+ args[2] = regs->gr[24];
28
+ args[1] = regs->gr[25];
29
+ args[0] = regs->gr[26];
30
+}
2531
26
- switch (n) {
27
- case 6:
28
- args[5] = regs->gr[21];
29
- case 5:
30
- args[4] = regs->gr[22];
31
- case 4:
32
- args[3] = regs->gr[23];
33
- case 3:
34
- args[2] = regs->gr[24];
35
- case 2:
36
- args[1] = regs->gr[25];
37
- case 1:
38
- args[0] = regs->gr[26];
39
- case 0:
40
- break;
41
- default:
42
- BUG();
43
- }
32
+static inline long syscall_get_error(struct task_struct *task,
33
+ struct pt_regs *regs)
34
+{
35
+ unsigned long error = regs->gr[28];
36
+ return IS_ERR_VALUE(error) ? error : 0;
4437 }
4538
4639 static inline long syscall_get_return_value(struct task_struct *task,
....@@ -62,11 +55,11 @@
6255 /* do nothing */
6356 }
6457
65
-static inline int syscall_get_arch(void)
58
+static inline int syscall_get_arch(struct task_struct *task)
6659 {
6760 int arch = AUDIT_ARCH_PARISC;
6861 #ifdef CONFIG_64BIT
69
- if (!is_compat_task())
62
+ if (!__is_compat_task(task))
7063 arch = AUDIT_ARCH_PARISC64;
7164 #endif
7265 return arch;