Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/sg_pager.c
Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | if (space + sg->sg_segs[i].ss_len <= (offset * PAGE_SIZE)) { | ||||
continue; | continue; | ||||
} | } | ||||
paddr = sg->sg_segs[i].ss_paddr + offset * PAGE_SIZE - space; | paddr = sg->sg_segs[i].ss_paddr + offset * PAGE_SIZE - space; | ||||
break; | break; | ||||
} | } | ||||
KASSERT(paddr != 1, ("invalid SG page index")); | KASSERT(paddr != 1, ("invalid SG page index")); | ||||
/* If "paddr" is a real page, perform a sanity check on "memattr". */ | /* If "paddr" is a real page, perform a sanity check on "memattr". */ | ||||
if ((m_paddr = vm_phys_paddr_to_vm_page(paddr)) != NULL && | if ((m_paddr = vm_phys_paddr_to_vm_page(paddr, NULL)) != NULL && | ||||
pmap_page_get_memattr(m_paddr) != memattr) { | pmap_page_get_memattr(m_paddr) != memattr) { | ||||
memattr = pmap_page_get_memattr(m_paddr); | memattr = pmap_page_get_memattr(m_paddr); | ||||
printf( | printf( | ||||
"WARNING: A device driver has set \"memattr\" inconsistently.\n"); | "WARNING: A device driver has set \"memattr\" inconsistently.\n"); | ||||
} | } | ||||
/* Return a fake page for the requested page. */ | /* Return a fake page for the requested page. */ | ||||
KASSERT(!(m[0]->flags & PG_FICTITIOUS), | KASSERT(!(m[0]->flags & PG_FICTITIOUS), | ||||
Show All 38 Lines |