summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_extern.h
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-04-09 02:39:20 +0000
committeralc <alc@FreeBSD.org>2010-04-09 02:39:20 +0000
commit2366ade4c547cfb6fc2a2854f402e42854d1a125 (patch)
tree3f1ea036793e3cdb4bc3e3d940fefff6cd519b76 /sys/vm/vm_extern.h
parent2ae521fa83381fb37d51c9fbaa4bf010e9118a70 (diff)
downloadFreeBSD-src-2366ade4c547cfb6fc2a2854f402e42854d1a125.zip
FreeBSD-src-2366ade4c547cfb6fc2a2854f402e42854d1a125.tar.gz
Introduce the function kmem_alloc_attr(), which allocates kernel virtual
memory with the specified physical attributes. In particular, like kmem_alloc_contig(), the caller can specify the physical address range from which the physical pages are allocated and the memory attributes (i.e., cache behavior) for these physical pages. However, in contrast to kmem_alloc_contig() or contigmalloc(), the physical pages that are allocated by kmem_alloc_attr() are not necessarily physically contiguous. This function is needed by DRM and VirtualBox. Correct an error in the prototype for kmem_malloc(). The third argument had the wrong type. Tested by: rnoland MFC after: 3 days
Diffstat (limited to 'sys/vm/vm_extern.h')
-rw-r--r--sys/vm/vm_extern.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h
index ad6087e..72a74b9 100644
--- a/sys/vm/vm_extern.h
+++ b/sys/vm/vm_extern.h
@@ -41,6 +41,8 @@ struct vnode;
int kernacc(void *, int, int);
vm_offset_t kmem_alloc(vm_map_t, vm_size_t);
+vm_offset_t kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags,
+ vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr);
vm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags,
vm_paddr_t low, vm_paddr_t high, unsigned long alignment,
unsigned long boundary, vm_memattr_t memattr);
@@ -49,7 +51,7 @@ vm_offset_t kmem_alloc_wait(vm_map_t, vm_size_t);
void kmem_free(vm_map_t, vm_offset_t, vm_size_t);
void kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t);
void kmem_init(vm_offset_t, vm_offset_t);
-vm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t);
+vm_offset_t kmem_malloc(vm_map_t map, vm_size_t size, int flags);
vm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t,
boolean_t);
void swapout_procs(int);
OpenPOWER on IntegriCloud