David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 1 | /* MN10300 Weird system calls |
| 2 | * |
| 3 | * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd. |
| 4 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public Licence |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the Licence, or (at your option) any later version. |
| 10 | */ |
| 11 | #include <linux/errno.h> |
| 12 | #include <linux/sched.h> |
| 13 | #include <linux/syscalls.h> |
| 14 | #include <linux/mm.h> |
| 15 | #include <linux/smp.h> |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 16 | #include <linux/sem.h> |
| 17 | #include <linux/msg.h> |
| 18 | #include <linux/shm.h> |
| 19 | #include <linux/stat.h> |
| 20 | #include <linux/mman.h> |
| 21 | #include <linux/file.h> |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 22 | #include <linux/tty.h> |
| 23 | |
| 24 | #include <asm/uaccess.h> |
| 25 | |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 26 | asmlinkage long old_mmap(unsigned long addr, unsigned long len, |
| 27 | unsigned long prot, unsigned long flags, |
| 28 | unsigned long fd, unsigned long offset) |
| 29 | { |
| 30 | if (offset & ~PAGE_MASK) |
| 31 | return -EINVAL; |
Al Viro | f8b7256 | 2009-11-30 17:37:04 -0500 | [diff] [blame] | 32 | return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 33 | } |