diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-12-17 06:58:12 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-12-17 06:58:12 +0000 |
commit | a45b759c4782fe513ec89d5d4bb06bf38784f061 (patch) | |
tree | 2f819accb4d69bd46127e29bbe803b2c5e5ad7ae /sys/arch | |
parent | 055668cf6b0974a1072d2833eb7db870dc7f43be (diff) |
Prefer MADV_* over POSIX_MADV_* in kernel for consistency: the latter
doesn't have all the values and therefore can't be used everywhere.
ok deraadt@ kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/sparc/pmap.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/pmap.c | 5 | ||||
-rw-r--r-- | sys/arch/vax/vax/pmap.c | 5 |
3 files changed, 6 insertions, 8 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index 6415d3707f1..bf7d480e92f 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.171 2014/12/17 06:05:52 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.172 2014/12/17 06:58:10 guenther Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -6257,7 +6257,7 @@ pmap_remove_holes(struct vm_map *map) (void)uvm_map(map, &shole, ehole - shole, NULL, UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(PROT_NONE, PROT_NONE, MAP_INHERIT_SHARE, - POSIX_MADV_RANDOM, + MADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED)); } #endif diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index 49bfbc0a9a4..5df58a80294 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.84 2014/12/15 02:24:23 guenther Exp $ */ +/* $OpenBSD: pmap.c,v 1.85 2014/12/17 06:58:10 guenther Exp $ */ /* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */ #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ /* @@ -3639,8 +3639,7 @@ pmap_remove_holes(struct vm_map *map) return; (void)uvm_map(map, &shole, ehole - shole, NULL, UVM_UNKNOWN_OFFSET, 0, - UVM_MAPFLAG(PROT_NONE, PROT_NONE, MAP_INHERIT_SHARE, - POSIX_MADV_RANDOM, + UVM_MAPFLAG(PROT_NONE, PROT_NONE, MAP_INHERIT_SHARE, MADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED)); } diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c index f8643dd4fbe..6a51efe013e 100644 --- a/sys/arch/vax/vax/pmap.c +++ b/sys/arch/vax/vax/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.73 2014/12/15 02:24:23 guenther Exp $ */ +/* $OpenBSD: pmap.c,v 1.74 2014/12/17 06:58:10 guenther Exp $ */ /* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */ /* * Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden. @@ -868,8 +868,7 @@ pmap_remove_holes(struct vm_map *map) return; (void)uvm_map(map, &shole, ehole - shole, NULL, UVM_UNKNOWN_OFFSET, 0, - UVM_MAPFLAG(PROT_NONE, PROT_NONE, MAP_INHERIT_SHARE, - POSIX_MADV_RANDOM, + UVM_MAPFLAG(PROT_NONE, PROT_NONE, MAP_INHERIT_SHARE, MADV_RANDOM, UVM_FLAG_NOMERGE | UVM_FLAG_HOLE | UVM_FLAG_FIXED)); } |