sys_microblaze.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
  3. * Copyright (C) 2007-2009 PetaLogix
  4. * Copyright (C) 2007 John Williams <john.williams@petalogix.com>
  5. *
  6. * Copyright (C) 2006 Atmark Techno, Inc.
  7. * Yasushi SHOJI <yashi@atmark-techno.com>
  8. * Tetsuya OHKAWA <tetsuya@atmark-techno.com>
  9. *
  10. * This file is subject to the terms and conditions of the GNU General Public
  11. * License. See the file "COPYING" in the main directory of this archive
  12. * for more details.
  13. */
  14. #include <linux/errno.h>
  15. #include <linux/export.h>
  16. #include <linux/mm.h>
  17. #include <linux/smp.h>
  18. #include <linux/syscalls.h>
  19. #include <linux/sem.h>
  20. #include <linux/msg.h>
  21. #include <linux/shm.h>
  22. #include <linux/stat.h>
  23. #include <linux/mman.h>
  24. #include <linux/sys.h>
  25. #include <linux/ipc.h>
  26. #include <linux/file.h>
  27. #include <linux/err.h>
  28. #include <linux/fs.h>
  29. #include <linux/semaphore.h>
  30. #include <linux/uaccess.h>
  31. #include <linux/unistd.h>
  32. #include <linux/slab.h>
  33. #include <asm/syscalls.h>
  34. SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
  35. unsigned long, prot, unsigned long, flags, unsigned long, fd,
  36. off_t, pgoff)
  37. {
  38. if (pgoff & ~PAGE_MASK)
  39. return -EINVAL;
  40. return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);
  41. }
  42. SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
  43. unsigned long, prot, unsigned long, flags, unsigned long, fd,
  44. unsigned long, pgoff)
  45. {
  46. if (pgoff & (~PAGE_MASK >> 12))
  47. return -EINVAL;
  48. return sys_mmap_pgoff(addr, len, prot, flags, fd,
  49. pgoff >> (PAGE_SHIFT - 12));
  50. }