Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux Support Linux MAP_LOCKED mmap flag.
details: https://anonhg.NetBSD.org/src/rev/543b443b9bd9
branches: trunk
changeset: 336725:543b443b9bd9
user: njoly <njoly%NetBSD.org@localhost>
date: Sat Mar 14 08:32:07 2015 +0000
description:
Support Linux MAP_LOCKED mmap flag.
diffstat:
sys/compat/linux/arch/alpha/linux_mmap.h | 8 ++++----
sys/compat/linux/arch/amd64/linux_mmap.h | 11 ++++-------
sys/compat/linux/arch/arm/linux_mmap.h | 4 ++--
sys/compat/linux/arch/i386/linux_mmap.h | 4 ++--
sys/compat/linux/arch/m68k/linux_mmap.h | 4 ++--
sys/compat/linux/arch/mips/linux_mmap.h | 4 ++--
sys/compat/linux/arch/powerpc/linux_mmap.h | 3 ++-
sys/compat/linux/arch/sparc/linux_mmap.h | 4 ++--
sys/compat/linux/common/linux_misc.c | 5 +++--
9 files changed, 23 insertions(+), 24 deletions(-)
diffs (215 lines):
diff -r 5d8fcdbc1bc2 -r 543b443b9bd9 sys/compat/linux/arch/alpha/linux_mmap.h
--- a/sys/compat/linux/arch/alpha/linux_mmap.h Sat Mar 14 07:23:46 2015 +0000
+++ b/sys/compat/linux/arch/alpha/linux_mmap.h Sat Mar 14 08:32:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mmap.h,v 1.4 2008/04/28 20:23:42 martin Exp $ */
+/* $NetBSD: linux_mmap.h,v 1.5 2015/03/14 08:32:07 njoly Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -36,8 +36,9 @@
/* LINUX_MAP_SHARED/PRIVATE defined in common/linux_mmap.h */
-#define LINUX_MAP_ANON 0x0010
-#define LINUX_MAP_FIXED 0x0100
+#define LINUX_MAP_ANON 0x00010
+#define LINUX_MAP_FIXED 0x00100
+#define LINUX_MAP_LOCKED 0x08000
/* the following flags are silently ignored */
@@ -48,7 +49,6 @@
#define LINUX_MAP_GROWSDOWN 0x01000
#define LINUX_MAP_DENYWRITE 0x02000
#define LINUX_MAP_EXECUTABLE 0x04000
-#define LINUX_MAP_LOCKED 0x08000
#define LINUX_MAP_NORESERVE 0x10000
diff -r 5d8fcdbc1bc2 -r 543b443b9bd9 sys/compat/linux/arch/amd64/linux_mmap.h
--- a/sys/compat/linux/arch/amd64/linux_mmap.h Sat Mar 14 07:23:46 2015 +0000
+++ b/sys/compat/linux/arch/amd64/linux_mmap.h Sat Mar 14 08:32:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mmap.h,v 1.2 2005/12/11 12:20:14 christos Exp $ */
+/* $NetBSD: linux_mmap.h,v 1.3 2015/03/14 08:32:07 njoly Exp $ */
/*-
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -34,12 +34,9 @@
#ifndef _AMD64_LINUX_MMAP_H
#define _AMD64_LINUX_MMAP_H
-#define LINUX_MAP_FIXED 0x10
-#define LINUX_MAP_ANON 0x20
+#define LINUX_MAP_FIXED 0x0010
+#define LINUX_MAP_ANON 0x0020
#define LINUX_MAP_GROWSDOWN 0x0100
-
-
-
-
+#define LINUX_MAP_LOCKED 0x2000
#endif /* !_AMD64_LINUX_MMAP_H */
diff -r 5d8fcdbc1bc2 -r 543b443b9bd9 sys/compat/linux/arch/arm/linux_mmap.h
--- a/sys/compat/linux/arch/arm/linux_mmap.h Sat Mar 14 07:23:46 2015 +0000
+++ b/sys/compat/linux/arch/arm/linux_mmap.h Sat Mar 14 08:32:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mmap.h,v 1.4 2008/04/28 20:23:42 martin Exp $ */
+/* $NetBSD: linux_mmap.h,v 1.5 2015/03/14 08:32:07 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -38,13 +38,13 @@
#define LINUX_MAP_FIXED 0x0010
#define LINUX_MAP_ANON 0x0020
+#define LINUX_MAP_LOCKED 0x2000
/* the following flags are silently ignored */
#define LINUX_MAP_GROWSDOWN 0x0100
#define LINUX_MAP_DENYWRITE 0x0800
#define LINUX_MAP_EXECUTABLE 0x1000
-#define LINUX_MAP_LOCKED 0x2000
#define LINUX_MAP_NORESERVE 0x4000
#endif /* !_ARM_LINUX_MMAP_H */
diff -r 5d8fcdbc1bc2 -r 543b443b9bd9 sys/compat/linux/arch/i386/linux_mmap.h
--- a/sys/compat/linux/arch/i386/linux_mmap.h Sat Mar 14 07:23:46 2015 +0000
+++ b/sys/compat/linux/arch/i386/linux_mmap.h Sat Mar 14 08:32:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mmap.h,v 1.6 2008/04/28 20:23:42 martin Exp $ */
+/* $NetBSD: linux_mmap.h,v 1.7 2015/03/14 08:32:08 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -38,13 +38,13 @@
#define LINUX_MAP_FIXED 0x0010
#define LINUX_MAP_ANON 0x0020
+#define LINUX_MAP_LOCKED 0x2000
/* the following flags are silently ignored */
#define LINUX_MAP_GROWSDOWN 0x0100
#define LINUX_MAP_DENYWRITE 0x0800
#define LINUX_MAP_EXECUTABLE 0x1000
-#define LINUX_MAP_LOCKED 0x2000
#define LINUX_MAP_NORESERVE 0x4000
#endif /* !_I386_LINUX_MMAP_H */
diff -r 5d8fcdbc1bc2 -r 543b443b9bd9 sys/compat/linux/arch/m68k/linux_mmap.h
--- a/sys/compat/linux/arch/m68k/linux_mmap.h Sat Mar 14 07:23:46 2015 +0000
+++ b/sys/compat/linux/arch/m68k/linux_mmap.h Sat Mar 14 08:32:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mmap.h,v 1.4 2008/04/28 20:23:42 martin Exp $ */
+/* $NetBSD: linux_mmap.h,v 1.5 2015/03/14 08:32:08 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -38,13 +38,13 @@
#define LINUX_MAP_FIXED 0x0010
#define LINUX_MAP_ANON 0x0020
+#define LINUX_MAP_LOCKED 0x2000
/* the following flags are silently ignored */
#define LINUX_MAP_GROWSDOWN 0x0100
#define LINUX_MAP_DENYWRITE 0x0800
#define LINUX_MAP_EXECUTABLE 0x1000
-#define LINUX_MAP_LOCKED 0x2000
#define LINUX_MAP_NORESERVE 0x4000
#endif /* !_M68K_LINUX_MMAP_H */
diff -r 5d8fcdbc1bc2 -r 543b443b9bd9 sys/compat/linux/arch/mips/linux_mmap.h
--- a/sys/compat/linux/arch/mips/linux_mmap.h Sat Mar 14 07:23:46 2015 +0000
+++ b/sys/compat/linux/arch/mips/linux_mmap.h Sat Mar 14 08:32:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mmap.h,v 1.8 2008/04/28 20:23:43 martin Exp $ */
+/* $NetBSD: linux_mmap.h,v 1.9 2015/03/14 08:32:08 njoly Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -42,6 +42,7 @@
*/
#define LINUX_MAP_FIXED 0x0010
#define LINUX_MAP_ANON 0x0800 /* MAP_ANONYMOUS for Linux */
+#define LINUX_MAP_LOCKED 0x8000
/* Ignored */
#define LINUX_MAP_RENAME 0x0020
@@ -52,6 +53,5 @@
#define LINUX_MAP_GROWSDOWN 0x1000
#define LINUX_MAP_DENYWRITE 0x2000
#define LINUX_MAP_EXECUTABLE 0x4000
-#define LINUX_MAP_LOCKED 0x8000
#endif /* !_MIPS_LINUX_MMAP_H */
diff -r 5d8fcdbc1bc2 -r 543b443b9bd9 sys/compat/linux/arch/powerpc/linux_mmap.h
--- a/sys/compat/linux/arch/powerpc/linux_mmap.h Sat Mar 14 07:23:46 2015 +0000
+++ b/sys/compat/linux/arch/powerpc/linux_mmap.h Sat Mar 14 08:32:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mmap.h,v 1.6 2008/04/28 20:23:43 martin Exp $ */
+/* $NetBSD: linux_mmap.h,v 1.7 2015/03/14 08:32:08 njoly Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -42,6 +42,7 @@
*/
#define LINUX_MAP_FIXED 0x0010
#define LINUX_MAP_ANON 0x0020
+#define LINUX_MAP_LOCKED 0x0080
/* Ignored */
#define LINUX_MAP_NORESERVE 0x0040
diff -r 5d8fcdbc1bc2 -r 543b443b9bd9 sys/compat/linux/arch/sparc/linux_mmap.h
--- a/sys/compat/linux/arch/sparc/linux_mmap.h Sat Mar 14 07:23:46 2015 +0000
+++ b/sys/compat/linux/arch/sparc/linux_mmap.h Sat Mar 14 08:32:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mmap.h,v 1.4 2008/04/28 20:23:43 martin Exp $ */
+/* $NetBSD: linux_mmap.h,v 1.5 2015/03/14 08:32:08 njoly Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,11 +37,11 @@
#define LINUX_MAP_FIXED 0x0010
#define LINUX_MAP_ANON 0x0020
+#define LINUX_MAP_LOCKED 0x0100
/* Ignored */
#define LINUX_MAP_NORESERVE 0x0040
#define LINUX_MAP_INHERIT 0x0080
-#define LINUX_MAP_LOCKED 0x0100
#define LINUX_MAP_GROWSDOWN 0x0100
#define LINUX_MAP_DENYWRITE 0x0800
diff -r 5d8fcdbc1bc2 -r 543b443b9bd9 sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c Sat Mar 14 07:23:46 2015 +0000
+++ b/sys/compat/linux/common/linux_misc.c Sat Mar 14 08:32:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.230 2014/11/22 13:18:45 njoly Exp $ */
+/* $NetBSD: linux_misc.c,v 1.231 2015/03/14 08:32:08 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.230 2014/11/22 13:18:45 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.231 2015/03/14 08:32:08 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -465,6 +465,7 @@
flags |= cvtto_bsd_mask(fl, LINUX_MAP_PRIVATE, MAP_PRIVATE);
flags |= cvtto_bsd_mask(fl, LINUX_MAP_FIXED, MAP_FIXED);
flags |= cvtto_bsd_mask(fl, LINUX_MAP_ANON, MAP_ANON);
+ flags |= cvtto_bsd_mask(fl, LINUX_MAP_LOCKED, MAP_WIRED);
/* XXX XAX ERH: Any other flags here? There are more defined... */
SCARG(cma, addr) = (void *)SCARG(uap, addr);
Home |
Main Index |
Thread Index |
Old Index