--- old/usr/src/uts/common/vm/vm_as.c	2015-05-08 18:04:10.600353153 -0400
+++ new/usr/src/uts/common/vm/vm_as.c	2015-05-08 18:04:10.607738061 -0400
@@ -708,7 +708,7 @@
 
 		next = AS_SEGNEXT(as, seg);
 retry:
-		err = SEGOP_UNMAP(seg, seg->s_base, seg->s_size);
+		err = segop_unmap(seg, seg->s_base, seg->s_size);
 		if (err == EAGAIN) {
 			mutex_enter(&as->a_contents);
 			if (as->a_callbacks) {
@@ -801,7 +801,7 @@
 			as_free(newas);
 			return (-1);
 		}
-		if ((error = SEGOP_DUP(seg, newseg)) != 0) {
+		if ((error = segop_dup(seg, newseg)) != 0) {
 			/*
 			 * We call seg_free() on the new seg
 			 * because the segment is not set up
@@ -940,7 +940,7 @@
 		else
 			ssize = rsize;
 
-		res = SEGOP_FAULT(hat, seg, raddr, ssize, type, rw);
+		res = segop_fault(hat, seg, raddr, ssize, type, rw);
 
 		/* Restore watchpoints */
 		if (holding_wpage) {
@@ -972,7 +972,7 @@
 				ssize = seg->s_base + seg->s_size - addrsav;
 			else
 				ssize = raddr - addrsav;
-			(void) SEGOP_FAULT(hat, seg, addrsav, ssize,
+			(void) segop_fault(hat, seg, addrsav, ssize,
 			    F_SOFTUNLOCK, S_OTHER);
 		}
 	}
@@ -1042,7 +1042,7 @@
 				break;
 			}
 		}
-		res = SEGOP_FAULTA(seg, raddr);
+		res = segop_faulta(seg, raddr);
 		if (res != 0)
 			break;
 	}
@@ -1132,7 +1132,7 @@
 		else
 			ssize = rsize;
 retry:
-		error = SEGOP_SETPROT(seg, raddr, ssize, prot);
+		error = segop_setprot(seg, raddr, ssize, prot);
 
 		if (error == IE_NOMEM) {
 			error = EAGAIN;
@@ -1283,7 +1283,7 @@
 		else
 			ssize = rsize;
 
-		error = SEGOP_CHECKPROT(seg, raddr, ssize, prot);
+		error = segop_checkprot(seg, raddr, ssize, prot);
 		if (error != 0)
 			break;
 	}
@@ -1349,7 +1349,7 @@
 			rsize = ssize;
 
 retry:
-		err = SEGOP_UNMAP(seg, raddr, ssize);
+		err = segop_unmap(seg, raddr, ssize);
 		if (err == EAGAIN) {
 			/*
 			 * Memory is currently locked.  It must be unlocked
@@ -1787,7 +1787,7 @@
 	while (seg != NULL) {
 		next_seg = AS_SEGNEXT(as, seg);
 		if (seg->s_flags & S_PURGE)
-			SEGOP_UNMAP(seg, seg->s_base, seg->s_size);
+			segop_unmap(seg, seg->s_base, seg->s_size);
 		seg = next_seg;
 	}
 	AS_LOCK_EXIT(as, &as->a_lock);
@@ -2099,7 +2099,7 @@
 			ssize = seg->s_base + seg->s_size - raddr;
 		else
 			ssize = rsize;
-		*sizep += isize = SEGOP_INCORE(seg, raddr, ssize, vec);
+		*sizep += isize = segop_incore(seg, raddr, ssize, vec);
 		if (isize != ssize) {
 			error = -1;
 			break;
@@ -2125,7 +2125,7 @@
 		range_start = (caddr_t)((uintptr_t)addr +
 		    ptob(pos1 - position));
 
-		(void) SEGOP_LOCKOP(seg, range_start, size, attr, MC_UNLOCK,
+		(void) segop_lockop(seg, range_start, size, attr, MC_UNLOCK,
 		    (ulong_t *)NULL, (size_t)NULL);
 		pos1 = pos2;
 	}
@@ -2221,7 +2221,7 @@
 		}
 
 		for (seg = AS_SEGFIRST(as); seg; seg = AS_SEGNEXT(as, seg)) {
-			error = SEGOP_LOCKOP(seg, seg->s_base,
+			error = segop_lockop(seg, seg->s_base,
 			    seg->s_size, attr, MC_LOCK, mlock_map, pos);
 			if (error != 0)
 				break;
@@ -2250,7 +2250,7 @@
 		mutex_exit(&as->a_contents);
 
 		for (seg = AS_SEGFIRST(as); seg; seg = AS_SEGNEXT(as, seg)) {
-			error = SEGOP_LOCKOP(seg, seg->s_base,
+			error = segop_lockop(seg, seg->s_base,
 			    seg->s_size, attr, MC_UNLOCK, NULL, 0);
 			if (error != 0)
 				break;
@@ -2328,7 +2328,7 @@
 		 * objects.
 		 */
 		case MC_SYNC:
-			if (error = SEGOP_SYNC(seg, raddr, ssize,
+			if (error = segop_sync(seg, raddr, ssize,
 			    attr, (uint_t)arg)) {
 				AS_LOCK_EXIT(as, &as->a_lock);
 				return (error);
@@ -2339,7 +2339,7 @@
 		 * Lock pages in memory.
 		 */
 		case MC_LOCK:
-			if (error = SEGOP_LOCKOP(seg, raddr, ssize,
+			if (error = segop_lockop(seg, raddr, ssize,
 			    attr, func, mlock_map, pos)) {
 				as_unlockerr(as, attr, mlock_map, initraddr,
 				    initrsize - rsize + ssize);
@@ -2354,7 +2354,7 @@
 		 * Unlock mapped pages.
 		 */
 		case MC_UNLOCK:
-			(void) SEGOP_LOCKOP(seg, raddr, ssize, attr, func,
+			(void) segop_lockop(seg, raddr, ssize, attr, func,
 			    (ulong_t *)NULL, (size_t)NULL);
 			break;
 
@@ -2362,7 +2362,7 @@
 		 * Store VM advise for mapped pages in segment layer.
 		 */
 		case MC_ADVISE:
-			error = SEGOP_ADVISE(seg, raddr, ssize, (uint_t)arg);
+			error = segop_advise(seg, raddr, ssize, (uint_t)arg);
 
 			/*
 			 * Check for regular errors and special retry error
@@ -2401,7 +2401,7 @@
 			if (seg->s_ops->inherit == NULL) {
 				error = ENOTSUP;
 			} else {
-				error = SEGOP_INHERIT(seg, raddr, ssize,
+				error = segop_inherit(seg, raddr, ssize,
 				    SEGP_INH_ZERO);
 			}
 			if (error != 0) {
@@ -2516,7 +2516,7 @@
 			if (seg->s_ops == &segvn_ops) {
 				vnode_t *vp;
 
-				if (SEGOP_GETVP(seg, addr, &vp) != 0 ||
+				if (segop_getvp(seg, addr, &vp) != 0 ||
 				    vp != NULL) {
 					AS_LOCK_EXIT(as, &as->a_lock);
 					goto slow;
@@ -2554,7 +2554,7 @@
 			ssize = size;
 		}
 		pl = &plist[npages + cnt];
-		error = SEGOP_PAGELOCK(seg, addr, ssize, (page_t ***)pl,
+		error = segop_pagelock(seg, addr, ssize, (page_t ***)pl,
 		    L_PAGELOCK, rw);
 		if (error) {
 			break;
@@ -2597,7 +2597,7 @@
 		}
 		pl = &plist[npages + cnt];
 		ASSERT(*pl != NULL);
-		(void) SEGOP_PAGELOCK(seg, addr, ssize, (page_t ***)pl,
+		(void) segop_pagelock(seg, addr, ssize, (page_t ***)pl,
 		    L_PAGEUNLOCK, rw);
 	}
 
@@ -2672,7 +2672,7 @@
 	/*
 	 * try to lock pages and pass back shadow list
 	 */
-	err = SEGOP_PAGELOCK(seg, raddr, rsize, ppp, L_PAGELOCK, rw);
+	err = segop_pagelock(seg, raddr, rsize, ppp, L_PAGELOCK, rw);
 
 	TRACE_0(TR_FAC_PHYSIO, TR_PHYSIO_SEG_LOCK_END, "seg_lock_1_end");
 
@@ -2735,7 +2735,7 @@
 		}
 		pl = &plist[npages + cnt];
 		ASSERT(*pl != NULL);
-		(void) SEGOP_PAGELOCK(seg, addr, ssize, (page_t ***)pl,
+		(void) segop_pagelock(seg, addr, ssize, (page_t ***)pl,
 		    L_PAGEUNLOCK, rw);
 	}
 	ASSERT(cnt > 0);
@@ -2781,7 +2781,7 @@
 
 	ASSERT(raddr >= seg->s_base && raddr < seg->s_base + seg->s_size);
 	if (raddr + rsize <= seg->s_base + seg->s_size) {
-		SEGOP_PAGELOCK(seg, raddr, rsize, &pp, L_PAGEUNLOCK, rw);
+		segop_pagelock(seg, raddr, rsize, &pp, L_PAGEUNLOCK, rw);
 	} else {
 		as_pageunlock_segs(as, seg, raddr, rsize, pp, rw);
 		return;
@@ -2836,7 +2836,7 @@
 		}
 
 retry:
-		error = SEGOP_SETPAGESIZE(seg, raddr, ssize, szc);
+		error = segop_setpagesize(seg, raddr, ssize, szc);
 
 		if (error == IE_NOMEM) {
 			error = EAGAIN;
@@ -2915,7 +2915,7 @@
 }
 
 /*
- * as_iset3_default_lpsize() just calls SEGOP_SETPAGESIZE() on all segments
+ * as_iset3_default_lpsize() just calls segop_setpagesize() on all segments
  * in its chunk where s_szc is less than the szc we want to set.
  */
 static int
@@ -2947,12 +2947,12 @@
 		}
 
 		if (szc > seg->s_szc) {
-			error = SEGOP_SETPAGESIZE(seg, raddr, ssize, szc);
+			error = segop_setpagesize(seg, raddr, ssize, szc);
 			/* Only retry on EINVAL segments that have no vnode. */
 			if (error == EINVAL) {
 				vnode_t *vp = NULL;
-				if ((SEGOP_GETTYPE(seg, raddr) & MAP_SHARED) &&
-				    (SEGOP_GETVP(seg, raddr, &vp) != 0 ||
+				if ((segop_gettype(seg, raddr) & MAP_SHARED) &&
+				    (segop_getvp(seg, raddr, &vp) != 0 ||
 				    vp == NULL)) {
 					*retry = 1;
 				} else {
@@ -3195,7 +3195,7 @@
 		return (ENOMEM);
 	}
 	if (seg->s_ops == &segvn_ops) {
-		rtype = SEGOP_GETTYPE(seg, addr);
+		rtype = segop_gettype(seg, addr);
 		rflags = rtype & (MAP_TEXT | MAP_INITDATA);
 		rtype = rtype & (MAP_SHARED | MAP_PRIVATE);
 		segvn = 1;
@@ -3213,7 +3213,7 @@
 				break;
 			}
 			if (seg->s_ops == &segvn_ops) {
-				stype = SEGOP_GETTYPE(seg, raddr);
+				stype = segop_gettype(seg, raddr);
 				sflags = stype & (MAP_TEXT | MAP_INITDATA);
 				stype &= (MAP_SHARED | MAP_PRIVATE);
 				if (segvn && (rflags != sflags ||
@@ -3327,7 +3327,7 @@
 		vaddr = pwp->wp_vaddr;
 		if (pwp->wp_oprot != 0 ||	/* already set up */
 		    (seg = as_segat(as, vaddr)) == NULL ||
-		    SEGOP_GETPROT(seg, vaddr, 0, &prot) != 0)
+		    segop_getprot(seg, vaddr, 0, &prot) != 0)
 			continue;
 
 		pwp->wp_oprot = prot;
@@ -3338,7 +3338,7 @@
 		if (pwp->wp_exec)
 			prot &= ~(PROT_READ|PROT_WRITE|PROT_EXEC);
 		if (!(pwp->wp_flags & WP_NOWATCH) && prot != pwp->wp_oprot) {
-			err = SEGOP_SETPROT(seg, vaddr, PAGESIZE, prot);
+			err = segop_setprot(seg, vaddr, PAGESIZE, prot);
 			if (err == IE_RETRY) {
 				pwp->wp_oprot = 0;
 				ASSERT(retrycnt == 0);
@@ -3377,7 +3377,7 @@
 			continue;
 
 		if ((prot = pwp->wp_oprot) != pwp->wp_prot) {
-			err = SEGOP_SETPROT(seg, vaddr, PAGESIZE, prot);
+			err = segop_setprot(seg, vaddr, PAGESIZE, prot);
 			if (err == IE_RETRY) {
 				ASSERT(retrycnt == 0);
 				retrycnt++;
@@ -3431,7 +3431,7 @@
 				panic("as_setwatchprot: no seg");
 				/*NOTREACHED*/
 			}
-			err = SEGOP_SETPROT(seg, vaddr, PAGESIZE, wprot);
+			err = segop_setprot(seg, vaddr, PAGESIZE, wprot);
 			if (err == IE_RETRY) {
 				ASSERT(retrycnt == 0);
 				retrycnt++;
@@ -3478,7 +3478,7 @@
 				seg = as_segat(as, pwp->wp_vaddr);
 				if (seg == NULL)
 					continue;
-				err = SEGOP_SETPROT(seg, pwp->wp_vaddr,
+				err = segop_setprot(seg, pwp->wp_vaddr,
 				    PAGESIZE, prot);
 				if (err == IE_RETRY) {
 					ASSERT(retrycnt == 0);
@@ -3535,7 +3535,7 @@
 		return (ENODEV);
 	}
 
-	sts = SEGOP_GETMEMID(seg, addr, memidp);
+	sts = segop_getmemid(seg, addr, memidp);
 
 	AS_LOCK_EXIT(as, &as->a_lock);
 	return (sts);
