Use the kernel pmap if no thread is provided.

This commit is contained in:
Olivier Houchard 2004-07-21 22:04:05 +00:00
parent 6933f3a5ca
commit dd561b973b

View File

@ -433,7 +433,7 @@ bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dma_segment_t segs[],
if (td != NULL)
pmap = vmspace_pmap(td->td_proc->p_vmspace);
else
pmap = NULL;
pmap = pmap_kernel();
lastaddr = *lastaddrp;
bmask = ~(dmat->boundary - 1);
@ -457,7 +457,7 @@ bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dma_segment_t segs[],
} else {
pte = *ptep;
KASSERT((pte & L2_TYPE_MASK) != L2_TYPE_INV,
"INV type");
("INV type"));
if (__predict_false((pte & L2_TYPE_MASK)
== L2_TYPE_L)) {
curaddr = (pte & L2_L_FRAME) |