Mon Mar 5 13:43:56 2012 UTC ()
adjust rump for static pool_cache count
should have went in with subr_vmem 1.73


(para)
diff -r1.123 -r1.124 src/sys/rump/librump/rumpkern/vm.c

cvs diff -r1.123 -r1.124 src/sys/rump/librump/rumpkern/vm.c (expand / switch to unified diff)

--- src/sys/rump/librump/rumpkern/vm.c 2012/02/19 09:19:41 1.123
+++ src/sys/rump/librump/rumpkern/vm.c 2012/03/05 13:43:56 1.124
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vm.c,v 1.123 2012/02/19 09:19:41 martin Exp $ */ 1/* $NetBSD: vm.c,v 1.124 2012/03/05 13:43:56 para 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.123 2012/02/19 09:19:41 martin Exp $"); 44__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.124 2012/03/05 13:43:56 para 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
@@ -330,27 +330,27 @@ uvm_init(void) @@ -330,27 +330,27 @@ uvm_init(void)
330 330
331 kernel_map->pmap = pmap_kernel(); 331 kernel_map->pmap = pmap_kernel();
332 332
333 pool_subsystem_init(); 333 pool_subsystem_init();
334 vmem_bootstrap(); 334 vmem_bootstrap();
335 kmem_arena = vmem_create("kmem", 0, 1024*1024, PAGE_SIZE, 335 kmem_arena = vmem_create("kmem", 0, 1024*1024, PAGE_SIZE,
336 NULL, NULL, NULL, 336 NULL, NULL, NULL,
337 0, VM_NOSLEEP | VM_BOOTSTRAP, IPL_VM); 337 0, VM_NOSLEEP | VM_BOOTSTRAP, IPL_VM);
338 338
339 vmem_init(kmem_arena); 339 vmem_init(kmem_arena);
340 340
341 kmem_va_arena = vmem_create("kva", 0, 0, PAGE_SIZE, 341 kmem_va_arena = vmem_create("kva", 0, 0, PAGE_SIZE,
342 vmem_alloc, vmem_free, kmem_arena, 342 vmem_alloc, vmem_free, kmem_arena,
343 32 * PAGE_SIZE, VM_NOSLEEP | VM_BOOTSTRAP, IPL_VM); 343 8 * PAGE_SIZE, VM_NOSLEEP | VM_BOOTSTRAP, IPL_VM);
344 344
345 pool_cache_bootstrap(&pagecache, sizeof(struct vm_page), 0, 0, 0, 345 pool_cache_bootstrap(&pagecache, sizeof(struct vm_page), 0, 0, 0,
346 "page$", NULL, IPL_NONE, pgctor, pgdtor, NULL); 346 "page$", NULL, IPL_NONE, pgctor, pgdtor, NULL);
347} 347}
348 348
349void 349void
350uvmspace_init(struct vmspace *vm, struct pmap *pmap, vaddr_t vmin, vaddr_t vmax) 350uvmspace_init(struct vmspace *vm, struct pmap *pmap, vaddr_t vmin, vaddr_t vmax)
351{ 351{
352 352
353 vm->vm_map.pmap = pmap_kernel(); 353 vm->vm_map.pmap = pmap_kernel();
354 vm->vm_refcnt = 1; 354 vm->vm_refcnt = 1;
355} 355}
356 356