mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 16:54:02 +00:00
For years, kmem_alloc_pageable() has been misused. Now that the last of
these misuses has been corrected, remove it before new ones appear, such as arm/arm/pmap.c revision 1.8.
This commit is contained in:
parent
4411688509
commit
5122b74809
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132638
|
@ -58,7 +58,6 @@ int swapon(struct thread *, void *, int *);
|
|||
int kernacc(void *, int, int);
|
||||
vm_offset_t kmem_alloc(vm_map_t, vm_size_t);
|
||||
vm_offset_t kmem_alloc_nofault(vm_map_t, vm_size_t);
|
||||
vm_offset_t kmem_alloc_pageable(vm_map_t, vm_size_t);
|
||||
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);
|
||||
|
|
|
@ -88,30 +88,6 @@ vm_map_t exec_map=0;
|
|||
vm_map_t pipe_map;
|
||||
vm_map_t buffer_map=0;
|
||||
|
||||
/*
|
||||
* kmem_alloc_pageable:
|
||||
*
|
||||
* Allocate pageable memory to the kernel's address map.
|
||||
* "map" must be kernel_map or a submap of kernel_map.
|
||||
*/
|
||||
vm_offset_t
|
||||
kmem_alloc_pageable(map, size)
|
||||
vm_map_t map;
|
||||
vm_size_t size;
|
||||
{
|
||||
vm_offset_t addr;
|
||||
int result;
|
||||
|
||||
size = round_page(size);
|
||||
addr = vm_map_min(map);
|
||||
result = vm_map_find(map, NULL, 0,
|
||||
&addr, size, TRUE, VM_PROT_ALL, VM_PROT_ALL, 0);
|
||||
if (result != KERN_SUCCESS) {
|
||||
return (0);
|
||||
}
|
||||
return (addr);
|
||||
}
|
||||
|
||||
/*
|
||||
* kmem_alloc_nofault:
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue