1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18#include <asm/uaccess.h>
19#include <asm/syscall.h>
20#include <asm/unistd.h>
21#include <linux/linkage.h>
22#include <linux/stringify.h>
23#include <linux/errno.h>
24#include <linux/syscalls.h>
25#include <linux/file.h>
26#include <linux/fs.h>
27#include <linux/mman.h>
28#include <linux/shm.h>
29
30typedef void (*syscall_t)(void);
31
32syscall_t sys_call_table[__NR_syscall_count] = {
33 [0 ... __NR_syscall_count - 1] = (syscall_t)&sys_ni_syscall,
34
35#undef __SYSCALL
36#define __SYSCALL(nr,symbol,nargs) [ nr ] = (syscall_t)symbol,
37#undef _XTENSA_UNISTD_H
38#undef __KERNEL_SYSCALLS__
39#include <asm/unistd.h>
40};
41
42asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg)
43{
44 unsigned long ret;
45 long err;
46
47 err = do_shmat(shmid, shmaddr, shmflg, &ret);
48 if (err)
49 return err;
50 return (long)ret;
51}
52
53asmlinkage long xtensa_fadvise64_64(int fd, int advice, unsigned long long offset, unsigned long long len)
54{
55 return sys_fadvise64_64(fd, offset, len, advice);
56}
57
58