diff options
96 files changed, 347 insertions, 618 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 7e8d2ca6569..2c6e6a49bf1 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysconf.c,v 1.19 2014/04/08 14:04:11 mpi Exp $ */ +/* $OpenBSD: sysconf.c,v 1.20 2014/07/08 17:19:21 deraadt Exp $ */ /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -38,8 +38,6 @@ #include <sys/resource.h> #include <sys/socket.h> -#include <uvm/uvm_extern.h> - #include <errno.h> #include <grp.h> #include <pthread.h> diff --git a/lib/librthread/rthread_np.c b/lib/librthread/rthread_np.c index 9d057f3602a..347ddb62892 100644 --- a/lib/librthread/rthread_np.c +++ b/lib/librthread/rthread_np.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_np.c,v 1.12 2014/07/01 03:32:18 guenther Exp $ */ +/* $OpenBSD: rthread_np.c,v 1.13 2014/07/08 17:19:22 deraadt Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * Copyright (c) 2005 Otto Moerbeek <otto@openbsd.org> @@ -32,7 +32,6 @@ #include <string.h> #include <unistd.h> -#include <uvm/uvm_extern.h> #include <machine/spinlock.h> #include "rthread.h" diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index d777a2d597d..2601ebeb4ce 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rstat_proc.c,v 1.30 2013/05/15 04:23:44 miod Exp $ */ +/* $OpenBSD: rstat_proc.c,v 1.31 2014/07/08 17:19:23 deraadt Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -36,12 +36,10 @@ */ #include <sys/param.h> -#include <sys/vmmeter.h> #include <sys/dkstat.h> #include <sys/socket.h> #include <sys/sysctl.h> #include <net/if.h> -#include <uvm/uvm_extern.h> #include <stdio.h> #include <stdlib.h> diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c index 4c5c81a4613..5f98be13441 100644 --- a/sbin/fsck_ffs/pass5.c +++ b/sbin/fsck_ffs/pass5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass5.c,v 1.44 2014/05/21 18:53:05 krw Exp $ */ +/* $OpenBSD: pass5.c,v 1.45 2014/07/08 17:19:24 deraadt Exp $ */ /* $NetBSD: pass5.c,v 1.16 1996/09/27 22:45:18 christos Exp $ */ /* @@ -34,7 +34,6 @@ #include <sys/time.h> #include <sys/lock.h> #include <sys/ucred.h> -#include <ufs/ufs/dinode.h> #include <ufs/ffs/fs.h> #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> diff --git a/sys/arch/hppa/hppa/intr.c b/sys/arch/hppa/hppa/intr.c index b850fd608cc..e51588a7854 100644 --- a/sys/arch/hppa/hppa/intr.c +++ b/sys/arch/hppa/hppa/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.42 2013/11/26 20:33:12 deraadt Exp $ */ +/* $OpenBSD: intr.c,v 1.43 2014/07/08 17:19:24 deraadt Exp $ */ /* * Copyright (c) 2002-2004 Michael Shalayeff @@ -33,7 +33,7 @@ #include <sys/evcount.h> #include <sys/malloc.h> -#include <uvm/uvm_extern.h> /* for uvmexp */ +#include <uvm/uvm_extern.h> #include <machine/autoconf.h> #include <machine/frame.h> diff --git a/sys/arch/hppa64/hppa64/intr.c b/sys/arch/hppa64/hppa64/intr.c index fd563137dea..75601ac783e 100644 --- a/sys/arch/hppa64/hppa64/intr.c +++ b/sys/arch/hppa64/hppa64/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.8 2013/07/12 04:08:26 jsg Exp $ */ +/* $OpenBSD: intr.c,v 1.9 2014/07/08 17:19:24 deraadt Exp $ */ /* * Copyright (c) 2002-2004 Michael Shalayeff @@ -35,7 +35,7 @@ #include <sys/evcount.h> #include <sys/malloc.h> -#include <uvm/uvm_extern.h> /* for uvmexp */ +#include <uvm/uvm_extern.h> #include <machine/autoconf.h> #include <machine/cpufunc.h> diff --git a/sys/arch/i386/pci/piixpcib.c b/sys/arch/i386/pci/piixpcib.c index 0107c18b380..37bfb011623 100644 --- a/sys/arch/i386/pci/piixpcib.c +++ b/sys/arch/i386/pci/piixpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: piixpcib.c,v 1.9 2014/03/29 18:09:29 guenther Exp $ */ +/* $OpenBSD: piixpcib.c,v 1.10 2014/07/08 17:19:24 deraadt Exp $ */ /* * Copyright (c) 2007 Stefan Sperling <stsp@stsp.in-berlin.de> @@ -58,6 +58,8 @@ #include <sys/proc.h> #include <sys/sysctl.h> +#include <uvm/uvm_extern.h> + #include <machine/bus.h> #include <dev/pci/pcireg.h> diff --git a/sys/arch/mips64/mips64/softintr.c b/sys/arch/mips64/mips64/softintr.c index 7b475c68894..414b95d6a71 100644 --- a/sys/arch/mips64/mips64/softintr.c +++ b/sys/arch/mips64/mips64/softintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softintr.c,v 1.15 2012/10/03 11:18:23 miod Exp $ */ +/* $OpenBSD: softintr.c,v 1.16 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */ /* @@ -37,6 +37,7 @@ */ #include <sys/param.h> +#include <sys/mutex.h> #include <sys/malloc.h> #include <uvm/uvm_extern.h> diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index c72d584d901..5b495837eb3 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.81 2014/01/30 00:51:13 dlg Exp $ */ +/* $OpenBSD: pmap.c,v 1.82 2014/07/08 17:19:25 deraadt 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 */ /* @@ -31,8 +31,8 @@ #include <sys/param.h> #include <sys/malloc.h> #include <sys/queue.h> -#include <sys/proc.h> #include <sys/systm.h> +#include <sys/proc.h> #include <sys/msgbuf.h> #include <sys/lock.h> #include <sys/pool.h> diff --git a/sys/arch/vax/vax/softintr.c b/sys/arch/vax/vax/softintr.c index 1d99ca7cdc4..e48c1af132a 100644 --- a/sys/arch/vax/vax/softintr.c +++ b/sys/arch/vax/vax/softintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softintr.c,v 1.2 2010/12/21 14:56:24 claudio Exp $ */ +/* $OpenBSD: softintr.c,v 1.3 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */ /* @@ -37,6 +37,7 @@ */ #include <sys/param.h> +#include <sys/mutex.h> #include <sys/malloc.h> #include <uvm/uvm_extern.h> diff --git a/sys/arch/zaurus/dev/zaurus_apm.c b/sys/arch/zaurus/dev/zaurus_apm.c index 68e957d40e2..f9f5eb656d7 100644 --- a/sys/arch/zaurus/dev/zaurus_apm.c +++ b/sys/arch/zaurus/dev/zaurus_apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_apm.c,v 1.26 2014/03/31 12:11:42 mpi Exp $ */ +/* $OpenBSD: zaurus_apm.c,v 1.27 2014/07/08 17:19:25 deraadt Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de> @@ -24,6 +24,8 @@ #include <sys/proc.h> #include <sys/buf.h> #include <sys/sysctl.h> +#include <sys/mutex.h> +#include <sys/lock.h> #include <sys/reboot.h> #include <arm/xscale/pxa2x0reg.h> diff --git a/sys/crypto/criov.c b/sys/crypto/criov.c index a2ca3e9d55c..21fed67ec55 100644 --- a/sys/crypto/criov.c +++ b/sys/crypto/criov.c @@ -1,4 +1,4 @@ -/* $OpenBSD: criov.c,v 1.16 2006/12/29 13:04:37 pedro Exp $ */ +/* $OpenBSD: criov.c,v 1.17 2014/07/08 17:19:25 deraadt Exp $ */ /* * Copyright (c) 1999 Theo de Raadt @@ -33,8 +33,6 @@ #include <sys/kernel.h> #include <sys/mbuf.h> -#include <uvm/uvm_extern.h> - #include <crypto/cryptodev.h> void diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c index c0d241c71f3..d59dfd0176b 100644 --- a/sys/dev/ic/aac.c +++ b/sys/dev/ic/aac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aac.c,v 1.62 2014/01/17 22:52:32 dlg Exp $ */ +/* $OpenBSD: aac.c,v 1.63 2014/07/08 17:19:25 deraadt Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -57,8 +57,6 @@ #include <machine/bus.h> -#include <uvm/uvm_extern.h> - #include <scsi/scsi_all.h> #include <scsi/scsi_disk.h> #include <scsi/scsiconf.h> diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c index 02a5fcf3b97..8f2ea5fde3f 100644 --- a/sys/dev/ic/aic6915.c +++ b/sys/dev/ic/aic6915.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6915.c,v 1.11 2013/11/26 09:50:32 mpi Exp $ */ +/* $OpenBSD: aic6915.c,v 1.12 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $ */ /*- @@ -49,8 +49,6 @@ #include <sys/errno.h> #include <sys/device.h> -#include <uvm/uvm_extern.h> - #include <net/if.h> #include <net/if_dl.h> diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index 559239ae048..da599fdab11 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.81 2014/03/19 10:09:19 mpi Exp $ */ +/* $OpenBSD: atw.c,v 1.82 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -49,8 +49,6 @@ #include <machine/endian.h> -#include <uvm/uvm_extern.h> - #include <net/if.h> #include <net/if_dl.h> #include <net/if_media.h> diff --git a/sys/dev/ic/bt463.c b/sys/dev/ic/bt463.c index c85748a2ae8..1ee7a8197b7 100644 --- a/sys/dev/ic/bt463.c +++ b/sys/dev/ic/bt463.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt463.c,v 1.12 2008/06/26 05:42:15 ray Exp $ */ +/* $OpenBSD: bt463.c,v 1.13 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: bt463.c,v 1.2 2000/06/13 17:21:06 nathanw Exp $ */ /*- @@ -69,8 +69,6 @@ #include <sys/kernel.h> #include <sys/malloc.h> -#include <uvm/uvm_extern.h> - #include <dev/pci/pcivar.h> #include <dev/pci/tgareg.h> #include <dev/pci/tgavar.h> diff --git a/sys/dev/ic/bt485.c b/sys/dev/ic/bt485.c index 49ab349b8ad..263742f45cd 100644 --- a/sys/dev/ic/bt485.c +++ b/sys/dev/ic/bt485.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bt485.c,v 1.13 2007/11/26 09:28:33 martynas Exp $ */ +/* $OpenBSD: bt485.c,v 1.14 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: bt485.c,v 1.2 2000/04/02 18:55:01 nathanw Exp $ */ /* @@ -39,8 +39,6 @@ #include <sys/kernel.h> #include <sys/malloc.h> -#include <uvm/uvm_extern.h> - #include <dev/pci/pcivar.h> #include <dev/ic/bt485reg.h> #include <dev/ic/bt485var.h> diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c index 86b86b2bd9f..5f5cc92f866 100644 --- a/sys/dev/ic/gdt_common.c +++ b/sys/dev/ic/gdt_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt_common.c,v 1.62 2013/03/04 00:41:54 dlg Exp $ */ +/* $OpenBSD: gdt_common.c,v 1.63 2014/07/08 17:19:25 deraadt Exp $ */ /* * Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved. @@ -39,8 +39,6 @@ #include <machine/bus.h> -#include <uvm/uvm_extern.h> - #include <scsi/scsi_all.h> #include <scsi/scsi_disk.h> #include <scsi/scsiconf.h> diff --git a/sys/dev/ic/i82365.c b/sys/dev/ic/i82365.c index ebb87061422..797391f7945 100644 --- a/sys/dev/ic/i82365.c +++ b/sys/dev/ic/i82365.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82365.c,v 1.30 2013/11/18 20:21:51 deraadt Exp $ */ +/* $OpenBSD: i82365.c,v 1.31 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: i82365.c,v 1.10 1998/06/09 07:36:55 thorpej Exp $ */ /* @@ -39,8 +39,6 @@ #include <sys/malloc.h> #include <sys/kthread.h> -#include <uvm/uvm_extern.h> - #include <machine/bus.h> #include <machine/intr.h> diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c index 11859eb988c..6db2fdc4b76 100644 --- a/sys/dev/ic/i82596.c +++ b/sys/dev/ic/i82596.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82596.c,v 1.36 2013/11/27 06:48:50 deraadt Exp $ */ +/* $OpenBSD: i82596.c,v 1.37 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */ /*- @@ -161,8 +161,6 @@ Mode of operation: #include <netinet/if_ether.h> #endif -#include <uvm/uvm_extern.h> - #include <machine/bus.h> #include <dev/ic/i82596reg.h> diff --git a/sys/dev/ic/ibm561.c b/sys/dev/ic/ibm561.c index d9310553ed6..6581384aa78 100644 --- a/sys/dev/ic/ibm561.c +++ b/sys/dev/ic/ibm561.c @@ -1,5 +1,5 @@ /* $NetBSD: ibm561.c,v 1.1 2001/12/12 07:46:48 elric Exp $ */ -/* $OpenBSD: ibm561.c,v 1.6 2010/11/11 17:47:00 miod Exp $ */ +/* $OpenBSD: ibm561.c,v 1.7 2014/07/08 17:19:25 deraadt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,8 +37,6 @@ #include <sys/kernel.h> #include <sys/malloc.h> -#include <uvm/uvm_extern.h> - #include <dev/pci/pcivar.h> #include <dev/ic/ibm561reg.h> #include <dev/ic/ibm561var.h> diff --git a/sys/dev/ic/isp_openbsd.h b/sys/dev/ic/isp_openbsd.h index 71279c4c7bc..ac7e57ff246 100644 --- a/sys/dev/ic/isp_openbsd.h +++ b/sys/dev/ic/isp_openbsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_openbsd.h,v 1.35 2013/03/04 00:41:54 dlg Exp $ */ +/* $OpenBSD: isp_openbsd.h,v 1.36 2014/07/08 17:19:25 deraadt Exp $ */ /* * OpenBSD Specific definitions for the QLogic ISP Host Adapter */ @@ -50,8 +50,6 @@ #include <scsi/scsi_message.h> #include <scsi/scsi_debug.h> -#include <uvm/uvm_extern.h> - /* * Efficiency- get rid of SBus code && tests unless we need them. */ diff --git a/sys/dev/ic/lemac.c b/sys/dev/ic/lemac.c index 30908ff4604..0720126a5b4 100644 --- a/sys/dev/ic/lemac.c +++ b/sys/dev/ic/lemac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lemac.c,v 1.15 2013/11/26 09:50:33 mpi Exp $ */ +/* $OpenBSD: lemac.c,v 1.16 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: lemac.c,v 1.20 2001/06/13 10:46:02 wiz Exp $ */ /*- @@ -62,10 +62,6 @@ #include <dev/ic/lemacreg.h> #include <dev/ic/lemacvar.h> -#if 0 -#include <uvm/uvm_extern.h> -#endif - #include "bpfilter.h" #if NBPFILTER > 0 #include <net/bpf.h> diff --git a/sys/dev/ic/lsi64854.c b/sys/dev/ic/lsi64854.c index 97a1e6ef574..8ff1d1cdff6 100644 --- a/sys/dev/ic/lsi64854.c +++ b/sys/dev/ic/lsi64854.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lsi64854.c,v 1.9 2008/06/26 05:42:15 ray Exp $ */ +/* $OpenBSD: lsi64854.c,v 1.10 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: lsi64854.c,v 1.18 2001/06/04 20:56:51 mrg Exp $ */ /*- @@ -37,8 +37,6 @@ #include <sys/errno.h> #include <sys/device.h> -#include <uvm/uvm_extern.h> - #include <machine/bus.h> #include <machine/autoconf.h> #include <machine/cpu.h> diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index 232ad2a983a..e47023b1331 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: oosiop.c,v 1.20 2013/10/09 18:22:06 miod Exp $ */ +/* $OpenBSD: oosiop.c,v 1.21 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */ /* @@ -44,8 +44,6 @@ #include <sys/malloc.h> #include <sys/queue.h> -#include <uvm/uvm_extern.h> - #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> #include <scsi/scsi_message.h> diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index d880dcfd03b..651e75d91be 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtw.c,v 1.84 2014/03/19 10:09:19 mpi Exp $ */ +/* $OpenBSD: rtw.c,v 1.85 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */ /*- @@ -51,8 +51,6 @@ #include <machine/bus.h> #include <machine/intr.h> /* splnet */ -#include <uvm/uvm_extern.h> - #include <net/if.h> #include <net/if_media.h> diff --git a/sys/dev/ic/tcic2.c b/sys/dev/ic/tcic2.c index 83742e3d39d..f04e378055f 100644 --- a/sys/dev/ic/tcic2.c +++ b/sys/dev/ic/tcic2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcic2.c,v 1.9 2013/11/18 20:21:51 deraadt Exp $ */ +/* $OpenBSD: tcic2.c,v 1.10 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: tcic2.c,v 1.3 2000/01/13 09:38:17 joda Exp $ */ #undef TCICDEBUG @@ -41,8 +41,6 @@ #include <sys/malloc.h> #include <sys/kthread.h> -#include <uvm/uvm_extern.h> - #include <machine/bus.h> #include <machine/intr.h> diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index f107d2c69f0..cb3a1fcc789 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.123 2014/01/24 06:21:59 dlg Exp $ */ +/* $OpenBSD: wdc.c,v 1.124 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -64,7 +64,6 @@ #include <sys/proc.h> #include <sys/disk.h> #include <sys/pool.h> -#include <uvm/uvm_extern.h> #include <machine/intr.h> #include <machine/bus.h> diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c index 44451b9e584..aa8f62d1edc 100644 --- a/sys/dev/ipmi.c +++ b/sys/dev/ipmi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipmi.c,v 1.70 2014/05/04 18:18:36 sf Exp $ */ +/* $OpenBSD: ipmi.c,v 1.71 2014/07/08 17:19:25 deraadt Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave @@ -46,8 +46,6 @@ #include <dev/ipmivar.h> -#include <uvm/uvm_extern.h> - struct ipmi_sensor { u_int8_t *i_sdr; int i_num; diff --git a/sys/dev/ksyms.c b/sys/dev/ksyms.c index 635ebde3133..f93558e918b 100644 --- a/sys/dev/ksyms.c +++ b/sys/dev/ksyms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ksyms.c,v 1.24 2014/06/11 20:31:15 matthew Exp $ */ +/* $OpenBSD: ksyms.c,v 1.25 2014/07/08 17:19:25 deraadt Exp $ */ /* * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> * Copyright (c) 2001 Artur Grabowski <art@openbsd.org> @@ -34,8 +34,6 @@ #include <sys/fcntl.h> #include <sys/conf.h> -#include <uvm/uvm_extern.h> - #ifdef _NLIST_DO_ELF #include <sys/exec_elf.h> #endif diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c index 5dd9d310370..97c9eabb125 100644 --- a/sys/dev/pci/azalia_codec.c +++ b/sys/dev/pci/azalia_codec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia_codec.c,v 1.160 2014/05/25 16:00:53 ratchov Exp $ */ +/* $OpenBSD: azalia_codec.c,v 1.161 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */ /*- @@ -34,7 +34,6 @@ #include <sys/device.h> #include <sys/malloc.h> #include <sys/systm.h> -#include <uvm/uvm_param.h> #include <dev/pci/azalia.h> #define XNAME(co) (((struct device *)co->az)->dv_xname) diff --git a/sys/dev/pci/mmuagp.c b/sys/dev/pci/mmuagp.c index 631da4e9a02..bd6661c6d71 100644 --- a/sys/dev/pci/mmuagp.c +++ b/sys/dev/pci/mmuagp.c @@ -30,8 +30,6 @@ #include <sys/device.h> #include <sys/rwlock.h> -#include <uvm/uvm_extern.h> - #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> #include <dev/pci/agpvar.h> diff --git a/sys/dev/vesa/vesafb.c b/sys/dev/vesa/vesafb.c index 0524e6deff3..bee5b2c937b 100644 --- a/sys/dev/vesa/vesafb.c +++ b/sys/dev/vesa/vesafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vesafb.c,v 1.7 2009/11/11 00:01:34 fgsch Exp $ */ +/* $OpenBSD: vesafb.c,v 1.8 2014/07/08 17:19:25 deraadt Exp $ */ /*- * Copyright (c) 2006 Jared D. McNeill <jmcneill@invisible.ca> @@ -75,8 +75,6 @@ #include <dev/wscons/wsconsio.h> #include <dev/wscons/wsdisplayvar.h> -#include <uvm/uvm_extern.h> - void vesafb_set_mode(struct vga_pci_softc *, int); int vesafb_get_mode(struct vga_pci_softc *); diff --git a/sys/dev/video.c b/sys/dev/video.c index cb22de4efea..642c7274cc5 100644 --- a/sys/dev/video.c +++ b/sys/dev/video.c @@ -1,4 +1,4 @@ -/* $OpenBSD: video.c,v 1.29 2014/03/28 17:57:11 mpi Exp $ */ +/* $OpenBSD: video.c,v 1.30 2014/07/08 17:19:25 deraadt Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -31,9 +31,6 @@ #include <sys/conf.h> #include <sys/videoio.h> -#include <uvm/uvm_extern.h> -#include <uvm/uvm_pmap.h> - #include <dev/video_if.h> #include <dev/videovar.h> diff --git a/sys/kern/dma_alloc.c b/sys/kern/dma_alloc.c index 3892bed5676..94329b05e0f 100644 --- a/sys/kern/dma_alloc.c +++ b/sys/kern/dma_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma_alloc.c,v 1.11 2014/06/15 11:43:24 sf Exp $ */ +/* $OpenBSD: dma_alloc.c,v 1.12 2014/07/08 17:19:25 deraadt Exp $ */ /* * Copyright (c) 2010 Theo de Raadt <deraadt@openbsd.org> @@ -17,6 +17,7 @@ */ #include <sys/param.h> +#include <sys/systm.h> #include <sys/pool.h> #include <uvm/uvm_extern.h> diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 83090e72a92..5d7f006a28b 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.97 2014/03/30 21:54:48 guenther Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.98 2014/07/08 17:19:25 deraadt Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -85,7 +85,6 @@ #include <sys/stat.h> #include <sys/mman.h> -#include <uvm/uvm_extern.h> #include <machine/reg.h> #include <machine/exec.h> diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c index a7e345b9699..6fab186676f 100644 --- a/sys/kern/exec_script.c +++ b/sys/kern/exec_script.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_script.c,v 1.28 2012/04/22 05:43:14 guenther Exp $ */ +/* $OpenBSD: exec_script.c,v 1.29 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */ /* @@ -42,7 +42,6 @@ #include <sys/filedesc.h> #include <sys/exec.h> #include <sys/resourcevar.h> -#include <uvm/uvm_extern.h> #include <sys/exec_script.h> diff --git a/sys/kern/exec_subr.c b/sys/kern/exec_subr.c index a7ba940a410..a96deb31a5c 100644 --- a/sys/kern/exec_subr.c +++ b/sys/kern/exec_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_subr.c,v 1.34 2014/07/02 06:09:49 matthew Exp $ */ +/* $OpenBSD: exec_subr.c,v 1.35 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: exec_subr.c,v 1.9 1994/12/04 03:10:42 mycroft Exp $ */ /* @@ -41,7 +41,6 @@ #include <sys/mman.h> #include <sys/resourcevar.h> -#include <uvm/uvm_extern.h> #include <dev/rndvar.h> #ifdef DEBUG diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 41a9116f707..fa5444ce1aa 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.214 2014/06/15 11:43:24 sf Exp $ */ +/* $OpenBSD: init_main.c,v 1.215 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -84,9 +84,6 @@ #include <ufs/ufs/quota.h> - -#include <uvm/uvm_extern.h> - #include <net/if.h> #include <net/raw_cb.h> #include <net/netisr.h> diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index c7a22446693..62a95b4fa42 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.84 2013/12/24 01:11:00 tedu Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.85 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -47,7 +47,6 @@ #include <sys/user.h> #include <sys/resourcevar.h> #include <sys/signalvar.h> -#include <uvm/uvm_extern.h> #include <sys/sysctl.h> #include <sys/sched.h> #include <sys/timetc.h> diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 25604fb196e..6d9b15266fc 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.109 2014/06/15 20:39:22 matthew Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.110 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -61,8 +61,6 @@ #include <sys/pool.h> #include <sys/ktrace.h> -#include <uvm/uvm_extern.h> - #include <sys/pipe.h> /* diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 91bbc2e05b4..3031c65b9be 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.142 2014/05/15 03:52:25 guenther Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.143 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -59,8 +59,6 @@ #include <sys/syscallargs.h> -#include <uvm/uvm_extern.h> - #include <machine/reg.h> #ifdef __HAVE_MD_TCB diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 4d1d8445c2b..31164ad99cb 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.144 2014/07/04 05:58:30 guenther Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.145 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -45,6 +45,7 @@ #include <sys/time.h> #include <sys/resource.h> #include <sys/kernel.h> +#include <sys/sysctl.h> #include <sys/buf.h> #include <sys/wait.h> #include <sys/file.h> @@ -70,9 +71,6 @@ #include <sys/mount.h> #include <sys/syscallargs.h> - -#include <uvm/uvm_extern.h> - /* * exit -- * Death of process. diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 40760e1999d..63745ea5a71 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.169 2014/07/07 05:31:42 matthew Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.170 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -53,6 +53,7 @@ #include <sys/acct.h> #include <sys/ktrace.h> #include <sys/sched.h> +#include <sys/sysctl.h> #include <dev/rndvar.h> #include <sys/pool.h> #include <sys/mman.h> diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index d2f81f9e9a1..5d308bcf694 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.65 2014/03/30 21:54:48 guenther Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.66 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -48,8 +48,6 @@ #include <sys/syscall.h> #include <sys/syscallargs.h> -#include <uvm/uvm_extern.h> - void ktrinitheaderraw(struct ktr_header *, uint, pid_t, pid_t); void ktrinitheader(struct ktr_header *, struct proc *, int); void ktrstart(struct proc *, struct vnode *, struct ucred *); diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index f4da9b91b47..f46e714d219 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.168 2014/07/04 05:58:30 guenther Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.169 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -66,9 +66,6 @@ #include <sys/mount.h> #include <sys/syscallargs.h> - -#include <uvm/uvm_extern.h> - int filt_sigattach(struct knote *kn); void filt_sigdetach(struct knote *kn); int filt_signal(struct knote *kn, long hint); diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index d461fe2ec96..fbf768457d5 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_synch.c,v 1.115 2014/03/22 06:05:45 guenther Exp $ */ +/* $OpenBSD: kern_synch.c,v 1.116 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /* @@ -44,7 +44,6 @@ #include <sys/buf.h> #include <sys/signalvar.h> #include <sys/resourcevar.h> -#include <uvm/uvm_extern.h> #include <sys/sched.h> #include <sys/timeout.h> #include <sys/mount.h> diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index e3371250659..3b3f3bc43a0 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.254 2014/07/08 07:10:12 dlg Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.255 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -55,7 +55,6 @@ #include <sys/tty.h> #include <sys/disklabel.h> #include <sys/disk.h> -#include <uvm/uvm_extern.h> #include <sys/sysctl.h> #include <sys/msgbuf.h> #include <sys/dkstat.h> diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index cc03d48d8fb..2f54a2e708b 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_xxx.c,v 1.24 2014/03/26 05:23:42 guenther Exp $ */ +/* $OpenBSD: kern_xxx.c,v 1.25 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: kern_xxx.c,v 1.32 1996/04/22 01:38:41 christos Exp $ */ /* @@ -37,7 +37,6 @@ #include <sys/kernel.h> #include <sys/proc.h> #include <sys/reboot.h> -#include <uvm/uvm_extern.h> #include <sys/sysctl.h> #include <sys/mount.h> #include <sys/syscallargs.h> diff --git a/sys/kern/subr_poison.c b/sys/kern/subr_poison.c index b815404efef..725d001adb0 100644 --- a/sys/kern/subr_poison.c +++ b/sys/kern/subr_poison.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_poison.c,v 1.7 2014/05/19 14:30:03 tedu Exp $ */ +/* $OpenBSD: subr_poison.c,v 1.8 2014/07/08 17:19:25 deraadt Exp $ */ /* * Copyright (c) 2013 Ted Unangst <tedu@openbsd.org> * @@ -18,7 +18,6 @@ #include <sys/types.h> #include <sys/param.h> #include <sys/malloc.h> -#include <uvm/uvm_extern.h> /* * The POISON is used as known text to copy into free objects so diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c index 268216f7d98..ccef7c2aa22 100644 --- a/sys/kern/subr_prof.c +++ b/sys/kern/subr_prof.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_prof.c,v 1.25 2013/03/28 16:55:25 deraadt Exp $ */ +/* $OpenBSD: subr_prof.c,v 1.26 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: subr_prof.c,v 1.12 1996/04/22 01:38:50 christos Exp $ */ /*- @@ -45,7 +45,6 @@ #ifdef GPROF #include <sys/malloc.h> #include <sys/gmon.h> -#include <uvm/uvm_extern.h> /* * Flag to prevent CPUs from executing the mcount() monitor function diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 621b923b516..636dbd77f3d 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_generic.c,v 1.86 2014/03/30 21:54:48 guenther Exp $ */ +/* $OpenBSD: sys_generic.c,v 1.87 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */ /* @@ -60,8 +60,6 @@ #include <sys/mount.h> #include <sys/syscallargs.h> -#include <uvm/uvm_extern.h> - int selscan(struct proc *, fd_set *, fd_set *, int, int, register_t *); void pollscan(struct proc *, struct pollfd *, u_int, register_t *); int pollout(struct pollfd *, struct pollfd *, u_int); diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 4b35b831c3c..b41e9bdcdda 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.109 2014/07/04 05:58:31 guenther Exp $ */ +/* $OpenBSD: tty.c,v 1.110 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -60,7 +60,6 @@ #include <sys/namei.h> -#include <uvm/uvm_extern.h> #include <dev/rndvar.h> #include "pty.h" diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index 1095103c7c7..f34e03d6baf 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_domain.c,v 1.35 2014/03/11 19:45:28 guenther Exp $ */ +/* $OpenBSD: uipc_domain.c,v 1.36 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: uipc_domain.c,v 1.14 1996/02/09 19:00:44 christos Exp $ */ /* @@ -41,7 +41,6 @@ #include <sys/kernel.h> #include <sys/systm.h> #include <sys/proc.h> -#include <uvm/uvm_extern.h> #include <sys/sysctl.h> #include <sys/timeout.h> diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 38b2e9f0f92..936777e4709 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.155 2014/04/10 13:48:24 tedu Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.156 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /* @@ -58,8 +58,6 @@ #include <sys/kernel.h> #include <sys/specdev.h> -#include <uvm/uvm_extern.h> - int nobuffers; int needbuffer; struct bio_ops bioops; diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 35263ab72e5..c78fd3b1ed0 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cluster.c,v 1.40 2013/10/01 20:22:12 sf Exp $ */ +/* $OpenBSD: vfs_cluster.c,v 1.41 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: vfs_cluster.c,v 1.12 1996/04/22 01:39:05 christos Exp $ */ /* @@ -41,8 +41,6 @@ #include <sys/systm.h> #include <sys/resourcevar.h> -#include <uvm/uvm_extern.h> - void cluster_wbuild(struct vnode *, struct buf *, long, daddr_t, int, daddr_t); struct cluster_save *cluster_collectbufs(struct vnode *, struct cluster_info *, diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 00e9bc7c7a3..7fad89681ab 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.214 2014/06/04 07:58:14 claudio Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.215 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -44,6 +44,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/proc.h> +#include <sys/sysctl.h> #include <sys/mount.h> #include <sys/time.h> #include <sys/fcntl.h> @@ -64,9 +65,6 @@ #include <netinet/in.h> -#include <uvm/uvm_extern.h> -#include <sys/sysctl.h> - enum vtype iftovt_tab[16] = { VNON, VFIFO, VCHR, VNON, VDIR, VNON, VBLK, VNON, VREG, VNON, VLNK, VNON, VSOCK, VNON, VNON, VBAD, diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index c3860ba191b..7fb1adebd27 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.206 2014/05/25 18:46:44 guenther Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.207 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -42,6 +42,7 @@ #include <sys/namei.h> #include <sys/filedesc.h> #include <sys/kernel.h> +#include <sys/sysctl.h> #include <sys/file.h> #include <sys/stat.h> #include <sys/vnode.h> @@ -57,9 +58,6 @@ #include <sys/syscallargs.h> -#include <uvm/uvm_extern.h> -#include <sys/sysctl.h> - extern int suid_clear; int usermount = 0; /* sysctl: by default, users may not mount */ diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 39123cbcffe..8971904785a 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.75 2014/01/24 06:00:01 guenther Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.76 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -57,8 +57,6 @@ #include <sys/filedesc.h> #include <sys/specdev.h> -#include <uvm/uvm_extern.h> - int vn_read(struct file *, off_t *, struct uio *, struct ucred *); int vn_write(struct file *, off_t *, struct uio *, struct ucred *); int vn_poll(struct file *, int, struct proc *); diff --git a/sys/miscfs/procfs/procfs_cmdline.c b/sys/miscfs/procfs/procfs_cmdline.c index 756804ec954..3fc4d784bc0 100644 --- a/sys/miscfs/procfs/procfs_cmdline.c +++ b/sys/miscfs/procfs/procfs_cmdline.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_cmdline.c,v 1.11 2014/07/04 05:58:31 guenther Exp $ */ +/* $OpenBSD: procfs_cmdline.c,v 1.12 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: procfs_cmdline.c,v 1.3 1999/03/13 22:26:48 thorpej Exp $ */ /* @@ -47,7 +47,6 @@ #include <sys/exec.h> #include <sys/malloc.h> #include <miscfs/procfs/procfs.h> -#include <uvm/uvm_extern.h> /* * code for returning process's command line arguments diff --git a/sys/miscfs/procfs/procfs_linux.c b/sys/miscfs/procfs/procfs_linux.c index 51a673c639e..5480072e037 100644 --- a/sys/miscfs/procfs/procfs_linux.c +++ b/sys/miscfs/procfs/procfs_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_linux.c,v 1.8 2007/06/18 08:30:07 jasper Exp $ */ +/* $OpenBSD: procfs_linux.c,v 1.9 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: procfs_linux.c,v 1.2.4.1 2001/03/30 21:48:11 he Exp $ */ /* @@ -45,8 +45,6 @@ #include <miscfs/procfs/procfs.h> -#include <uvm/uvm_extern.h> - #define PGTOB(p) ((unsigned long)(p) << PAGE_SHIFT) #define PGTOKB(p) ((unsigned long)(p) << (PAGE_SHIFT - 10)) diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c index 21c008b9e7b..ec082c66a21 100644 --- a/sys/miscfs/procfs/procfs_vfsops.c +++ b/sys/miscfs/procfs/procfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_vfsops.c,v 1.30 2014/05/06 11:50:14 mpi Exp $ */ +/* $OpenBSD: procfs_vfsops.c,v 1.31 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: procfs_vfsops.c,v 1.25 1996/02/09 22:40:53 christos Exp $ */ /* @@ -54,8 +54,6 @@ #include <miscfs/procfs/procfs.h> -#include <uvm/uvm_extern.h> - int procfs_mount(struct mount *, const char *, void *, struct nameidata *, struct proc *); int procfs_start(struct mount *, int, struct proc *); diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 67cfe4422c7..5804414e5d1 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_vnops.c,v 1.59 2014/01/21 01:48:22 tedu Exp $ */ +/* $OpenBSD: procfs_vnops.c,v 1.60 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: procfs_vnops.c,v 1.40 1996/03/16 23:52:55 christos Exp $ */ /* @@ -56,8 +56,6 @@ #include <sys/ptrace.h> #include <sys/stat.h> -#include <uvm/uvm_extern.h> /* for PAGE_SIZE */ - #include <machine/reg.h> #include <miscfs/procfs/procfs.h> diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index 34852d96c3b..13de3bd2fbe 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_denode.c,v 1.47 2013/12/24 00:18:46 halex Exp $ */ +/* $OpenBSD: msdosfs_denode.c,v 1.48 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */ /*- @@ -59,8 +59,6 @@ #include <sys/dirent.h> #include <sys/namei.h> -#include <uvm/uvm_extern.h> - #include <msdosfs/bpb.h> #include <msdosfs/msdosfsmount.h> #include <msdosfs/direntry.h> diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 482f1ee94e7..e376b567a71 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.93 2014/05/09 03:48:58 tedu Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.94 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */ /*- @@ -68,8 +68,6 @@ #include <sys/lockf.h> #include <sys/poll.h> -#include <uvm/uvm_extern.h> - #include <msdosfs/bpb.h> #include <msdosfs/direntry.h> #include <msdosfs/denode.h> diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 88e3904016a..3594b440369 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.147 2014/05/31 15:36:44 claudio Exp $ */ +/* $OpenBSD: rtsock.c,v 1.148 2014/07/08 17:19:25 deraadt Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -64,15 +64,13 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/proc.h> +#include <sys/sysctl.h> #include <sys/mbuf.h> #include <sys/socket.h> #include <sys/socketvar.h> #include <sys/domain.h> #include <sys/protosw.h> -#include <uvm/uvm_extern.h> -#include <sys/sysctl.h> - #include <net/if.h> #include <net/route.h> #include <net/raw_cb.h> diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 0bc618ad0ab..8622e3a9853 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: igmp.c,v 1.40 2014/05/12 09:15:00 mpi Exp $ */ +/* $OpenBSD: igmp.c,v 1.41 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */ /* @@ -77,6 +77,7 @@ #include <sys/param.h> #include <sys/mbuf.h> +#include <sys/systm.h> #include <sys/socket.h> #include <sys/protosw.h> #include <sys/proc.h> diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index ed39eb78e25..5835011215b 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.194 2014/04/14 09:06:42 mpi Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.195 2014/07/08 17:19:26 deraadt Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr), @@ -41,11 +41,11 @@ #include "pfsync.h" #include <sys/param.h> +#include <sys/systm.h> #include <sys/mbuf.h> #include <sys/socket.h> #include <sys/kernel.h> #include <sys/proc.h> -#include <sys/sysctl.h> #include <sys/timeout.h> #include <net/if.h> diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 7f0520cdce8..fba04a8e448 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.c,v 1.144 2014/05/07 08:09:33 mpi Exp $ */ +/* $OpenBSD: icmp6.c,v 1.145 2014/07/08 17:19:26 deraadt Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -68,6 +68,7 @@ #include <sys/systm.h> #include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/sysctl.h> #include <sys/protosw.h> #include <sys/socket.h> #include <sys/socketvar.h> @@ -2810,9 +2811,6 @@ icmp6_redirect_timeout(struct rtentry *rt, struct rttimer *r) } } -#include <uvm/uvm_extern.h> -#include <sys/sysctl.h> - int *icmpv6ctl_vars[ICMPV6CTL_MAXID] = ICMPV6CTL_VARS; int diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index c2a6168798f..160c083d5ca 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.126 2014/06/03 13:32:24 mpi Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.127 2014/07/08 17:19:26 deraadt Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -68,6 +68,7 @@ #include <sys/systm.h> #include <sys/mbuf.h> #include <sys/domain.h> +#include <sys/sysctl.h> #include <sys/protosw.h> #include <sys/socket.h> #include <sys/socketvar.h> @@ -1391,9 +1392,6 @@ u_char inet6ctlerrmap[PRC_NCMDS] = { ENOPROTOOPT }; -#include <uvm/uvm_extern.h> -#include <sys/sysctl.h> - int *ipv6ctl_vars[IPV6CTL_MAXID] = IPV6CTL_VARS; int diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index ac815226f6f..c3415e5799a 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_bio.c,v 1.75 2013/09/14 02:28:03 guenther Exp $ */ +/* $OpenBSD: nfs_bio.c,v 1.76 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */ /* @@ -48,8 +48,6 @@ #include <sys/queue.h> #include <sys/time.h> -#include <uvm/uvm_extern.h> - #include <nfs/rpcv2.h> #include <nfs/nfsproto.h> #include <nfs/nfs.h> diff --git a/sys/nfs/nfs_kq.c b/sys/nfs/nfs_kq.c index a3035d4c9b8..e42dae30f25 100644 --- a/sys/nfs/nfs_kq.c +++ b/sys/nfs/nfs_kq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_kq.c,v 1.18 2014/06/15 11:43:24 sf Exp $ */ +/* $OpenBSD: nfs_kq.c,v 1.19 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: nfs_kq.c,v 1.7 2003/10/30 01:43:10 simonb Exp $ */ /*- @@ -43,8 +43,6 @@ #include <sys/rwlock.h> #include <sys/queue.h> -#include <uvm/uvm_extern.h> - #include <nfs/rpcv2.h> #include <nfs/nfsproto.h> #include <nfs/nfs.h> diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index 1fd4f5aab23..84b8201d03e 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_serv.c,v 1.95 2014/04/21 12:49:34 beck Exp $ */ +/* $OpenBSD: nfs_serv.c,v 1.96 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */ /* @@ -72,8 +72,6 @@ #include <sys/queue.h> #include <ufs/ufs/dir.h> -#include <uvm/uvm_extern.h> - #include <nfs/nfsproto.h> #include <nfs/rpcv2.h> #include <nfs/nfs.h> diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 0dad3f82628..86917324819 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.115 2013/11/27 16:02:54 jsing Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.116 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -56,8 +56,6 @@ #include <sys/time.h> #include <sys/specdev.h> -#include <uvm/uvm_extern.h> - #include <nfs/rpcv2.h> #include <nfs/nfsproto.h> #include <nfs/nfsnode.h> diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 4a149e6b143..fc708ae0f2c 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.150 2014/01/18 07:10:26 deraadt Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.151 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -63,8 +63,6 @@ #include <sys/specdev.h> #include <sys/unistd.h> -#include <uvm/uvm_extern.h> - #include <miscfs/fifofs/fifo.h> #include <nfs/rpcv2.h> diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c index b0ce12aa41a..e128580677f 100644 --- a/sys/ntfs/ntfs_vfsops.c +++ b/sys/ntfs/ntfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_vfsops.c,v 1.38 2014/01/19 18:35:45 tedu Exp $ */ +/* $OpenBSD: ntfs_vfsops.c,v 1.39 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */ /*- @@ -45,8 +45,6 @@ #include <sys/conf.h> #include <sys/specdev.h> -#include <uvm/uvm_extern.h> - /*#define NTFS_DEBUG 1*/ #include <ntfs/ntfs.h> #include <ntfs/ntfs_inode.h> diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index afc8268044f..b9e38a95369 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.h,v 1.146 2014/07/04 05:58:30 guenther Exp $ */ +/* $OpenBSD: sysctl.h,v 1.147 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: sysctl.h,v 1.16 1996/04/09 20:55:36 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #ifndef _SYS_SYSCTL_H_ #define _SYS_SYSCTL_H_ -#include <uvm/uvm_extern.h> +#include <uvm/uvmexp.h> /* * Definitions for sysctl call. The sysctl call uses a hierarchical name diff --git a/sys/tmpfs/tmpfs_mem.c b/sys/tmpfs/tmpfs_mem.c index 269054e48d5..65ff1ab9072 100644 --- a/sys/tmpfs/tmpfs_mem.c +++ b/sys/tmpfs/tmpfs_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs_mem.c,v 1.2 2013/06/03 10:37:02 espie Exp $ */ +/* $OpenBSD: tmpfs_mem.c,v 1.3 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: tmpfs_mem.c,v 1.4 2011/05/24 01:09:47 rmind Exp $ */ /* @@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: tmpfs_mem.c,v 1.4 2011/05/24 01:09:47 rmind Exp $"); #include <sys/namei.h> #include <sys/pool.h> #include <sys/vnode.h> +#include <sys/sysctl.h> #include <sys/malloc.h> #include <tmpfs/tmpfs.h> diff --git a/sys/tmpfs/tmpfs_vnops.c b/sys/tmpfs/tmpfs_vnops.c index 8f9edf2f33a..c2cd812e701 100644 --- a/sys/tmpfs/tmpfs_vnops.c +++ b/sys/tmpfs/tmpfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs_vnops.c,v 1.16 2014/03/28 17:57:11 mpi Exp $ */ +/* $OpenBSD: tmpfs_vnops.c,v 1.17 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $ */ /* @@ -55,8 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland E #include <sys/poll.h> #include <sys/file.h> -#include <uvm/uvm_extern.h> - #include <miscfs/fifofs/fifo.h> #include <tmpfs/tmpfs_vnops.h> #include <tmpfs/tmpfs.h> diff --git a/sys/ufs/ext2fs/ext2fs_balloc.c b/sys/ufs/ext2fs/ext2fs_balloc.c index 6d81503f77b..ed372437c57 100644 --- a/sys/ufs/ext2fs/ext2fs_balloc.c +++ b/sys/ufs/ext2fs/ext2fs_balloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_balloc.c,v 1.20 2014/05/27 14:31:24 krw Exp $ */ +/* $OpenBSD: ext2fs_balloc.c,v 1.21 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ext2fs_balloc.c,v 1.10 2001/07/04 21:16:01 chs Exp $ */ /* @@ -41,8 +41,6 @@ #include <sys/file.h> #include <sys/vnode.h> -#include <uvm/uvm_extern.h> - #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/ufs_extern.h> diff --git a/sys/ufs/ext2fs/ext2fs_inode.c b/sys/ufs/ext2fs/ext2fs_inode.c index e49690beedc..83f9feedc45 100644 --- a/sys/ufs/ext2fs/ext2fs_inode.c +++ b/sys/ufs/ext2fs/ext2fs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_inode.c,v 1.48 2014/05/27 14:31:24 krw Exp $ */ +/* $OpenBSD: ext2fs_inode.c,v 1.49 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ext2fs_inode.c,v 1.24 2001/06/19 12:59:18 wiz Exp $ */ /* @@ -45,8 +45,6 @@ #include <sys/malloc.h> #include <sys/resourcevar.h> -#include <uvm/uvm_extern.h> - #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/ufsmount.h> diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c index 7ded537a6cc..5f3ffee498a 100644 --- a/sys/ufs/ext2fs/ext2fs_vnops.c +++ b/sys/ufs/ext2fs/ext2fs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vnops.c,v 1.65 2014/05/27 14:31:24 krw Exp $ */ +/* $OpenBSD: ext2fs_vnops.c,v 1.66 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */ /* @@ -57,8 +57,6 @@ #include <sys/signalvar.h> #include <sys/specdev.h> -#include <uvm/uvm_extern.h> - #include <miscfs/fifofs/fifo.h> #include <ufs/ufs/quota.h> diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index be4a6944837..1d3e4781d6a 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_alloc.c,v 1.100 2014/05/22 02:02:39 guenther Exp $ */ +/* $OpenBSD: ffs_alloc.c,v 1.101 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */ /* @@ -52,8 +52,6 @@ #include <sys/stdint.h> #include <sys/time.h> -#include <uvm/uvm_extern.h> - #include <dev/rndvar.h> #include <ufs/ufs/quota.h> diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index 18b25daaba0..032ce0cef62 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_balloc.c,v 1.41 2014/05/22 02:02:39 guenther Exp $ */ +/* $OpenBSD: ffs_balloc.c,v 1.42 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ffs_balloc.c,v 1.3 1996/02/09 22:22:21 christos Exp $ */ /* @@ -49,8 +49,6 @@ #include <sys/mount.h> #include <sys/vnode.h> -#include <uvm/uvm_extern.h> - #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/ufsmount.h> diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 1848e583b49..cc34620e32b 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_inode.c,v 1.69 2014/05/22 02:02:39 guenther Exp $ */ +/* $OpenBSD: ffs_inode.c,v 1.70 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */ /* @@ -43,8 +43,6 @@ #include <sys/malloc.h> #include <sys/resourcevar.h> -#include <uvm/uvm_extern.h> - #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/ufsmount.h> diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index bdad4df548e..7b1c5491877 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vnops.c,v 1.76 2014/05/22 02:02:39 guenther Exp $ */ +/* $OpenBSD: ffs_vnops.c,v 1.77 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */ /* @@ -49,8 +49,6 @@ #include <sys/event.h> #include <sys/specdev.h> -#include <uvm/uvm_extern.h> - #include <miscfs/fifofs/fifo.h> #include <ufs/ufs/quota.h> diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 7b1991707e5..f1095937234 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_lookup.c,v 1.44 2013/12/12 19:15:32 tedu Exp $ */ +/* $OpenBSD: ufs_lookup.c,v 1.45 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ufs_lookup.c,v 1.7 1996/02/09 22:36:06 christos Exp $ */ /* @@ -48,8 +48,6 @@ #include <sys/proc.h> #include <sys/vnode.h> -#include <uvm/uvm_extern.h> - #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/dir.h> diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 5f9fa643686..40d9ec225de 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.113 2014/03/19 04:17:33 guenther Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.114 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -57,8 +57,6 @@ #include <sys/poll.h> #include <sys/specdev.h> -#include <uvm/uvm_extern.h> - #include <miscfs/fifofs/fifo.h> #include <ufs/ufs/quota.h> diff --git a/sys/uvm/uvm.h b/sys/uvm/uvm.h index ffc27ed5970..9a3a44f7edb 100644 --- a/sys/uvm/uvm.h +++ b/sys/uvm/uvm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm.h,v 1.54 2014/07/08 14:22:43 deraadt Exp $ */ +/* $OpenBSD: uvm.h,v 1.55 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: uvm.h,v 1.24 2000/11/27 08:40:02 chs Exp $ */ /* @@ -45,11 +45,12 @@ #include <uvm/uvm_glue.h> #include <uvm/uvm_km.h> #include <uvm/uvm_swap.h> -#include <uvm/uvm_pmemrange.h> #ifdef UVM_SWAP_ENCRYPT #include <uvm/uvm_swap_encrypt.h> #endif +#include <uvm/uvm_pmemrange.h> + /* * uvm structure (vm global state: collected in one structure for ease * of reference...) diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index 314c1b915e6..9d031f00b46 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.117 2014/07/02 06:09:49 matthew Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.118 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -69,21 +69,6 @@ #ifndef _UVM_UVM_EXTERN_H_ #define _UVM_UVM_EXTERN_H_ -/* - * uvm_extern.h: this file defines the external interface to the VM system. - * - * this should be the only file included by non-VM parts of the kernel - * which need access to VM services. if you want to know the interface - * to the MI VM layer without knowing the details, this is the file to - * learn. - * - * NOTE: vm system calls are prototyped in syscallargs.h - */ - -/* - * typedefs, necessary for standard UVM headers. - */ - typedef unsigned int uvm_flag_t; typedef int vm_fault_t; @@ -102,14 +87,6 @@ typedef struct vm_map *vm_map_t; struct vm_page; typedef struct vm_page *vm_page_t; -/* - * defines - */ - -/* - * the following defines are for uvm_map and functions which call it. - */ - /* protections bits */ #define UVM_PROT_MASK 0x07 /* protection mask */ #define UVM_PROT_NONE 0x00 /* protection none */ @@ -231,188 +208,34 @@ typedef int vm_prot_t; #define UVM_LK_EXIT 0x00000002 /* leave map locked on exit */ /* - * flags to uvm_physload. + * flags to uvm_page_physload. */ #define PHYSLOAD_DEVICE 0x01 /* don't add to the page queue */ -/* - * structures - */ +#include <sys/queue.h> +#include <sys/tree.h> +#include <sys/lock.h> +#ifdef _KERNEL struct buf; struct core; struct mount; struct pglist; -struct proc; -struct ucred; -struct uio; -struct uvm_object; -struct vm_anon; -struct vm_aref; -struct vm_map; struct vmspace; struct pmap; -struct vnode; -struct pool; - -/* - * uvm_constraint_range's: - * MD code is allowed to setup constraint ranges for memory allocators, the - * primary use for this is to keep allocation for certain memory consumers - * such as mbuf pools withing address ranges that are reachable by devices - * that perform DMA. - * - * It is also to discourge memory allocations from being satisfied from ranges - * such as the ISA memory range, if they can be satisfied with allocation - * from other ranges. - * - * the MD ranges are defined in arch/ARCH/ARCH/machdep.c - */ -struct uvm_constraint_range { - paddr_t ucr_low; - paddr_t ucr_high; -}; - -extern struct pool *uvm_aiobuf_pool; - -/* - * uvmexp: global data structures that are exported to parts of the kernel - * other than the vm system. - */ - -struct uvmexp { - /* vm_page constants */ - int pagesize; /* size of a page (PAGE_SIZE): must be power of 2 */ - int pagemask; /* page mask */ - int pageshift; /* page shift */ - - /* vm_page counters */ - int npages; /* number of pages we manage */ - int free; /* number of free pages */ - int active; /* number of active pages */ - int inactive; /* number of pages that we free'd but may want back */ - int paging; /* number of pages in the process of being paged out */ - int wired; /* number of wired pages */ - - int zeropages; /* number of zero'd pages */ - int reserve_pagedaemon; /* number of pages reserved for pagedaemon */ - int reserve_kernel; /* number of pages reserved for kernel */ - int anonpages; /* number of pages used by anon pagers */ - int vnodepages; /* number of pages used by vnode page cache */ - int vtextpages; /* number of pages used by vtext vnodes */ - - /* pageout params */ - int freemin; /* min number of free pages */ - int freetarg; /* target number of free pages */ - int inactarg; /* target number of inactive pages */ - int wiredmax; /* max number of wired pages */ - int anonmin; /* min threshold for anon pages */ - int vtextmin; /* min threshold for vtext pages */ - int vnodemin; /* min threshold for vnode pages */ - int anonminpct; /* min percent anon pages */ - int vtextminpct;/* min percent vtext pages */ - int vnodeminpct;/* min percent vnode pages */ - - /* swap */ - int nswapdev; /* number of configured swap devices in system */ - int swpages; /* number of PAGE_SIZE'ed swap pages */ - int swpginuse; /* number of swap pages in use */ - int swpgonly; /* number of swap pages in use, not also in RAM */ - int nswget; /* number of times fault calls uvm_swap_get() */ - int nanon; /* number total of anon's in system */ - int nanonneeded;/* number of anons currently needed */ - int nfreeanon; /* number of free anon's */ - - /* stat counters */ - int faults; /* page fault count */ - int traps; /* trap count */ - int intrs; /* interrupt count */ - int swtch; /* context switch count */ - int softs; /* software interrupt count */ - int syscalls; /* system calls */ - int pageins; /* pagein operation count */ - /* pageouts are in pdpageouts below */ - int obsolete_swapins; /* swapins */ - int obsolete_swapouts; /* swapouts */ - int pgswapin; /* pages swapped in */ - int pgswapout; /* pages swapped out */ - int forks; /* forks */ - int forks_ppwait; /* forks where parent waits */ - int forks_sharevm; /* forks where vmspace is shared */ - int pga_zerohit; /* pagealloc where zero wanted and zero - was available */ - int pga_zeromiss; /* pagealloc where zero wanted and zero - not available */ - int zeroaborts; /* number of times page zeroing was - aborted */ - - /* fault subcounters */ - int fltnoram; /* number of times fault was out of ram */ - int fltnoanon; /* number of times fault was out of anons */ - int fltpgwait; /* number of times fault had to wait on a page */ - int fltpgrele; /* number of times fault found a released page */ - int fltrelck; /* number of times fault relock called */ - int fltrelckok; /* number of times fault relock is a success */ - int fltanget; /* number of times fault gets anon page */ - int fltanretry; /* number of times fault retrys an anon get */ - int fltamcopy; /* number of times fault clears "needs copy" */ - int fltnamap; /* number of times fault maps a neighbor anon page */ - int fltnomap; /* number of times fault maps a neighbor obj page */ - int fltlget; /* number of times fault does a locked pgo_get */ - int fltget; /* number of times fault does an unlocked get */ - int flt_anon; /* number of times fault anon (case 1a) */ - int flt_acow; /* number of times fault anon cow (case 1b) */ - int flt_obj; /* number of times fault is on object page (2a) */ - int flt_prcopy; /* number of times fault promotes with copy (2b) */ - int flt_przero; /* number of times fault promotes with zerofill (2b) */ - - /* daemon counters */ - int pdwoke; /* number of times daemon woke up */ - int pdrevs; /* number of times daemon rev'd clock hand */ - int pdswout; /* number of times daemon called for swapout */ - int pdfreed; /* number of pages daemon freed since boot */ - int pdscans; /* number of pages daemon scanned since boot */ - int pdanscan; /* number of anonymous pages scanned by daemon */ - int pdobscan; /* number of object pages scanned by daemon */ - int pdreact; /* number of pages daemon reactivated since boot */ - int pdbusy; /* number of times daemon found a busy page */ - int pdpageouts; /* number of times daemon started a pageout */ - int pdpending; /* number of times daemon got a pending pagout */ - int pddeact; /* number of pages daemon deactivates */ - int pdreanon; /* anon pages reactivated due to min threshold */ - int pdrevnode; /* vnode pages reactivated due to min threshold */ - int pdrevtext; /* vtext pages reactivated due to min threshold */ - - int fpswtch; /* FPU context switches */ - int kmapent; /* number of kernel map entries */ -}; - -#ifdef _KERNEL -extern struct uvmexp uvmexp; #endif -/* - * Finally, bring in standard UVM headers. - */ -#include <sys/vmmeter.h> -#include <sys/queue.h> -#include <sys/tree.h> -#include <sys/lock.h> -#include <sys/mutex.h> - #include <uvm/uvm_param.h> + #include <uvm/uvm_pmap.h> #include <uvm/uvm_object.h> #include <uvm/uvm_page.h> #include <uvm/uvm_map.h> + +#ifdef _KERNEL #include <uvm/uvm_fault.h> #include <uvm/uvm_pager.h> - -/* Constraint ranges, set by MD code. */ -extern struct uvm_constraint_range isa_constraint; -extern struct uvm_constraint_range dma_constraint; -extern struct uvm_constraint_range no_constraint; -extern struct uvm_constraint_range *uvm_md_constraints[]; +#endif /* * Shareable process virtual address space. @@ -437,8 +260,37 @@ struct vmspace { caddr_t vm_minsaddr; /* user VA at top of stack */ }; +/* + * uvm_constraint_range's: + * MD code is allowed to setup constraint ranges for memory allocators, the + * primary use for this is to keep allocation for certain memory consumers + * such as mbuf pools withing address ranges that are reachable by devices + * that perform DMA. + * + * It is also to discourge memory allocations from being satisfied from ranges + * such as the ISA memory range, if they can be satisfied with allocation + * from other ranges. + * + * the MD ranges are defined in arch/ARCH/ARCH/machdep.c + */ +struct uvm_constraint_range { + paddr_t ucr_low; + paddr_t ucr_high; +}; + #ifdef _KERNEL +#include <uvm/uvmexp.h> +extern struct uvmexp uvmexp; + +/* Constraint ranges, set by MD code. */ +extern struct uvm_constraint_range isa_constraint; +extern struct uvm_constraint_range dma_constraint; +extern struct uvm_constraint_range no_constraint; +extern struct uvm_constraint_range *uvm_md_constraints[]; + +extern struct pool *uvm_aiobuf_pool; + /* * used to keep state while iterating over the map for a core dump. */ @@ -462,53 +314,27 @@ extern struct vm_map *kmem_map; extern struct vm_map *phys_map; -/* - * macros - */ - /* zalloc zeros memory, alloc does not */ #define uvm_km_zalloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,0,TRUE) #define uvm_km_alloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,0,FALSE) -#endif /* _KERNEL */ - #ifdef pmap_resident_count #define vm_resident_count(vm) (pmap_resident_count((vm)->vm_map.pmap)) #else #define vm_resident_count(vm) ((vm)->vm_rssize) #endif -/* XXX clean up later */ -struct buf; -struct loadavg; -struct proc; -struct pmap; -struct vmspace; -struct mount; -struct vnode; -struct core; - -#ifdef _KERNEL - -/* vm_machdep.c */ -void vmapbuf(struct buf *, vsize_t); -void vunmapbuf(struct buf *, vsize_t); -void cpu_fork(struct proc *, struct proc *, void *, size_t, - void (*)(void *), void *); - -/* uvm_aobj.c */ +void vmapbuf(struct buf *, vsize_t); +void vunmapbuf(struct buf *, vsize_t); +void cpu_fork(struct proc *, struct proc *, void *, + size_t, void (*)(void *), void *); struct uvm_object *uao_create(vsize_t, int); void uao_detach(struct uvm_object *); void uao_detach_locked(struct uvm_object *); void uao_reference(struct uvm_object *); void uao_reference_locked(struct uvm_object *); +int uvm_fault(vm_map_t, vaddr_t, vm_fault_t, vm_prot_t); -/* uvm_fault.c */ -int uvm_fault(vm_map_t, vaddr_t, - vm_fault_t, vm_prot_t); - /* handle a page fault */ - -/* uvm_glue.c */ #if defined(KGDB) void uvm_chgkprot(caddr_t, size_t, int); #endif @@ -521,24 +347,16 @@ boolean_t uvm_kernacc(caddr_t, size_t, int); int uvm_vslock(struct proc *, caddr_t, size_t, vm_prot_t); void uvm_vsunlock(struct proc *, caddr_t, size_t); - int uvm_vslock_device(struct proc *, void *, size_t, vm_prot_t, void **); void uvm_vsunlock_device(struct proc *, void *, size_t, void *); void uvm_pause(void); - - -/* uvm_init.c */ void uvm_init(void); - /* init the uvm system */ - -/* uvm_io.c */ int uvm_io(vm_map_t, struct uio *, int); #define UVM_IO_FIXPROT 0x01 -/* uvm_km.c */ vaddr_t uvm_km_alloc1(vm_map_t, vsize_t, vsize_t, boolean_t); void uvm_km_free(vm_map_t, vaddr_t, vsize_t); void uvm_km_free_wakeup(vm_map_t, vaddr_t, vsize_t); @@ -550,14 +368,11 @@ vaddr_t uvm_km_kmemalloc_pla(struct vm_map *, vaddr_t uvm_km_valloc(vm_map_t, vsize_t); vaddr_t uvm_km_valloc_try(vm_map_t, vsize_t); vaddr_t uvm_km_valloc_wait(vm_map_t, vsize_t); -vaddr_t uvm_km_valloc_align(struct vm_map *, vsize_t, vsize_t, int); -vaddr_t uvm_km_valloc_prefer_wait(vm_map_t, vsize_t, - voff_t); - -struct vm_map *uvm_km_suballoc(vm_map_t, vaddr_t *, - vaddr_t *, vsize_t, int, - boolean_t, vm_map_t); - +vaddr_t uvm_km_valloc_align(struct vm_map *, vsize_t, + vsize_t, int); +vaddr_t uvm_km_valloc_prefer_wait(vm_map_t, vsize_t, voff_t); +struct vm_map *uvm_km_suballoc(vm_map_t, vaddr_t *, vaddr_t *, + vsize_t, int, boolean_t, vm_map_t); /* * Allocation mode for virtual space. * @@ -645,52 +460,42 @@ extern const struct kmem_dyn_mode kd_waitok; extern const struct kmem_dyn_mode kd_nowait; extern const struct kmem_dyn_mode kd_trylock; - -void *km_alloc(size_t, const struct kmem_va_mode *, const struct kmem_pa_mode *, - const struct kmem_dyn_mode *); -void km_free(void *, size_t, const struct kmem_va_mode *, - const struct kmem_pa_mode *); - -/* uvm_map.c */ +void *km_alloc(size_t, const struct kmem_va_mode *, + const struct kmem_pa_mode *, + const struct kmem_dyn_mode *); +void km_free(void *, size_t, const struct kmem_va_mode *, + const struct kmem_pa_mode *); int uvm_map(vm_map_t, vaddr_t *, vsize_t, - struct uvm_object *, voff_t, vsize_t, - uvm_flag_t); + struct uvm_object *, voff_t, vsize_t, uvm_flag_t); int uvm_map_pageable(vm_map_t, vaddr_t, - vaddr_t, boolean_t, int); + vaddr_t, boolean_t, int); int uvm_map_pageable_all(vm_map_t, int, vsize_t); boolean_t uvm_map_checkprot(vm_map_t, vaddr_t, - vaddr_t, vm_prot_t); + vaddr_t, vm_prot_t); int uvm_map_protect(vm_map_t, vaddr_t, - vaddr_t, vm_prot_t, boolean_t); + vaddr_t, vm_prot_t, boolean_t); struct vmspace *uvmspace_alloc(vaddr_t, vaddr_t, - boolean_t, boolean_t); + boolean_t, boolean_t); void uvmspace_init(struct vmspace *, struct pmap *, - vaddr_t, vaddr_t, boolean_t, boolean_t); + vaddr_t, vaddr_t, boolean_t, boolean_t); void uvmspace_exec(struct proc *, vaddr_t, vaddr_t); struct vmspace *uvmspace_fork(struct process *); void uvmspace_free(struct vmspace *); struct vmspace *uvmspace_share(struct process *); - - -/* uvm_meter.c */ void uvm_meter(void); int uvm_sysctl(int *, u_int, void *, size_t *, - void *, size_t, struct proc *); - -/* uvm_mmap.c */ + void *, size_t, struct proc *); int uvm_mmap(vm_map_t, vaddr_t *, vsize_t, - vm_prot_t, vm_prot_t, int, - caddr_t, voff_t, vsize_t, struct proc *); - -/* uvm_page.c */ + vm_prot_t, vm_prot_t, int, + caddr_t, voff_t, vsize_t, struct proc *); struct vm_page *uvm_pagealloc(struct uvm_object *, - voff_t, struct vm_anon *, int); + voff_t, struct vm_anon *, int); vaddr_t uvm_pagealloc_contig(vaddr_t, vaddr_t, - vaddr_t, vaddr_t); + vaddr_t, vaddr_t); void uvm_pagealloc_multi(struct uvm_object *, voff_t, vsize_t, int); void uvm_pagerealloc(struct vm_page *, - struct uvm_object *, voff_t); + struct uvm_object *, voff_t); void uvm_pagerealloc_multi(struct uvm_object *, voff_t, vsize_t, int, struct uvm_constraint_range *); /* Actually, uvm_page_physload takes PF#s which need their own type */ @@ -698,50 +503,29 @@ void uvm_page_physload(paddr_t, paddr_t, paddr_t, paddr_t, int); void uvm_setpagesize(void); void uvm_shutdown(void); - -/* uvm_pager.c */ void uvm_aio_biodone1(struct buf *); void uvm_aio_biodone(struct buf *); void uvm_aio_aiodone(struct buf *); - -/* uvm_pdaemon.c */ void uvm_pageout(void *); void uvm_aiodone_daemon(void *); void uvm_wait(const char *); - -/* uvm_pglist.c */ -int uvm_pglistalloc(psize_t, paddr_t, - paddr_t, paddr_t, paddr_t, - struct pglist *, int, int); +int uvm_pglistalloc(psize_t, paddr_t, paddr_t, + paddr_t, paddr_t, struct pglist *, int, int); void uvm_pglistfree(struct pglist *); - -/* uvm_pmemrange.c */ void uvm_pmr_use_inc(paddr_t, paddr_t); - -/* uvm_swap.c */ void uvm_swap_init(void); - -/* uvm_unix.c */ int uvm_coredump(struct proc *, struct vnode *, - struct ucred *, struct core *); + struct ucred *, struct core *); int uvm_coredump_walkmap(struct proc *, - void *, - int (*)(struct proc *, void *, - struct uvm_coredump_state *), void *); + void *, int (*)(struct proc *, void *, + struct uvm_coredump_state *), void *); void uvm_grow(struct proc *, vaddr_t); - -/* uvm_user.c */ void uvm_deallocate(vm_map_t, vaddr_t, vsize_t); - -/* uvm_vnode.c */ void uvm_vnp_setsize(struct vnode *, voff_t); void uvm_vnp_sync(struct mount *); void uvm_vnp_terminate(struct vnode *); - /* terminate a uvm/uvn object */ boolean_t uvm_vnp_uncache(struct vnode *); struct uvm_object *uvn_attach(struct vnode *, vm_prot_t); - -/* kern_malloc.c */ void kmeminit_nkmempages(void); void kmeminit(void); extern u_int nkmempages; diff --git a/sys/uvm/uvm_km.h b/sys/uvm/uvm_km.h index 76a2ce95720..caf40d4e26d 100644 --- a/sys/uvm/uvm_km.h +++ b/sys/uvm/uvm_km.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_km.h,v 1.11 2010/07/15 00:14:17 tedu Exp $ */ +/* $OpenBSD: uvm_km.h,v 1.12 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: uvm_km.h,v 1.9 1999/06/21 17:25:11 thorpej Exp $ */ /* @@ -44,6 +44,8 @@ #ifdef _KERNEL +#include <sys/mutex.h> + /* * prototypes */ diff --git a/sys/uvm/uvm_param.h b/sys/uvm/uvm_param.h index 224f393be6d..f09fabc562c 100644 --- a/sys/uvm/uvm_param.h +++ b/sys/uvm/uvm_param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_param.h,v 1.16 2014/07/08 11:38:48 deraadt Exp $ */ +/* $OpenBSD: uvm_param.h,v 1.17 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: uvm_param.h,v 1.5 2001/03/09 01:02:12 chs Exp $ */ /* @@ -68,99 +68,20 @@ #ifndef _VM_PARAM_ #define _VM_PARAM_ +#ifdef _KERNEL + #include <machine/vmparam.h> -/* - * This belongs in types.h, but breaks too many existing programs. - */ typedef int boolean_t; -#ifndef TRUE #define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif +#define FALSE 0 -/* - * The machine independent pages are referred to as PAGES. A page - * is some number of hardware pages, depending on the target machine. - */ #define DEFAULT_PAGE_SIZE 4096 -#if defined(_KERNEL) && !defined(PAGE_SIZE) -/* - * All references to the size of a page should be done with PAGE_SIZE - * or PAGE_SHIFT. The fact they are variables is hidden here so that - * we can easily make them constant if we so desire. - */ -#define PAGE_SIZE uvmexp.pagesize /* size of page */ -#define PAGE_MASK uvmexp.pagemask /* size of page - 1 */ -#define PAGE_SHIFT uvmexp.pageshift /* bits to shift for pages */ -#endif /* _KERNEL */ - -/* - * CTL_VM identifiers - */ -#define VM_METER 1 /* struct vmmeter */ -#define VM_LOADAVG 2 /* struct loadavg */ -#define VM_PSSTRINGS 3 /* PSSTRINGS */ -#define VM_UVMEXP 4 /* struct uvmexp */ -#define VM_SWAPENCRYPT 5 /* int */ -#define VM_NKMEMPAGES 6 /* int - # kmem_map pages */ -#define VM_ANONMIN 7 -#define VM_VTEXTMIN 8 -#define VM_VNODEMIN 9 -#define VM_MAXSLP 10 -#define VM_USPACE 11 -#define VM_MAXID 12 /* number of valid vm ids */ - -#define CTL_VM_NAMES { \ - { 0, 0 }, \ - { "vmmeter", CTLTYPE_STRUCT }, \ - { "loadavg", CTLTYPE_STRUCT }, \ - { "psstrings", CTLTYPE_STRUCT }, \ - { "uvmexp", CTLTYPE_STRUCT }, \ - { "swapencrypt", CTLTYPE_NODE }, \ - { "nkmempages", CTLTYPE_INT }, \ - { "anonmin", CTLTYPE_INT }, \ - { "vtextmin", CTLTYPE_INT }, \ - { "vnodemin", CTLTYPE_INT }, \ - { "maxslp", CTLTYPE_INT }, \ - { "uspace", CTLTYPE_INT }, \ -} - -struct _ps_strings { - void *val; -}; - -#define SWAPSKIPBYTES 8192 /* never use at the start of a swap space */ - -#ifndef ASSEMBLER -/* - * Convert addresses to pages and vice versa. - * No rounding is used. - */ -#ifdef _KERNEL #define atop(x) ((x) >> PAGE_SHIFT) #define ptoa(x) ((paddr_t)(x) << PAGE_SHIFT) - -/* - * Round off or truncate to the nearest page. These will work - * for either addresses or counts (i.e., 1 byte rounds to 1 page). - */ #define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK) #define trunc_page(x) ((x) & ~PAGE_MASK) -extern psize_t mem_size; /* size of physical memory (bytes) */ - -#else -/* out-of-kernel versions of round_page and trunc_page */ -#define round_page(x) \ - ((((vaddr_t)(x) + (vm_page_size - 1)) / vm_page_size) * \ - vm_page_size) -#define trunc_page(x) \ - ((((vaddr_t)(x)) / vm_page_size) * vm_page_size) - #endif /* _KERNEL */ -#endif /* ASSEMBLER */ #endif /* _VM_PARAM_ */ diff --git a/sys/uvm/uvmexp.h b/sys/uvm/uvmexp.h new file mode 100644 index 00000000000..cae4458d756 --- /dev/null +++ b/sys/uvm/uvmexp.h @@ -0,0 +1,152 @@ +/* $OpenBSD: uvmexp.h,v 1.1 2014/07/08 17:19:26 deraadt Exp $ */ + +#ifndef _UVM_UVMEXP_ +#define _UVM_UVMEXP_ + +/* + * CTL_VM identifiers + */ +#define VM_METER 1 /* struct vmmeter */ +#define VM_LOADAVG 2 /* struct loadavg */ +#define VM_PSSTRINGS 3 /* PSSTRINGS */ +#define VM_UVMEXP 4 /* struct uvmexp */ +#define VM_SWAPENCRYPT 5 /* int */ +#define VM_NKMEMPAGES 6 /* int - # kmem_map pages */ +#define VM_ANONMIN 7 +#define VM_VTEXTMIN 8 +#define VM_VNODEMIN 9 +#define VM_MAXSLP 10 +#define VM_USPACE 11 +#define VM_MAXID 12 /* number of valid vm ids */ + +#define CTL_VM_NAMES { \ + { 0, 0 }, \ + { "vmmeter", CTLTYPE_STRUCT }, \ + { "loadavg", CTLTYPE_STRUCT }, \ + { "psstrings", CTLTYPE_STRUCT }, \ + { "uvmexp", CTLTYPE_STRUCT }, \ + { "swapencrypt", CTLTYPE_NODE }, \ + { "nkmempages", CTLTYPE_INT }, \ + { "anonmin", CTLTYPE_INT }, \ + { "vtextmin", CTLTYPE_INT }, \ + { "vnodemin", CTLTYPE_INT }, \ + { "maxslp", CTLTYPE_INT }, \ + { "uspace", CTLTYPE_INT }, \ +} + +/* + * uvmexp: global data structures that are exported to parts of the kernel + * other than the vm system. + */ +struct uvmexp { + /* vm_page constants */ + int pagesize; /* size of a page (PAGE_SIZE): must be power of 2 */ + int pagemask; /* page mask */ + int pageshift; /* page shift */ + + /* vm_page counters */ + int npages; /* number of pages we manage */ + int free; /* number of free pages */ + int active; /* number of active pages */ + int inactive; /* number of pages that we free'd but may want back */ + int paging; /* number of pages in the process of being paged out */ + int wired; /* number of wired pages */ + + int zeropages; /* number of zero'd pages */ + int reserve_pagedaemon; /* number of pages reserved for pagedaemon */ + int reserve_kernel; /* number of pages reserved for kernel */ + int anonpages; /* number of pages used by anon pagers */ + int vnodepages; /* number of pages used by vnode page cache */ + int vtextpages; /* number of pages used by vtext vnodes */ + + /* pageout params */ + int freemin; /* min number of free pages */ + int freetarg; /* target number of free pages */ + int inactarg; /* target number of inactive pages */ + int wiredmax; /* max number of wired pages */ + int anonmin; /* min threshold for anon pages */ + int vtextmin; /* min threshold for vtext pages */ + int vnodemin; /* min threshold for vnode pages */ + int anonminpct; /* min percent anon pages */ + int vtextminpct;/* min percent vtext pages */ + int vnodeminpct;/* min percent vnode pages */ + + /* swap */ + int nswapdev; /* number of configured swap devices in system */ + int swpages; /* number of PAGE_SIZE'ed swap pages */ + int swpginuse; /* number of swap pages in use */ + int swpgonly; /* number of swap pages in use, not also in RAM */ + int nswget; /* number of times fault calls uvm_swap_get() */ + int nanon; /* number total of anon's in system */ + int nanonneeded;/* number of anons currently needed */ + int nfreeanon; /* number of free anon's */ + + /* stat counters */ + int faults; /* page fault count */ + int traps; /* trap count */ + int intrs; /* interrupt count */ + int swtch; /* context switch count */ + int softs; /* software interrupt count */ + int syscalls; /* system calls */ + int pageins; /* pagein operation count */ + /* pageouts are in pdpageouts below */ + int obsolete_swapins; /* swapins */ + int obsolete_swapouts; /* swapouts */ + int pgswapin; /* pages swapped in */ + int pgswapout; /* pages swapped out */ + int forks; /* forks */ + int forks_ppwait; /* forks where parent waits */ + int forks_sharevm; /* forks where vmspace is shared */ + int pga_zerohit; /* pagealloc where zero wanted and zero + was available */ + int pga_zeromiss; /* pagealloc where zero wanted and zero + not available */ + int zeroaborts; /* number of times page zeroing was + aborted */ + + /* fault subcounters */ + int fltnoram; /* number of times fault was out of ram */ + int fltnoanon; /* number of times fault was out of anons */ + int fltpgwait; /* number of times fault had to wait on a page */ + int fltpgrele; /* number of times fault found a released page */ + int fltrelck; /* number of times fault relock called */ + int fltrelckok; /* number of times fault relock is a success */ + int fltanget; /* number of times fault gets anon page */ + int fltanretry; /* number of times fault retrys an anon get */ + int fltamcopy; /* number of times fault clears "needs copy" */ + int fltnamap; /* number of times fault maps a neighbor anon page */ + int fltnomap; /* number of times fault maps a neighbor obj page */ + int fltlget; /* number of times fault does a locked pgo_get */ + int fltget; /* number of times fault does an unlocked get */ + int flt_anon; /* number of times fault anon (case 1a) */ + int flt_acow; /* number of times fault anon cow (case 1b) */ + int flt_obj; /* number of times fault is on object page (2a) */ + int flt_prcopy; /* number of times fault promotes with copy (2b) */ + int flt_przero; /* number of times fault promotes with zerofill (2b) */ + + /* daemon counters */ + int pdwoke; /* number of times daemon woke up */ + int pdrevs; /* number of times daemon rev'd clock hand */ + int pdswout; /* number of times daemon called for swapout */ + int pdfreed; /* number of pages daemon freed since boot */ + int pdscans; /* number of pages daemon scanned since boot */ + int pdanscan; /* number of anonymous pages scanned by daemon */ + int pdobscan; /* number of object pages scanned by daemon */ + int pdreact; /* number of pages daemon reactivated since boot */ + int pdbusy; /* number of times daemon found a busy page */ + int pdpageouts; /* number of times daemon started a pageout */ + int pdpending; /* number of times daemon got a pending pagout */ + int pddeact; /* number of pages daemon deactivates */ + int pdreanon; /* anon pages reactivated due to min threshold */ + int pdrevnode; /* vnode pages reactivated due to min threshold */ + int pdrevtext; /* vtext pages reactivated due to min threshold */ + + int fpswtch; /* FPU context switches */ + int kmapent; /* number of kernel map entries */ +}; + +struct _ps_strings { + void *val; +}; + +#endif /*_UVM_UVMEXP_ */ diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index d86567a7f3d..059f0443cc7 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1,5 +1,5 @@ /* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */ -/* $OpenBSD: vmstat.c,v 1.130 2014/07/02 07:16:29 dlg Exp $ */ +/* $OpenBSD: vmstat.c,v 1.131 2014/07/08 17:19:26 deraadt Exp $ */ /* * Copyright (c) 1980, 1986, 1991, 1993 @@ -59,9 +59,6 @@ #include <limits.h> #include "dkstats.h" -#include <uvm/uvm_object.h> -#include <uvm/uvm_extern.h> - struct nlist namelist[] = { #define X_UVMEXP 0 /* sysctl */ { "_uvmexp" }, diff --git a/usr.sbin/installboot/i386_installboot.c b/usr.sbin/installboot/i386_installboot.c index d75793e283b..f1a4dec559f 100644 --- a/usr.sbin/installboot/i386_installboot.c +++ b/usr.sbin/installboot/i386_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i386_installboot.c,v 1.4 2014/06/25 18:21:24 tobias Exp $ */ +/* $OpenBSD: i386_installboot.c,v 1.5 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -51,8 +51,6 @@ #include <ufs/ufs/dir.h> #include <ufs/ffs/fs.h> -#include <uvm/uvm_extern.h> - #include <machine/cpu.h> #include <machine/biosvar.h> diff --git a/usr.sbin/procmap/procmap.c b/usr.sbin/procmap/procmap.c index 0943206c6e1..0a514fd139a 100644 --- a/usr.sbin/procmap/procmap.c +++ b/usr.sbin/procmap/procmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procmap.c,v 1.54 2014/07/08 10:15:16 deraadt Exp $ */ +/* $OpenBSD: procmap.c,v 1.55 2014/07/08 17:19:26 deraadt Exp $ */ /* $NetBSD: pmap.c,v 1.1 2002/09/01 20:32:44 atatat Exp $ */ /* @@ -40,6 +40,9 @@ #include <sys/uio.h> #include <sys/sysctl.h> +/* XXX until uvm gets cleaned up */ +typedef int boolean_t; + #include <uvm/uvm.h> #include <uvm/uvm_device.h> #include <uvm/uvm_amap.h> |