Allow an alternate splimp-protected map to be specified in the pool page
allocator routines.
This commit is contained in:
parent
6e34b79e01
commit
55bf1fd9ad
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uvm_extern.h,v 1.16 1998/07/24 20:28:48 thorpej Exp $ */
|
||||
/* $NetBSD: uvm_extern.h,v 1.17 1998/07/31 20:46:37 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE!
|
||||
|
@ -302,9 +302,11 @@ struct vm_map *uvm_km_suballoc __P((vm_map_t, vm_offset_t *,
|
|||
boolean_t, vm_map_t));
|
||||
vm_offset_t uvm_km_valloc __P((vm_map_t, vm_size_t));
|
||||
vm_offset_t uvm_km_valloc_wait __P((vm_map_t, vm_size_t));
|
||||
vm_offset_t uvm_km_alloc_poolpage __P((void));
|
||||
void uvm_km_free_poolpage __P((vm_offset_t));
|
||||
vm_offset_t uvm_km_alloc_poolpage1 __P((vm_map_t));
|
||||
void uvm_km_free_poolpage1 __P((vm_map_t, vm_offset_t));
|
||||
|
||||
#define uvm_km_alloc_poolpage() uvm_km_alloc_poolpage1(kmem_map)
|
||||
#define uvm_km_free_poolpage(addr) uvm_km_free_poolpage1(kmem_map, (addr))
|
||||
|
||||
/* uvm_map.c */
|
||||
int uvm_map __P((vm_map_t, vm_offset_t *, vm_size_t,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uvm_km.c,v 1.10 1998/07/24 20:28:48 thorpej Exp $ */
|
||||
/* $NetBSD: uvm_km.c,v 1.11 1998/07/31 20:46:37 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE!
|
||||
|
@ -1001,8 +1001,10 @@ uvm_km_valloc_wait(map, size)
|
|||
* => if the pmap specifies an alternate mapping method, we use it.
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
vm_offset_t
|
||||
uvm_km_alloc_poolpage()
|
||||
uvm_km_alloc_poolpage1(map)
|
||||
vm_map_t map;
|
||||
{
|
||||
#if defined(PMAP_MAP_POOLPAGE)
|
||||
struct vm_page *pg;
|
||||
|
@ -1020,7 +1022,7 @@ uvm_km_alloc_poolpage()
|
|||
int s;
|
||||
|
||||
s = splimp();
|
||||
va = uvm_km_kmemalloc(kmem_map, uvmexp.kmem_object, PAGE_SIZE,
|
||||
va = uvm_km_kmemalloc(map, uvmexp.kmem_object, PAGE_SIZE,
|
||||
UVM_KMF_NOWAIT);
|
||||
splx(s);
|
||||
return (va);
|
||||
|
@ -1033,8 +1035,10 @@ uvm_km_alloc_poolpage()
|
|||
* => if the pmap specifies an alternate unmapping method, we use it.
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
void
|
||||
uvm_km_free_poolpage(addr)
|
||||
uvm_km_free_poolpage1(map, addr)
|
||||
vm_map_t map;
|
||||
vm_offset_t addr;
|
||||
{
|
||||
#if defined(PMAP_UNMAP_POOLPAGE)
|
||||
|
@ -1046,7 +1050,7 @@ uvm_km_free_poolpage(addr)
|
|||
int s;
|
||||
|
||||
s = splimp();
|
||||
uvm_km_free(kmem_map, addr, PAGE_SIZE);
|
||||
uvm_km_free(map, addr, PAGE_SIZE);
|
||||
splx(s);
|
||||
#endif /* PMAP_UNMAP_POOLPAGE */
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vm_extern.h,v 1.38 1998/07/24 20:27:50 thorpej Exp $ */
|
||||
/* $NetBSD: vm_extern.h,v 1.39 1998/07/31 20:46:36 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -86,8 +86,12 @@ void kmem_init __P((vm_offset_t, vm_offset_t));
|
|||
vm_offset_t kmem_malloc __P((vm_map_t, vm_size_t, boolean_t));
|
||||
vm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *,
|
||||
vm_size_t, boolean_t));
|
||||
vm_offset_t kmem_alloc_poolpage __P((void));
|
||||
void kmem_free_poolpage __P((vm_offset_t));
|
||||
vm_offset_t kmem_alloc_poolpage1 __P((vm_map_t));
|
||||
void kmem_free_poolpage1 __P((vm_map_t, vm_offset_t));
|
||||
|
||||
#define kmem_alloc_poolpage() kmem_alloc_poolpage1(kmem_map)
|
||||
#define kmem_free_poolpage(addr) kmem_free_poolpage1(kmem_map, (addr))
|
||||
|
||||
void loadav __P((struct loadavg *));
|
||||
#if !defined(UVM)
|
||||
void munmapfd __P((struct proc *, int));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vm_kern.c,v 1.26 1998/07/26 10:03:29 simonb Exp $ */
|
||||
/* $NetBSD: vm_kern.c,v 1.27 1998/07/31 20:46:36 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -453,8 +453,10 @@ kmem_free_wakeup(map, addr, size)
|
|||
* Allocate a PAGE_SIZE page for the pool allocator. Separate from
|
||||
* kmem_alloc(), as we may be using a direct-mapping for the page.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
vm_offset_t
|
||||
kmem_alloc_poolpage()
|
||||
kmem_alloc_poolpage1(map)
|
||||
vm_map_t map;
|
||||
{
|
||||
#if defined(PMAP_MAP_POOLPAGE)
|
||||
vm_page_t pg;
|
||||
|
@ -472,7 +474,7 @@ kmem_alloc_poolpage()
|
|||
int s;
|
||||
|
||||
s = splimp();
|
||||
va = kmem_malloc(kmem_map, PAGE_SIZE, 0);
|
||||
va = kmem_malloc(map, PAGE_SIZE, 0);
|
||||
splx(s);
|
||||
return (va);
|
||||
#endif /* PMAP_MAP_POOLPAGE */
|
||||
|
@ -483,8 +485,10 @@ kmem_alloc_poolpage()
|
|||
*
|
||||
* Free the specified PAGE_SIZE pool page.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
void
|
||||
kmem_free_poolpage(addr)
|
||||
kmem_free_poolpage1(map, addr)
|
||||
vm_map_t map;
|
||||
vm_offset_t addr;
|
||||
{
|
||||
#if defined(PMAP_UNMAP_POOLPAGE)
|
||||
|
@ -496,7 +500,7 @@ kmem_free_poolpage(addr)
|
|||
int s;
|
||||
|
||||
s = splimp();
|
||||
kmem_free(kmem_map, addr, PAGE_SIZE);
|
||||
kmem_free(map, addr, PAGE_SIZE);
|
||||
splx(s);
|
||||
#endif /* PMAP_UNMAP_POOLPAGE */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue