Use kmem_alloc_nofault() rather than kmem_alloc_pageable() in pmap_mapdev().

See revision 1.140 of kern/sys_pipe.c for a detailed rationale.

Submitted by:	tegge
This commit is contained in:
alc 2003-08-02 19:26:09 +00:00
parent c1f8b453c0
commit c38b9c732f
4 changed files with 4 additions and 4 deletions

View File

@ -2820,7 +2820,7 @@ pmap_mapdev(pa, size)
return ((void *)PHYS_TO_DMAP(pa));
offset = pa & PAGE_MASK;
size = roundup(offset + size, PAGE_SIZE);
va = kmem_alloc_pageable(kernel_map, size);
va = kmem_alloc_nofault(kernel_map, size);
if (!va)
panic("pmap_mapdev: Couldn't alloc kernel virtual memory");
pa = pa & PG_FRAME;

View File

@ -2313,7 +2313,7 @@ pmap_mapdev(vm_offset_t pa, vm_size_t size)
return ((void *) pa);
}
va = kmem_alloc_pageable(kernel_map, size);
va = kmem_alloc_nofault(kernel_map, size);
if (!va)
panic("pmap_mapdev: Couldn't alloc kernel virtual memory");

View File

@ -2313,7 +2313,7 @@ pmap_mapdev(vm_offset_t pa, vm_size_t size)
return ((void *) pa);
}
va = kmem_alloc_pageable(kernel_map, size);
va = kmem_alloc_nofault(kernel_map, size);
if (!va)
panic("pmap_mapdev: Couldn't alloc kernel virtual memory");

View File

@ -2313,7 +2313,7 @@ pmap_mapdev(vm_offset_t pa, vm_size_t size)
return ((void *) pa);
}
va = kmem_alloc_pageable(kernel_map, size);
va = kmem_alloc_nofault(kernel_map, size);
if (!va)
panic("pmap_mapdev: Couldn't alloc kernel virtual memory");