+
+/*
+ * make sure that the pde is valid and wired
+ */
+ v = trunc_page(((vm_offset_t)vtopte(adr)));
+ if (v != lastv) {
+ vm_map_pageable(&p->p_vmspace->vm_map, v,
+ round_page(v+1), FALSE);
+ lastv = v;
+ }
+
+/*
+ * do the vm_fault if needed, do the copy-on-write thing when
+ * reading stuff off device into memory.
+ */
+ if (ftype & VM_PROT_WRITE) {
+ /*
+ * properly handle copy-on-write
+ */
+ *(volatile int *) adr += 0;
+ }
+#if 0
+ else {
+ /*
+ * this clause is not really necessary because
+ * vslock does a vm_map_pageable FALSE.
+ * It is not optimally efficient to reference the
+ * page with the possiblity of it being paged out, but
+ * if this page is faulted here, it will be placed on the
+ * active queue, with the probability of it being paged
+ * out being very very low. This is here primarily for
+ * "symmetry".
+ */
+ *(volatile int *) adr;
+ }
+#endif