Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/pmap.c
Show First 20 Lines • Show All 1,710 Lines • ▼ Show 20 Lines | if (pde & PG_PS) { | ||||
((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) { | ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) { | ||||
if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, | if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, | ||||
&pa)) | &pa)) | ||||
goto retry; | goto retry; | ||||
m = PHYS_TO_VM_PAGE(pa); | m = PHYS_TO_VM_PAGE(pa); | ||||
} | } | ||||
} | } | ||||
if (m != NULL) | if (m != NULL) | ||||
vm_page_hold(m); | vm_page_wire(m); | ||||
} | } | ||||
PA_UNLOCK_COND(pa); | PA_UNLOCK_COND(pa); | ||||
PMAP_UNLOCK(pmap); | PMAP_UNLOCK(pmap); | ||||
return (m); | return (m); | ||||
} | } | ||||
/*************************************************** | /*************************************************** | ||||
* Low level mapping routines..... | * Low level mapping routines..... | ||||
▲ Show 20 Lines • Show All 4,178 Lines • ▼ Show 20 Lines | __CONCAT(PMTYPE, trm_alloc)(size_t size, int flags) | ||||
return ((void *)res); | return ((void *)res); | ||||
} | } | ||||
static void | static void | ||||
__CONCAT(PMTYPE, trm_free)(void *addr, size_t size) | __CONCAT(PMTYPE, trm_free)(void *addr, size_t size) | ||||
{ | { | ||||
vmem_free(pmap_trm_arena, (uintptr_t)addr, roundup2(size, 4)); | vmem_free(pmap_trm_arena, (uintptr_t)addr, roundup2(size, 4)); | ||||
} | } | ||||
kib: I think this is dead code. Remove it as pre-cleanup ? | |||||
Done Inline ActionsI think the whole routine is effectively dead code. It does not declare a return value. It certainly does not compile after the 4/4 split. Do you think it is worth preserving at all? If so I will remove the dead code, fix style and compilation issues. markj: I think the whole routine is effectively dead code. It does not declare a return value. It… | |||||
Not Done Inline ActionsYes, exactly, I mean pmap_pid_dump() as a whole. It is covered by PMAP_DEBUG which does not appear anywhere else. kib: Yes, exactly, I mean pmap_pid_dump() as a whole. It is covered by PMAP_DEBUG which does not… | |||||
Done Inline ActionsAh, I thought you were referring only to the VM_MIN_KERNEL_ADDRESS fragment. I will simply remove this function, then. markj: Ah, I thought you were referring only to the VM_MIN_KERNEL_ADDRESS fragment. I will simply… | |||||
static void | static void | ||||
__CONCAT(PMTYPE, ksetrw)(vm_offset_t va) | __CONCAT(PMTYPE, ksetrw)(vm_offset_t va) | ||||
{ | { | ||||
*vtopte(va) |= PG_RW; | *vtopte(va) |= PG_RW; | ||||
} | } | ||||
static void | static void | ||||
▲ Show 20 Lines • Show All 242 Lines • Show Last 20 Lines |
I think this is dead code. Remove it as pre-cleanup ?