Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Round of uvm.h cleanup.
details: https://anonhg.NetBSD.org/src/rev/26065fe40937
branches: trunk
changeset: 943532:26065fe40937
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Sep 05 16:30:10 2020 +0000
description:
Round of uvm.h cleanup.
The poorly named uvm.h is generally supposed to be for uvm-internal
users only.
- Narrow it to files that actually need it -- mostly files that need
to query whether curlwp is the pagedaemon, which should maybe be
exposed by an external header.
- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
by it. We should split up uvm_extern.h but this will serve for now
to reduce the uvm.h dependencies.
- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
UVMHIST(ubchist), since ubchist is declared in uvm.h but the
reference evaporates if UVMHIST is not defined, so we reduce header
file dependencies.
- Make uvm_device.h and uvm_swap.h independently includable while
here.
ok chs@
diffstat:
sys/arch/aarch64/include/asan.h | 4 +++-
sys/arch/amd64/include/asan.h | 4 +++-
sys/arch/arm/include/asan.h | 4 +++-
sys/compat/common/uvm_13.c | 6 +++---
sys/compat/common/uvm_50.c | 7 ++++---
sys/compat/linux/arch/amd64/linux_exec_machdep.c | 6 ++----
sys/compat/linux/arch/i386/linux_exec_machdep.c | 6 ++----
sys/compat/netbsd32/netbsd32_kern_proc.c | 7 ++-----
sys/dev/bus_dma/bus_dmamem_common.c | 6 +++---
sys/dev/ic/ssdfb.c | 11 ++++++-----
sys/dev/ic/sti.c | 6 +++---
sys/dev/kloader.c | 6 +++---
sys/dev/marvell/if_gfe.c | 5 ++---
sys/dev/nvmm/nvmm.c | 7 ++++---
sys/dev/nvmm/x86/nvmm_x86.c | 7 ++-----
sys/dev/nvmm/x86/nvmm_x86_svm.c | 7 +++----
sys/dev/nvmm/x86/nvmm_x86_vmx.c | 7 +++----
sys/dev/sbus/genfb_sbus.c | 6 ++----
sys/dev/usb/udl.c | 7 ++++---
sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c | 4 ++--
sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c | 4 ++--
sys/fs/tmpfs/tmpfs_subr.c | 8 +++++---
sys/fs/tmpfs/tmpfs_vnops.c | 6 +++---
sys/kern/kern_idle.c | 5 ++---
sys/kern/kern_proc.c | 5 ++---
sys/kern/subr_asan.c | 6 +++---
sys/kern/subr_msan.c | 6 ++----
sys/miscfs/genfs/genfs_vnops.c | 7 ++-----
sys/miscfs/procfs/procfs_linux.c | 6 +++---
sys/modules/examples/mapper/mapper.c | 6 ++----
sys/nfs/nfs_bio.c | 6 +++---
sys/nfs/nfs_kq.c | 7 ++-----
sys/nfs/nfs_serv.c | 8 +++++---
sys/nfs/nfs_subs.c | 6 +++---
sys/nfs/nfs_vnops.c | 9 ++++++---
sys/rump/dev/lib/libpci/rumpdev_bus_dma.c | 6 ++----
sys/ufs/chfs/chfs_pool.c | 4 +---
sys/ufs/chfs/chfs_subr.c | 4 ++--
sys/ufs/chfs/chfs_vfsops.c | 6 +++---
sys/ufs/chfs/chfs_vnops.c | 4 ++--
sys/ufs/ext2fs/ext2fs_balloc.c | 7 +++++--
sys/ufs/ffs/ffs_alloc.c | 7 ++++---
sys/ufs/ffs/ffs_balloc.c | 9 +++++++--
sys/ufs/ffs/ffs_extattr.c | 6 ++----
sys/ufs/ffs/ffs_vnops.c | 6 ++----
sys/ufs/lfs/lfs_balloc.c | 6 +++---
sys/ufs/lfs/lfs_bio.c | 6 +++---
sys/ufs/lfs/lfs_pages.c | 7 ++++---
sys/ufs/lfs/lfs_rename.c | 9 ++-------
sys/ufs/lfs/lfs_rfw.c | 10 +++-------
sys/ufs/lfs/lfs_segment.c | 6 +++---
sys/ufs/lfs/lfs_subr.c | 6 ++----
sys/ufs/lfs/lfs_vfsops.c | 13 ++++++++-----
sys/ufs/lfs/lfs_vnops.c | 9 +++------
sys/ufs/lfs/ulfs_inode.c | 9 +++++++--
sys/ufs/lfs/ulfs_snapshot.c | 6 ++----
sys/ufs/lfs/ulfs_vnops.c | 8 ++++++--
sys/ufs/ufs/ufs_inode.c | 9 +++++++--
sys/ufs/ufs/ufs_vnops.c | 9 +++++++--
sys/uvm/uvm_device.h | 11 ++++++++++-
sys/uvm/uvm_pdaemon.h | 13 +++++++++++--
sys/uvm/uvm_swap.h | 3 ++-
62 files changed, 217 insertions(+), 200 deletions(-)
diffs (truncated from 1705 to 300 lines):
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/arch/aarch64/include/asan.h
--- a/sys/arch/aarch64/include/asan.h Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/arch/aarch64/include/asan.h Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asan.h,v 1.9 2020/08/01 06:35:00 maxv Exp $ */
+/* $NetBSD: asan.h,v 1.10 2020/09/05 16:30:10 riastradh Exp $ */
/*
* Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -32,6 +32,8 @@
#include <sys/atomic.h>
#include <sys/ksyms.h>
+#include <uvm/uvm.h>
+
#include <aarch64/pmap.h>
#include <aarch64/vmparam.h>
#include <aarch64/cpufunc.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/arch/amd64/include/asan.h
--- a/sys/arch/amd64/include/asan.h Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/arch/amd64/include/asan.h Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asan.h,v 1.7 2020/06/23 17:21:55 maxv Exp $ */
+/* $NetBSD: asan.h,v 1.8 2020/09/05 16:30:10 riastradh Exp $ */
/*
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -31,6 +31,8 @@
#include <sys/ksyms.h>
+#include <uvm/uvm.h>
+
#include <amd64/pmap.h>
#include <amd64/vmparam.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/arch/arm/include/asan.h
--- a/sys/arch/arm/include/asan.h Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/arch/arm/include/asan.h Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asan.h,v 1.4 2020/08/28 13:36:52 skrll Exp $ */
+/* $NetBSD: asan.h,v 1.5 2020/09/05 16:30:10 riastradh Exp $ */
/*
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -32,6 +32,8 @@
#include <sys/atomic.h>
#include <sys/ksyms.h>
+#include <uvm/uvm.h>
+
#include <arm/vmparam.h>
#include <arm/arm32/machdep.h>
#include <arm/arm32/pmap.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/compat/common/uvm_13.c
--- a/sys/compat/common/uvm_13.c Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/compat/common/uvm_13.c Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_13.c,v 1.2 2019/01/27 02:08:39 pgoyette Exp $ */
+/* $NetBSD: uvm_13.c,v 1.3 2020/09/05 16:30:10 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_13.c,v 1.2 2019/01/27 02:08:39 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_13.c,v 1.3 2020/09/05 16:30:10 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -49,7 +49,7 @@
#include <sys/systm.h>
#include <sys/syscallargs.h>
#include <sys/swap.h>
-#include <uvm/uvm.h>
+
#include <uvm/uvm_swap.h>
#include <compat/sys/uvm.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/compat/common/uvm_50.c
--- a/sys/compat/common/uvm_50.c Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/compat/common/uvm_50.c Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_50.c,v 1.2 2019/01/27 02:08:39 pgoyette Exp $ */
+/* $NetBSD: uvm_50.c,v 1.3 2020/09/05 16:30:10 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_50.c,v 1.2 2019/01/27 02:08:39 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_50.c,v 1.3 2020/09/05 16:30:10 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -49,7 +49,8 @@
#include <sys/systm.h>
#include <sys/syscallargs.h>
#include <sys/swap.h>
-#include <uvm/uvm.h>
+
+#include <uvm/uvm_swap.h>
#include <compat/sys/uvm.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/compat/linux/arch/amd64/linux_exec_machdep.c
--- a/sys/compat/linux/arch/amd64/linux_exec_machdep.c Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/compat/linux/arch/amd64/linux_exec_machdep.c Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec_machdep.c,v 1.23 2020/01/12 18:30:58 ad Exp $ */
+/* $NetBSD: linux_exec_machdep.c,v 1.24 2020/09/05 16:30:10 riastradh Exp $ */
/*-
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_machdep.c,v 1.23 2020/01/12 18:30:58 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_machdep.c,v 1.24 2020/09/05 16:30:10 riastradh Exp $");
#define ELFSIZE 64
@@ -55,8 +55,6 @@
#include <machine/vmparam.h>
#include <sys/syscallargs.h>
-#include <uvm/uvm.h>
-
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_machdep.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/compat/linux/arch/i386/linux_exec_machdep.c
--- a/sys/compat/linux/arch/i386/linux_exec_machdep.c Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/compat/linux/arch/i386/linux_exec_machdep.c Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec_machdep.c,v 1.19 2020/07/19 13:55:08 maxv Exp $ */
+/* $NetBSD: linux_exec_machdep.c,v 1.20 2020/09/05 16:30:10 riastradh Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_machdep.c,v 1.19 2020/07/19 13:55:08 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_machdep.c,v 1.20 2020/09/05 16:30:10 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,8 +45,6 @@
#include <sys/cpu.h>
#include <machine/vmparam.h>
-#include <uvm/uvm.h>
-
#include <sys/syscallargs.h>
#ifndef DEBUG_LINUX
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/compat/netbsd32/netbsd32_kern_proc.c
--- a/sys/compat/netbsd32/netbsd32_kern_proc.c Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/compat/netbsd32/netbsd32_kern_proc.c Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_kern_proc.c,v 1.5 2019/12/12 02:15:42 pgoyette Exp $ */
+/* $NetBSD: netbsd32_kern_proc.c,v 1.6 2020/09/05 16:30:10 riastradh Exp $ */
/*-
* Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_kern_proc.c,v 1.5 2019/12/12 02:15:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_kern_proc.c,v 1.6 2020/09/05 16:30:10 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_kstack.h"
@@ -102,9 +102,6 @@
#include <sys/cpu.h>
#include <sys/compat_stub.h>
-#include <uvm/uvm_extern.h>
-#include <uvm/uvm.h>
-
#include <compat/netbsd32/netbsd32.h>
#include <compat/netbsd32/netbsd32_kern_proc.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/dev/bus_dma/bus_dmamem_common.c
--- a/sys/dev/bus_dma/bus_dmamem_common.c Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/dev/bus_dma/bus_dmamem_common.c Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dmamem_common.c,v 1.2 2012/10/02 23:49:19 christos Exp $ */
+/* $NetBSD: bus_dmamem_common.c,v 1.3 2020/09/05 16:30:10 riastradh Exp $ */
/*-
* Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc.
@@ -32,14 +32,14 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: bus_dmamem_common.c,v 1.2 2012/10/02 23:49:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dmamem_common.c,v 1.3 2020/09/05 16:30:10 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/bus.h>
-#include <uvm/uvm.h>
+#include <uvm/uvm_extern.h>
#include <dev/bus_dma/bus_dmamem_common.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/dev/ic/ssdfb.c
--- a/sys/dev/ic/ssdfb.c Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/dev/ic/ssdfb.c Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ssdfb.c,v 1.11 2020/02/23 15:46:39 ad Exp $ */
+/* $NetBSD: ssdfb.c,v 1.12 2020/09/05 16:30:11 riastradh Exp $ */
/*
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,19 +30,20 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ssdfb.c,v 1.11 2020/02/23 15:46:39 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ssdfb.c,v 1.12 2020/09/05 16:30:11 riastradh Exp $");
#include "opt_ddb.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/conf.h>
-#include <uvm/uvm.h>
-#include <uvm/uvm_page.h>
-#include <uvm/uvm_device.h>
#include <sys/condvar.h>
#include <sys/kmem.h>
#include <sys/kthread.h>
+
+#include <uvm/uvm_device.h>
+#include <uvm/uvm_extern.h>
+
#include <dev/wscons/wsdisplayvar.h>
#include <dev/rasops/rasops.h>
#include <dev/ic/ssdfbvar.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/dev/ic/sti.c
--- a/sys/dev/ic/sti.c Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/dev/ic/sti.c Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sti.c,v 1.21 2020/05/04 06:52:53 tsutsui Exp $ */
+/* $NetBSD: sti.c,v 1.22 2020/09/05 16:30:11 riastradh Exp $ */
/* $OpenBSD: sti.c,v 1.61 2009/09/05 14:09:35 miod Exp $ */
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.21 2020/05/04 06:52:53 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.22 2020/09/05 16:30:11 riastradh Exp $");
#include "wsdisplay.h"
@@ -44,7 +44,7 @@
#include <sys/device.h>
#include <sys/malloc.h>
-#include <uvm/uvm.h>
+#include <uvm/uvm_extern.h>
#include <sys/bus.h>
diff -r 1f7f5f69dfbc -r 26065fe40937 sys/dev/kloader.c
--- a/sys/dev/kloader.c Sat Sep 05 16:29:07 2020 +0000
+++ b/sys/dev/kloader.c Sat Sep 05 16:30:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kloader.c,v 1.27 2015/06/11 08:14:38 matt Exp $ */
+/* $NetBSD: kloader.c,v 1.28 2020/09/05 16:30:11 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.27 2015/06/11 08:14:38 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.28 2020/09/05 16:30:11 riastradh Exp $");
#include "debug_kloader.h"
@@ -41,7 +41,7 @@
#define ELFSIZE 32
#include <sys/exec_elf.h>
Home |
Main Index |
Thread Index |
Old Index