This source file includes following definitions.
- spu_sys_callback
1
2
3
4
5
6 #undef DEBUG
7
8 #include <linux/kallsyms.h>
9 #include <linux/export.h>
10 #include <linux/syscalls.h>
11
12 #include <asm/spu.h>
13 #include <asm/syscalls.h>
14 #include <asm/unistd.h>
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 static void *spu_syscall_table[] = {
38 #define __SYSCALL(nr, entry) entry,
39 #include <asm/syscall_table_spu.h>
40 #undef __SYSCALL
41 };
42
43 long spu_sys_callback(struct spu_syscall_block *s)
44 {
45 long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6);
46
47 if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) {
48 pr_debug("%s: invalid syscall #%lld", __func__, s->nr_ret);
49 return -ENOSYS;
50 }
51
52 syscall = spu_syscall_table[s->nr_ret];
53
54 pr_debug("SPU-syscall "
55 "%pSR:syscall%lld(%llx, %llx, %llx, %llx, %llx, %llx)\n",
56 syscall,
57 s->nr_ret,
58 s->parm[0], s->parm[1], s->parm[2],
59 s->parm[3], s->parm[4], s->parm[5]);
60
61 return syscall(s->parm[0], s->parm[1], s->parm[2],
62 s->parm[3], s->parm[4], s->parm[5]);
63 }
64 EXPORT_SYMBOL_GPL(spu_sys_callback);