Path: blob/master/arch/microblaze/kernel/sys_microblaze.c
26439 views
/*1* Copyright (C) 2007-2009 Michal Simek <[email protected]>2* Copyright (C) 2007-2009 PetaLogix3* Copyright (C) 2007 John Williams <[email protected]>4*5* Copyright (C) 2006 Atmark Techno, Inc.6* Yasushi SHOJI <[email protected]>7* Tetsuya OHKAWA <[email protected]>8*9* This file is subject to the terms and conditions of the GNU General Public10* License. See the file "COPYING" in the main directory of this archive11* for more details.12*/1314#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>3435SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,36unsigned long, prot, unsigned long, flags, unsigned long, fd,37unsigned long, pgoff)38{39if (pgoff & ~PAGE_MASK)40return -EINVAL;4142return ksys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);43}4445SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,46unsigned long, prot, unsigned long, flags, unsigned long, fd,47unsigned long, pgoff)48{49if (pgoff & (~PAGE_MASK >> 12))50return -EINVAL;5152return ksys_mmap_pgoff(addr, len, prot, flags, fd,53pgoff >> (PAGE_SHIFT - 12));54}555657