Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/sgx/sgx.c
Show First 20 Lines • Show All 352 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
sgx_page_remove(struct sgx_softc *sc, vm_page_t p) | sgx_page_remove(struct sgx_softc *sc, vm_page_t p) | ||||
{ | { | ||||
struct epc_page *epc; | struct epc_page *epc; | ||||
vm_paddr_t pa; | vm_paddr_t pa; | ||||
uint64_t offs; | uint64_t offs; | ||||
vm_page_lock(p); | vm_page_lock(p); | ||||
vm_page_remove(p); | (void)vm_page_remove(p); | ||||
vm_page_unlock(p); | vm_page_unlock(p); | ||||
dprintf("%s: p->pidx %ld\n", __func__, p->pindex); | dprintf("%s: p->pidx %ld\n", __func__, p->pindex); | ||||
pa = VM_PAGE_TO_PHYS(p); | pa = VM_PAGE_TO_PHYS(p); | ||||
epc = &sc->epc_pages[0]; | epc = &sc->epc_pages[0]; | ||||
offs = (pa - epc->phys) / PAGE_SIZE; | offs = (pa - epc->phys) / PAGE_SIZE; | ||||
epc = &sc->epc_pages[offs]; | epc = &sc->epc_pages[offs]; | ||||
▲ Show 20 Lines • Show All 851 Lines • Show Last 20 Lines |