summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/sys_microblaze.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 14:28:55 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 14:28:55 +0900
commit11db81a59d0b2e563e30512cd76f23d0db384780 (patch)
tree35a84e91c71cf0fcbffa3c5c8af36547a203a867 /arch/microblaze/kernel/sys_microblaze.c
parent0993537bff42edfbea7649975196cd2552c4b936 (diff)
parent63d7bd1b171d5e7190c50dd3e48b1c561d7803d8 (diff)
Merge tag 'microblaze-3.13-rc1' of git://git.monstr.eu/linux-2.6-microblaze
Pull microblaze updates from Michal Simek: - Get rid of NO_MMU Kconfig - mmap2 fixups - Some minor cleanups * tag 'microblaze-3.13-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Remove incorrect file path microblaze: Fix bug with mmap2 syscall MB implementation microblaze: Use predefined SYSCALL_DEFINE macro microblaze: Remove deprecated IRQF_DISABLED microblaze: Calculate kernel pad automatically microblaze: Remove unused NO_MMU Kconfig parameter
Diffstat (limited to 'arch/microblaze/kernel/sys_microblaze.c')
-rw-r--r--arch/microblaze/kernel/sys_microblaze.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c
index f905b3ae68c..f1e1f666ddd 100644
--- a/arch/microblaze/kernel/sys_microblaze.c
+++ b/arch/microblaze/kernel/sys_microblaze.c
@@ -33,12 +33,23 @@
#include <linux/slab.h>
#include <asm/syscalls.h>
-asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
- unsigned long prot, unsigned long flags,
- unsigned long fd, off_t pgoff)
+SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
+ unsigned long, prot, unsigned long, flags, unsigned long, fd,
+ off_t, pgoff)
{
if (pgoff & ~PAGE_MASK)
return -EINVAL;
return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);
}
+
+SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
+ unsigned long, prot, unsigned long, flags, unsigned long, fd,
+ unsigned long, pgoff)
+{
+ if (pgoff & (~PAGE_MASK >> 12))
+ return -EINVAL;
+
+ return sys_mmap_pgoff(addr, len, prot, flags, fd,
+ pgoff >> (PAGE_SHIFT - 12));
+}