Use same uvm_swap_shutdown() stub for !vmswap kernels and rump kernels.diff -r1.136 -r1.137 src/sys/rump/librump/rumpkern/Makefile.rumpkern
(pooka)
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern 2014/02/12 22:28:43 1.136
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern 2014/02/18 06:18:13 1.137
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile.rumpkern,v 1.136 2014/02/12 22:28:43 pooka Exp $ | 1 | # $NetBSD: Makefile.rumpkern,v 1.137 2014/02/18 06:18:13 pooka Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | .include "${RUMPTOP}/Makefile.rump" | 4 | .include "${RUMPTOP}/Makefile.rump" | |
5 | 5 | |||
6 | .include <bsd.own.mk> | 6 | .include <bsd.own.mk> | |
7 | 7 | |||
8 | LIB= rump | 8 | LIB= rump | |
9 | 9 | |||
10 | .PATH: ${RUMPTOP}/librump/rumpkern \ | 10 | .PATH: ${RUMPTOP}/librump/rumpkern \ | |
11 | ${RUMPTOP}/librump/rumpkern/arch/generic \ | 11 | ${RUMPTOP}/librump/rumpkern/arch/generic \ | |
12 | ${RUMPTOP}/../kern \ | 12 | ${RUMPTOP}/../kern \ | |
13 | ${RUMPTOP}/../uvm \ | 13 | ${RUMPTOP}/../uvm \ | |
14 | ${RUMPTOP}/../conf \ | 14 | ${RUMPTOP}/../conf \ | |
@@ -115,27 +115,27 @@ SRCS+= init_sysctl_base.c \ | @@ -115,27 +115,27 @@ SRCS+= init_sysctl_base.c \ | |||
115 | subr_time.c \ | 115 | subr_time.c \ | |
116 | subr_vmem.c \ | 116 | subr_vmem.c \ | |
117 | subr_workqueue.c \ | 117 | subr_workqueue.c \ | |
118 | subr_xcall.c \ | 118 | subr_xcall.c \ | |
119 | sys_descrip.c \ | 119 | sys_descrip.c \ | |
120 | sys_generic.c \ | 120 | sys_generic.c \ | |
121 | sys_module.c \ | 121 | sys_module.c \ | |
122 | sys_pipe.c \ | 122 | sys_pipe.c \ | |
123 | sys_select.c \ | 123 | sys_select.c \ | |
124 | syscalls.c \ | 124 | syscalls.c \ | |
125 | uipc_sem.c | 125 | uipc_sem.c | |
126 | 126 | |||
127 | # sys/uvm | 127 | # sys/uvm | |
128 | SRCS+= uvm_aobj.c uvm_readahead.c uvm_object.c | 128 | SRCS+= uvm_aobj.c uvm_readahead.c uvm_object.c uvm_swapstub.c | |
129 | 129 | |||
130 | # 4.4BSD secmodel. selection is hardcoded for now | 130 | # 4.4BSD secmodel. selection is hardcoded for now | |
131 | SRCS+= secmodel.c | 131 | SRCS+= secmodel.c | |
132 | SRCS+= secmodel_suser.c | 132 | SRCS+= secmodel_suser.c | |
133 | 133 | |||
134 | # the funny bit. this doesn't really belong here, but helps with the | 134 | # the funny bit. this doesn't really belong here, but helps with the | |
135 | # needs of kern_descrip.c. And since it's a fully dynamic interface, | 135 | # needs of kern_descrip.c. And since it's a fully dynamic interface, | |
136 | # it doesn't pull in other gunk. | 136 | # it doesn't pull in other gunk. | |
137 | SRCS+= vnode_if.c | 137 | SRCS+= vnode_if.c | |
138 | 138 | |||
139 | # sys/dev | 139 | # sys/dev | |
140 | SRCS+= clock_subr.c | 140 | SRCS+= clock_subr.c | |
141 | 141 |
--- src/sys/rump/librump/rumpkern/vm.c 2014/02/17 19:43:52 1.148
+++ src/sys/rump/librump/rumpkern/vm.c 2014/02/18 06:18:13 1.149
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: vm.c,v 1.148 2014/02/17 19:43:52 pooka Exp $ */ | 1 | /* $NetBSD: vm.c,v 1.149 2014/02/18 06:18:13 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by | 6 | * Development of this software was supported by | |
7 | * The Finnish Cultural Foundation and the Research Foundation of | 7 | * The Finnish Cultural Foundation and the Research Foundation of | |
8 | * The Helsinki University of Technology. | 8 | * The Helsinki University of Technology. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -31,27 +31,27 @@ | @@ -31,27 +31,27 @@ | |||
31 | 31 | |||
32 | /* | 32 | /* | |
33 | * Virtual memory emulation routines. | 33 | * Virtual memory emulation routines. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * XXX: we abuse pg->uanon for the virtual address of the storage | 37 | * XXX: we abuse pg->uanon for the virtual address of the storage | |
38 | * for each page. phys_addr would fit the job description better, | 38 | * for each page. phys_addr would fit the job description better, | |
39 | * except that it will create unnecessary lossage on some platforms | 39 | * except that it will create unnecessary lossage on some platforms | |
40 | * due to not being a pointer type. | 40 | * due to not being a pointer type. | |
41 | */ | 41 | */ | |
42 | 42 | |||
43 | #include <sys/cdefs.h> | 43 | #include <sys/cdefs.h> | |
44 | __KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.148 2014/02/17 19:43:52 pooka Exp $"); | 44 | __KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.149 2014/02/18 06:18:13 pooka Exp $"); | |
45 | 45 | |||
46 | #include <sys/param.h> | 46 | #include <sys/param.h> | |
47 | #include <sys/atomic.h> | 47 | #include <sys/atomic.h> | |
48 | #include <sys/buf.h> | 48 | #include <sys/buf.h> | |
49 | #include <sys/kernel.h> | 49 | #include <sys/kernel.h> | |
50 | #include <sys/kmem.h> | 50 | #include <sys/kmem.h> | |
51 | #include <sys/vmem.h> | 51 | #include <sys/vmem.h> | |
52 | #include <sys/mman.h> | 52 | #include <sys/mman.h> | |
53 | #include <sys/null.h> | 53 | #include <sys/null.h> | |
54 | #include <sys/vnode.h> | 54 | #include <sys/vnode.h> | |
55 | 55 | |||
56 | #include <machine/pmap.h> | 56 | #include <machine/pmap.h> | |
57 | 57 | |||
@@ -1189,18 +1189,13 @@ rump_hypermalloc(size_t howmuch, int ali | @@ -1189,18 +1189,13 @@ rump_hypermalloc(size_t howmuch, int ali | |||
1189 | 1189 | |||
1190 | return rv; | 1190 | return rv; | |
1191 | } | 1191 | } | |
1192 | 1192 | |||
1193 | void | 1193 | void | |
1194 | rump_hyperfree(void *what, size_t size) | 1194 | rump_hyperfree(void *what, size_t size) | |
1195 | { | 1195 | { | |
1196 | 1196 | |||
1197 | if (rump_physmemlimit != RUMPMEM_UNLIMITED) { | 1197 | if (rump_physmemlimit != RUMPMEM_UNLIMITED) { | |
1198 | atomic_add_long(&curphysmem, -size); | 1198 | atomic_add_long(&curphysmem, -size); | |
1199 | } | 1199 | } | |
1200 | rumpuser_free(what, size); | 1200 | rumpuser_free(what, size); | |
1201 | } | 1201 | } | |
1202 | ||||
1203 | void | |||
1204 | uvm_swap_shutdown(struct lwp *lwp) | |||
1205 | { | |||
1206 | } |
--- src/sys/uvm/uvm_swapstub.c 2011/04/27 00:35:52 1.7
+++ src/sys/uvm/uvm_swapstub.c 2014/02/18 06:18:13 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: uvm_swapstub.c,v 1.7 2011/04/27 00:35:52 rmind Exp $ */ | 1 | /* $NetBSD: uvm_swapstub.c,v 1.8 2014/02/18 06:18:13 pooka Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c)2005 YAMAMOTO Takashi, | 4 | * Copyright (c)2005 YAMAMOTO Takashi, | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -21,35 +21,42 @@ | @@ -21,35 +21,42 @@ | |||
21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
26 | * SUCH DAMAGE. | 26 | * SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | /* | 29 | /* | |
30 | * Dummy routines used when "options VMSWAP" is not configured. | 30 | * Dummy routines used when "options VMSWAP" is not configured. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: uvm_swapstub.c,v 1.7 2011/04/27 00:35:52 rmind Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: uvm_swapstub.c,v 1.8 2014/02/18 06:18:13 pooka Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/mount.h> | 38 | #include <sys/mount.h> | |
39 | #include <sys/syscallargs.h> | 39 | #include <sys/syscallargs.h> | |
40 | 40 | |||
41 | #include <uvm/uvm.h> | 41 | #include <uvm/uvm.h> | |
42 | 42 | |||
43 | void | 43 | void | |
44 | uvm_swap_init(void) | 44 | uvm_swap_init(void) | |
45 | { | 45 | { | |
46 | 46 | |||
47 | /* nothing */ | 47 | /* nothing */ | |
48 | } | 48 | } | |
49 | 49 | |||
50 | int | 50 | int | |
51 | sys_swapctl(struct lwp *l, const struct sys_swapctl_args *v, register_t *retval) | 51 | sys_swapctl(struct lwp *l, const struct sys_swapctl_args *v, register_t *retval) | |
52 | { | 52 | { | |
53 | 53 | |||
54 | return ENOSYS; | 54 | return ENOSYS; | |
55 | } | 55 | } | |
56 | ||||
57 | void | |||
58 | uvm_swap_shutdown(struct lwp *l) | |||
59 | { | |||
60 | ||||
61 | /* nothing */ | |||
62 | } |