Eliminate the unused arena parameter from kmem_alloc_attr().
Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D16793
This commit is contained in:
parent
cc91864c26
commit
db7c2a4822
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338030
@ -186,7 +186,7 @@ ecc_ei_inject(int count)
|
||||
KASSERT(bit_mask != 0 && (bit_mask & ~INJ_VECTOR_MASK) == 0,
|
||||
("bit mask value is outside of range: 0x%x", bit_mask));
|
||||
|
||||
memory = kmem_alloc_attr(kernel_arena, PAGE_SIZE, M_WAITOK, 0, ~0,
|
||||
memory = kmem_alloc_attr(PAGE_SIZE, M_WAITOK, 0, ~0,
|
||||
VM_MEMATTR_UNCACHEABLE);
|
||||
|
||||
for (injected = 0; injected < count; injected++) {
|
||||
|
@ -52,8 +52,8 @@ drm_sg_alloc(struct drm_device *dev, struct drm_scatter_gather *request)
|
||||
entry->busaddr = malloc(entry->pages * sizeof(*entry->busaddr),
|
||||
DRM_MEM_SGLISTS, M_WAITOK | M_ZERO);
|
||||
|
||||
entry->vaddr = kmem_alloc_attr(kernel_arena, size, M_WAITOK | M_ZERO,
|
||||
0, BUS_SPACE_MAXADDR_32BIT, VM_MEMATTR_WRITE_COMBINING);
|
||||
entry->vaddr = kmem_alloc_attr(size, M_WAITOK | M_ZERO, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, VM_MEMATTR_WRITE_COMBINING);
|
||||
if (entry->vaddr == 0) {
|
||||
drm_sg_cleanup(entry);
|
||||
return (ENOMEM);
|
||||
|
@ -37,8 +37,8 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
static inline vm_offset_t drm_vmalloc_dma(vm_size_t size)
|
||||
{
|
||||
return kmem_alloc_attr(kernel_arena, size, M_NOWAIT | M_ZERO,
|
||||
0, BUS_SPACE_MAXADDR_32BIT, VM_MEMATTR_WRITE_COMBINING);
|
||||
return kmem_alloc_attr(size, M_NOWAIT | M_ZERO, 0,
|
||||
BUS_SPACE_MAXADDR_32BIT, VM_MEMATTR_WRITE_COMBINING);
|
||||
}
|
||||
|
||||
void drm_sg_cleanup(struct drm_sg_mem * entry)
|
||||
|
@ -54,7 +54,7 @@ vm_offset_t kmap_alloc_wait(vm_map_t, vm_size_t);
|
||||
void kmap_free_wakeup(vm_map_t, vm_offset_t, vm_size_t);
|
||||
|
||||
/* These operate on virtual addresses backed by memory. */
|
||||
vm_offset_t kmem_alloc_attr(struct vmem *, vm_size_t size, int flags,
|
||||
vm_offset_t kmem_alloc_attr(vm_size_t size, int flags,
|
||||
vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr);
|
||||
vm_offset_t kmem_alloc_attr_domain(int domain, vm_size_t size, int flags,
|
||||
vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr);
|
||||
|
@ -274,9 +274,8 @@ vm_ksubmap_init(struct kva_md_info *kmi)
|
||||
* Try to protect 32-bit DMAable memory from the largest
|
||||
* early alloc of wired mem.
|
||||
*/
|
||||
firstaddr = kmem_alloc_attr(kernel_arena, size,
|
||||
M_ZERO | M_NOWAIT, (vm_paddr_t)1 << 32,
|
||||
~(vm_paddr_t)0, VM_MEMATTR_DEFAULT);
|
||||
firstaddr = kmem_alloc_attr(size, M_ZERO | M_NOWAIT,
|
||||
(vm_paddr_t)1 << 32, ~(vm_paddr_t)0, VM_MEMATTR_DEFAULT);
|
||||
if (firstaddr == 0)
|
||||
#endif
|
||||
firstaddr = kmem_malloc(kernel_arena, size,
|
||||
|
@ -220,16 +220,13 @@ kmem_alloc_attr_domain(int domain, vm_size_t size, int flags, vm_paddr_t low,
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
kmem_alloc_attr(vmem_t *vmem, vm_size_t size, int flags, vm_paddr_t low,
|
||||
vm_paddr_t high, vm_memattr_t memattr)
|
||||
kmem_alloc_attr(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high,
|
||||
vm_memattr_t memattr)
|
||||
{
|
||||
struct vm_domainset_iter di;
|
||||
vm_offset_t addr;
|
||||
int domain;
|
||||
|
||||
KASSERT(vmem == kernel_arena,
|
||||
("kmem_alloc_attr: Only kernel_arena is supported."));
|
||||
|
||||
vm_domainset_iter_malloc_init(&di, kernel_object, &domain, &flags);
|
||||
do {
|
||||
addr = kmem_alloc_attr_domain(domain, size, flags, low, high,
|
||||
|
Loading…
Reference in New Issue
Block a user