Module Name: src
Committed By: pgoyette
Date: Thu Mar 15 11:17:55 UTC 2018
Modified Files:
src/sys/compat/common [pgoyette-compat]: compat_mod.c files.common
src/sys/uvm [pgoyette-compat]: uvm_swap.c uvm_swap.h
Log Message:
Resolve conflicts from sync-with-HEAD
To generate a diff of this commit:
cvs rdiff -u -r1.24.14.7 -r1.24.14.8 src/sys/compat/common/compat_mod.c
cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/compat/common/files.common
cvs rdiff -u -r1.175.2.3 -r1.175.2.4 src/sys/uvm/uvm_swap.c
cvs rdiff -u -r1.22.16.2 -r1.22.16.3 src/sys/uvm/uvm_swap.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.24.14.7 src/sys/compat/common/compat_mod.c:1.24.14.8
--- src/sys/compat/common/compat_mod.c:1.24.14.7 Thu Mar 15 09:12:05 2018
+++ src/sys/compat/common/compat_mod.c Thu Mar 15 11:17:54 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_mod.c,v 1.24.14.7 2018/03/15 09:12:05 pgoyette Exp $ */
+/* $NetBSD: compat_mod.c,v 1.24.14.8 2018/03/15 11:17:54 pgoyette Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.7 2018/03/15 09:12:05 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.24.14.8 2018/03/15 11:17:54 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -254,10 +254,6 @@ compat_modcmd(modcmd_t cmd, void *arg)
#ifdef COMPAT_40
if_40_init();
#endif
-#ifdef COMPAT_50
- if_50_init();
- swapstats_50_init();
-#endif
#ifdef COMPAT_13
uvm_13_init();
#endif
@@ -279,6 +275,7 @@ compat_modcmd(modcmd_t cmd, void *arg)
compat_sysctl_init();
#ifdef COMPAT_50
uvm_50_init();
+ if_50_init();
#endif
return 0;
@@ -342,20 +339,14 @@ compat_modcmd(modcmd_t cmd, void *arg)
rw_exit(&exec_lock);
#endif
#endif /* COMPAT_16 */
-#ifdef COMPAT_13
- swapstats_13_fini();
-#endif
#ifdef COMPAT_40
if_40_fini();
#endif
#ifdef COMPAT_50
if_50_fini();
- swapstats_50_fini();
-#endif
- compat_sysctl_fini();
-#ifdef COMPAT_50
uvm_50_fini();
#endif
+ compat_sysctl_fini();
return 0;
default:
Index: src/sys/compat/common/files.common
diff -u src/sys/compat/common/files.common:1.1.2.9 src/sys/compat/common/files.common:1.1.2.10
--- src/sys/compat/common/files.common:1.1.2.9 Wed Mar 14 22:04:27 2018
+++ src/sys/compat/common/files.common Thu Mar 15 11:17:54 2018
@@ -1,4 +1,4 @@
-# $NetBSD: files.common,v 1.1.2.9 2018/03/14 22:04:27 pgoyette Exp $
+# $NetBSD: files.common,v 1.1.2.10 2018/03/15 11:17:54 pgoyette Exp $
#
# Generic files, used by all compat options.
@@ -35,7 +35,7 @@ file compat/common/vm_12.c compat_12
# Compatibility code for NetBSD 1.3
file compat/common/kern_sig_13.c compat_13
-file compat/common/uvm_stats_13.c compat_13
+file compat/common/uvm_13.c compat_13
# Compatibility code for NetBSD 1.4
file compat/common/rtsock_14.c compat_14
@@ -63,7 +63,7 @@ file compat/common/rndpseudo_50.c compa
file compat/common/rtsock_50.c compat_50
file compat/common/vfs_syscalls_50.c compat_50
file compat/common/uipc_syscalls_50.c compat_50
-file compat/common/uvm_stats_50.c compat_50
+file compat/common/uvm_50.c compat_50
# Compatibility code for NetBSD 6.0
file compat/common/kern_sa_60.c compat_60
Index: src/sys/uvm/uvm_swap.c
diff -u src/sys/uvm/uvm_swap.c:1.175.2.3 src/sys/uvm/uvm_swap.c:1.175.2.4
--- src/sys/uvm/uvm_swap.c:1.175.2.3 Thu Mar 15 09:12:07 2018
+++ src/sys/uvm/uvm_swap.c Thu Mar 15 11:17:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_swap.c,v 1.175.2.3 2018/03/15 09:12:07 pgoyette Exp $ */
+/* $NetBSD: uvm_swap.c,v 1.175.2.4 2018/03/15 11:17:55 pgoyette Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.175.2.3 2018/03/15 09:12:07 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.175.2.4 2018/03/15 11:17:55 pgoyette Exp $");
#include "opt_uvmhist.h"
#include "opt_compat_netbsd.h"
@@ -116,6 +116,35 @@ __KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v
*/
/*
+ * swapdev: describes a single swap partition/file
+ *
+ * note the following should be true:
+ * swd_inuse <= swd_nblks [number of blocks in use is <= total blocks]
+ * swd_nblks <= swd_mapsize [because mapsize includes miniroot+disklabel]
+ */
+struct swapdev {
+ dev_t swd_dev; /* device id */
+ int swd_flags; /* flags:inuse/enable/fake */
+ int swd_priority; /* our priority */
+ int swd_nblks; /* blocks in this device */
+ char *swd_path; /* saved pathname of device */
+ int swd_pathlen; /* length of pathname */
+ int swd_npages; /* #pages we can use */
+ int swd_npginuse; /* #pages in use */
+ int swd_npgbad; /* #pages bad */
+ int swd_drumoffset; /* page0 offset in drum */
+ int swd_drumsize; /* #pages in drum */
+ blist_t swd_blist; /* blist for this swapdev */
+ struct vnode *swd_vp; /* backing vnode */
+ TAILQ_ENTRY(swapdev) swd_next; /* priority tailq */
+
+ int swd_bsize; /* blocksize (bytes) */
+ int swd_maxactive; /* max active i/o reqs */
+ struct bufq_state *swd_tab; /* buffer list */
+ int swd_active; /* number of active buffers */
+};
+
+/*
* swap device priority entry; the list is kept sorted on `spi_priority'.
*/
struct swappri {
@@ -191,40 +220,6 @@ static void sw_reg_start(struct swapdev
static int uvm_swap_io(struct vm_page **, int, int, int);
/*
- * vectored routines for COMPAT_13 and COMPAT_50
- */
-
-size_t swapstats_len_13 = 0;
-
-static void stub_swapstats13_copy(int, int, struct swapdev *,
- struct swapent13 *);
-void (*vec_swapstats_copy_13)(int, int, struct swapdev *, struct swapent13 *) =
- stub_swapstats13_copy;
-
-size_t swapstats_len_50 = 0;
-
-static void stub_swapstats50_copy(int, int, struct swapdev *,
- struct swapent50 *);
-void (*vec_swapstats_copy_50)(int, int, struct swapdev *, struct swapent50 *) =
- stub_swapstats50_copy;
-
-static void
-stub_swapstats13_copy(int cmd, int inuse, struct swapdev *sdp,
- struct swapent13 *sep13)
-{
-
- /* nothing */
-}
-
-static void
-stub_swapstats50_copy(int cmd, int inuse, struct swapdev *sdp,
- struct swapent50 *sep50)
-{
-
- /* nothing */
-}
-
-/*
* uvm_swap_init: init the swap system data structures and locks
*
* => called at boot time from init_main.c after the filesystems
@@ -432,7 +427,7 @@ swapent_cvt(struct swapent *se, const st
strcpy(se->se_path, sdp->swd_path);
}
-int (*uvm_swap_stats13)(const struct sys_swapctl_args *, register_t *) =
+int (*uvm_swap_stats13)(const struct sys_swapctl_args *, register_t *) =
(void *)enosys;
int (*uvm_swap_stats50)(const struct sys_swapctl_args *, register_t *) =
(void *)enosys;
Index: src/sys/uvm/uvm_swap.h
diff -u src/sys/uvm/uvm_swap.h:1.22.16.2 src/sys/uvm/uvm_swap.h:1.22.16.3
--- src/sys/uvm/uvm_swap.h:1.22.16.2 Thu Mar 15 09:12:07 2018
+++ src/sys/uvm/uvm_swap.h Thu Mar 15 11:17:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_swap.h,v 1.22.16.2 2018/03/15 09:12:07 pgoyette Exp $ */
+/* $NetBSD: uvm_swap.h,v 1.22.16.3 2018/03/15 11:17:55 pgoyette Exp $ */
/*
* Copyright (c) 1997 Matthew R. Green
@@ -40,35 +40,6 @@
struct lwp;
-/*
- * swapdev: describes a single swap partition/file
- *
- * note the following should be true:
- * swd_inuse <= swd_nblks [number of blocks in use is <= total blocks]
- * swd_nblks <= swd_mapsize [because mapsize includes miniroot+disklabel]
- */
-struct swapdev {
- dev_t swd_dev; /* device id */
- int swd_flags; /* flags:inuse/enable/fake */
- int swd_priority; /* our priority */
- int swd_nblks; /* blocks in this device */
- char *swd_path; /* saved pathname of device */
- int swd_pathlen; /* length of pathname */
- int swd_npages; /* #pages we can use */
- int swd_npginuse; /* #pages in use */
- int swd_npgbad; /* #pages bad */
- int swd_drumoffset; /* page0 offset in drum */
- int swd_drumsize; /* #pages in drum */
- blist_t swd_blist; /* blist for this swapdev */
- struct vnode *swd_vp; /* backing vnode */
- TAILQ_ENTRY(swapdev) swd_next; /* priority tailq */
-
- int swd_bsize; /* blocksize (bytes) */
- int swd_maxactive; /* max active i/o reqs */
- struct bufq_state *swd_tab; /* buffer list */
- int swd_active; /* number of active buffers */
-};
-
#if defined(VMSWAP)
struct swapent;