Lines Matching refs:seg
51 #include <vm/seg.h>
61 page_valid(struct seg *seg, caddr_t addr)
72 if (seg->s_ops == &segvn_ops &&
73 SEGOP_GETVP(seg, addr, &vp) == 0 &&
77 u_offset_t offset = SEGOP_GETOFFSET(seg, addr);
87 if (seg->s_ops == &segspt_shmops &&
88 addr >= seg->s_base + spt_realsize(seg))
96 if (seg->s_ops == &segdev_ops &&
97 ((SEGOP_GETTYPE(seg, addr) & (MAP_SHARED | MAP_PRIVATE)) == 0))
106 if (seg->s_ops == &segvn_ops &&
107 (svd = (struct segvn_data *)seg->s_data) != NULL &&
118 (void) SEGOP_INCORE(seg, addr, PAGESIZE, &incore);
186 struct seg *seg;
204 if ((seg = as_segat(as, page)) == NULL ||
205 !page_valid(seg, page)) {
209 SEGOP_GETPROT(seg, page, 0, &prot);
214 err = SEGOP_SETPROT(seg, page, PAGESIZE, prot | prot_rw);
239 else if (seg->s_ops == &segvn_ops)
244 if (SEGOP_FAULT(as->a_hat, seg, page, PAGESIZE, F_SOFTLOCK, rw)) {
246 (void) SEGOP_SETPROT(seg, page, PAGESIZE, prot);
268 if (seg->s_ops == &segdev_ops) {
274 if (segdev_copyto(seg, addr, buf, vaddr, len))
277 if (segdev_copyfrom(seg, addr, vaddr, buf, len))
303 (void) SEGOP_FAULT(as->a_hat, seg, page, PAGESIZE, F_SOFTUNLOCK, rw);
306 (void) SEGOP_SETPROT(seg, page, PAGESIZE, prot);