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:
parent
c1f8b453c0
commit
c38b9c732f
@ -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;
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user