--- old/usr/src/uts/common/vm/seg_spt.c	2015-05-08 18:10:36.447101464 -0400
+++ new/usr/src/uts/common/vm/seg_spt.c	2015-05-08 18:10:36.454058642 -0400
@@ -76,40 +76,10 @@
 static void segspt_free_pages(struct seg *seg, caddr_t addr, size_t len);
 static lgrp_mem_policy_info_t *segspt_getpolicy(struct seg *seg, caddr_t addr);
 
-static void
-segspt_badop()
-{
-	panic("segspt_badop called");
-	/*NOTREACHED*/
-}
-
-#define	SEGSPT_BADOP(t)	(t(*)())segspt_badop
-
-struct seg_ops segspt_ops = {
-	SEGSPT_BADOP(int),		/* dup */
-	segspt_unmap,
-	segspt_free,
-	SEGSPT_BADOP(int),		/* fault */
-	SEGSPT_BADOP(faultcode_t),	/* faulta */
-	SEGSPT_BADOP(int),		/* setprot */
-	SEGSPT_BADOP(int),		/* checkprot */
-	SEGSPT_BADOP(int),		/* kluster */
-	SEGSPT_BADOP(size_t),		/* swapout */
-	SEGSPT_BADOP(int),		/* sync */
-	SEGSPT_BADOP(size_t),		/* incore */
-	SEGSPT_BADOP(int),		/* lockop */
-	SEGSPT_BADOP(int),		/* getprot */
-	SEGSPT_BADOP(u_offset_t), 	/* getoffset */
-	SEGSPT_BADOP(int),		/* gettype */
-	SEGSPT_BADOP(int),		/* getvp */
-	SEGSPT_BADOP(int),		/* advise */
-	SEGSPT_BADOP(void),		/* dump */
-	SEGSPT_BADOP(int),		/* pagelock */
-	SEGSPT_BADOP(int),		/* setpgsz */
-	SEGSPT_BADOP(int),		/* getmemid */
-	segspt_getpolicy,		/* getpolicy */
-	SEGSPT_BADOP(int),		/* capable */
-	seg_inherit_notsup		/* inherit */
+static const struct seg_ops segspt_ops = {
+	.unmap		= segspt_unmap,
+	.free		= segspt_free,
+	.getpolicy	= segspt_getpolicy,
 };
 
 static int segspt_shmdup(struct seg *seg, struct seg *newseg);
@@ -123,7 +93,6 @@
 static int segspt_shmcheckprot(struct seg *seg, caddr_t addr, size_t size,
 			uint_t prot);
 static int	segspt_shmkluster(struct seg *seg, caddr_t addr, ssize_t delta);
-static size_t	segspt_shmswapout(struct seg *seg);
 static size_t segspt_shmincore(struct seg *seg, caddr_t addr, size_t len,
 			register char *vec);
 static int segspt_shmsync(struct seg *seg, register caddr_t addr, size_t len,
@@ -137,39 +106,31 @@
 static int segspt_shmgetvp(struct seg *seg, caddr_t addr, struct vnode **vpp);
 static int segspt_shmadvise(struct seg *seg, caddr_t addr, size_t len,
 			uint_t behav);
-static void segspt_shmdump(struct seg *seg);
 static int segspt_shmpagelock(struct seg *, caddr_t, size_t,
 			struct page ***, enum lock_type, enum seg_rw);
-static int segspt_shmsetpgsz(struct seg *, caddr_t, size_t, uint_t);
 static int segspt_shmgetmemid(struct seg *, caddr_t, memid_t *);
 static lgrp_mem_policy_info_t *segspt_shmgetpolicy(struct seg *, caddr_t);
-static int segspt_shmcapable(struct seg *, segcapability_t);
 
-struct seg_ops segspt_shmops = {
-	segspt_shmdup,
-	segspt_shmunmap,
-	segspt_shmfree,
-	segspt_shmfault,
-	segspt_shmfaulta,
-	segspt_shmsetprot,
-	segspt_shmcheckprot,
-	segspt_shmkluster,
-	segspt_shmswapout,
-	segspt_shmsync,
-	segspt_shmincore,
-	segspt_shmlockop,
-	segspt_shmgetprot,
-	segspt_shmgetoffset,
-	segspt_shmgettype,
-	segspt_shmgetvp,
-	segspt_shmadvise,	/* advise */
-	segspt_shmdump,
-	segspt_shmpagelock,
-	segspt_shmsetpgsz,
-	segspt_shmgetmemid,
-	segspt_shmgetpolicy,
-	segspt_shmcapable,
-	seg_inherit_notsup
+const struct seg_ops segspt_shmops = {
+	.dup		= segspt_shmdup,
+	.unmap		= segspt_shmunmap,
+	.free		= segspt_shmfree,
+	.fault		= segspt_shmfault,
+	.faulta		= segspt_shmfaulta,
+	.setprot	= segspt_shmsetprot,
+	.checkprot	= segspt_shmcheckprot,
+	.kluster	= segspt_shmkluster,
+	.sync		= segspt_shmsync,
+	.incore		= segspt_shmincore,
+	.lockop		= segspt_shmlockop,
+	.getprot	= segspt_shmgetprot,
+	.getoffset	= segspt_shmgetoffset,
+	.gettype	= segspt_shmgettype,
+	.getvp		= segspt_shmgetvp,
+	.advise		= segspt_shmadvise,
+	.pagelock	= segspt_shmpagelock,
+	.getmemid	= segspt_shmgetmemid,
+	.getpolicy	= segspt_shmgetpolicy,
 };
 
 static void segspt_purge(struct seg *seg);
@@ -1924,27 +1885,17 @@
 				    HAT_LOAD_LOCK | HAT_LOAD_SHARE);
 			}
 		} else {
-			if (hat == seg->s_as->a_hat) {
+			/*
+			 * Migrate pages marked for migration
+			 */
+			if (lgrp_optimizations())
+				page_migrate(seg, shm_addr, ppa, npages);
 
-				/*
-				 * Migrate pages marked for migration
-				 */
-				if (lgrp_optimizations())
-					page_migrate(seg, shm_addr, ppa,
-					    npages);
-
-				/* CPU HAT */
-				for (; pidx < npages;
-				    a += pgsz, pidx += pgcnt) {
-					hat_memload_array(sptseg->s_as->a_hat,
-					    a, pgsz, &ppa[pidx],
-					    sptd->spt_prot,
-					    HAT_LOAD_SHARE);
-				}
-			} else {
-				/* XHAT. Pass real address */
-				hat_memload_array(hat, shm_addr,
-				    size, ppa, sptd->spt_prot, HAT_LOAD_SHARE);
+			for (; pidx < npages; a += pgsz, pidx += pgcnt) {
+				hat_memload_array(sptseg->s_as->a_hat,
+				    a, pgsz, &ppa[pidx],
+				    sptd->spt_prot,
+				    HAT_LOAD_SHARE);
 			}
 
 			/*
@@ -2184,28 +2135,17 @@
 				    HAT_LOAD_LOCK | HAT_LOAD_SHARE);
 			}
 		} else {
-			if (hat == seg->s_as->a_hat) {
+			/*
+			 * Migrate pages marked for migration.
+			 */
+			if (lgrp_optimizations())
+				page_migrate(seg, shm_addr, ppa, npages);
 
-				/*
-				 * Migrate pages marked for migration.
-				 */
-				if (lgrp_optimizations())
-					page_migrate(seg, shm_addr, ppa,
-					    npages);
-
-				/* CPU HAT */
-				for (; pidx < npages;
-				    a += pgsz, pidx += pgcnt) {
-					sz = MIN(pgsz, ptob(npages - pidx));
-					hat_memload_array(sptseg->s_as->a_hat,
-					    a, sz, &ppa[pidx],
-					    sptd->spt_prot, HAT_LOAD_SHARE);
-				}
-			} else {
-				/* XHAT. Pass real address */
-				hat_memload_array(hat, shm_addr,
-				    ptob(npages), ppa, sptd->spt_prot,
-				    HAT_LOAD_SHARE);
+			for (; pidx < npages; a += pgsz, pidx += pgcnt) {
+				sz = MIN(pgsz, ptob(npages - pidx));
+				hat_memload_array(sptseg->s_as->a_hat,
+				    a, sz, &ppa[pidx],
+				    sptd->spt_prot, HAT_LOAD_SHARE);
 			}
 
 			/*
@@ -2264,13 +2204,6 @@
 	return (0);
 }
 
-/*ARGSUSED*/
-static size_t
-segspt_shmswapout(struct seg *seg)
-{
-	return (0);
-}
-
 /*
  * duplicate the shared page tables
  */
@@ -3014,20 +2947,6 @@
 	return (0);
 }
 
-/*ARGSUSED*/
-void
-segspt_shmdump(struct seg *seg)
-{
-	/* no-op for ISM segment */
-}
-
-/*ARGSUSED*/
-static faultcode_t
-segspt_shmsetpgsz(struct seg *seg, caddr_t addr, size_t len, uint_t szc)
-{
-	return (ENOTSUP);
-}
-
 /*
  * get a memory ID for an addr in a given segment
  */
@@ -3108,10 +3027,3 @@
 
 	return (policy_info);
 }
-
-/*ARGSUSED*/
-static int
-segspt_shmcapable(struct seg *seg, segcapability_t capability)
-{
-	return (0);
-}
