sys.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * linux/arch/unicore32/kernel/sys.c
  3. *
  4. * Code specific to PKUnity SoC and UniCore ISA
  5. *
  6. * Copyright (C) 2001-2010 GUAN Xue-tao
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/module.h>
  13. #include <linux/errno.h>
  14. #include <linux/sched.h>
  15. #include <linux/slab.h>
  16. #include <linux/mm.h>
  17. #include <linux/sem.h>
  18. #include <linux/msg.h>
  19. #include <linux/shm.h>
  20. #include <linux/stat.h>
  21. #include <linux/syscalls.h>
  22. #include <linux/mman.h>
  23. #include <linux/fs.h>
  24. #include <linux/file.h>
  25. #include <linux/ipc.h>
  26. #include <linux/uaccess.h>
  27. #include <asm/syscalls.h>
  28. #include <asm/cacheflush.h>
  29. /* Note: used by the compat code even in 64-bit Linux. */
  30. SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
  31. unsigned long, prot, unsigned long, flags,
  32. unsigned long, fd, unsigned long, off_4k)
  33. {
  34. return sys_mmap_pgoff(addr, len, prot, flags, fd,
  35. off_4k);
  36. }
  37. /* Provide the actual syscall number to call mapping. */
  38. #undef __SYSCALL
  39. #define __SYSCALL(nr, call) [nr] = (call),
  40. /* Note that we don't include <linux/unistd.h> but <asm/unistd.h> */
  41. void *sys_call_table[__NR_syscalls] = {
  42. [0 ... __NR_syscalls-1] = sys_ni_syscall,
  43. #include <asm/unistd.h>
  44. };