--- old/usr/src/uts/common/vm/seg_kmem.c	2015-05-08 18:10:35.492308118 -0400
+++ new/usr/src/uts/common/vm/seg_kmem.c	2015-05-08 18:10:35.499166727 -0400
@@ -428,14 +428,6 @@
 	return (addr);
 }
 
-static void
-segkmem_badop()
-{
-	panic("segkmem_badop");
-}
-
-#define	SEGKMEM_BADOP(t)	(t(*)())segkmem_badop
-
 /*ARGSUSED*/
 static faultcode_t
 segkmem_fault(struct hat *hat, struct seg *seg, caddr_t addr, size_t size,
@@ -457,7 +449,7 @@
 	 */
 	if (segkp_bitmap && seg == &kvseg &&
 	    BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base))))
-		return (SEGOP_FAULT(hat, segkp, addr, size, type, rw));
+		return (segop_fault(hat, segkp, addr, size, type, rw));
 
 	if (rw != S_READ && rw != S_WRITE && rw != S_OTHER)
 		return (FC_NOSUPPORT);
@@ -519,7 +511,7 @@
 	 */
 	if (segkp_bitmap && seg == &kvseg &&
 	    BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base))))
-		return (SEGOP_SETPROT(segkp, addr, size, prot));
+		return (segop_setprot(segkp, addr, size, prot));
 
 	if (prot == 0)
 		hat_unload(kas.a_hat, addr, size, HAT_UNLOAD);
@@ -539,16 +531,16 @@
 	ASSERT(RW_LOCK_HELD(&seg->s_as->a_lock));
 
 	if (seg->s_as != &kas)
-		segkmem_badop();
+		panic("segkmem badop");
 
 	/*
 	 * If it is one of segkp pages, call into segkp.
 	 */
 	if (segkp_bitmap && seg == &kvseg &&
 	    BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base))))
-		return (SEGOP_CHECKPROT(segkp, addr, size, prot));
+		return (segop_checkprot(segkp, addr, size, prot));
 
-	segkmem_badop();
+	panic("segkmem badop");
 	return (0);
 }
 
@@ -563,16 +555,16 @@
 	ASSERT(RW_LOCK_HELD(&seg->s_as->a_lock));
 
 	if (seg->s_as != &kas)
-		segkmem_badop();
+		panic("segkmem badop");
 
 	/*
 	 * If it is one of segkp pages, call into segkp.
 	 */
 	if (segkp_bitmap && seg == &kvseg &&
 	    BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base))))
-		return (SEGOP_KLUSTER(segkp, addr, delta));
+		return (segop_kluster(segkp, addr, delta));
 
-	segkmem_badop();
+	panic("segkmem badop");
 	return (0);
 }
 
@@ -691,7 +683,7 @@
 	 */
 	if (segkp_bitmap && seg == &kvseg &&
 	    BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base))))
-		return (SEGOP_PAGELOCK(segkp, addr, len, ppp, type, rw));
+		return (segop_pagelock(segkp, addr, len, ppp, type, rw));
 
 	npages = btopr(len);
 	nb = sizeof (page_t *) * npages;
@@ -744,27 +736,20 @@
 	ASSERT(RW_LOCK_HELD(&seg->s_as->a_lock));
 
 	if (seg->s_as != &kas)
-		segkmem_badop();
+		panic("segkmem badop");
 
 	/*
 	 * If it is one of segkp pages, call into segkp.
 	 */
 	if (segkp_bitmap && seg == &kvseg &&
 	    BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base))))
-		return (SEGOP_GETMEMID(segkp, addr, memidp));
+		return (segop_getmemid(segkp, addr, memidp));
 
-	segkmem_badop();
+	panic("segkmem badop");
 	return (0);
 }
 
 /*ARGSUSED*/
-static lgrp_mem_policy_info_t *
-segkmem_getpolicy(struct seg *seg, caddr_t addr)
-{
-	return (NULL);
-}
-
-/*ARGSUSED*/
 static int
 segkmem_capable(struct seg *seg, segcapability_t capability)
 {
@@ -773,31 +758,15 @@
 	return (0);
 }
 
-static struct seg_ops segkmem_ops = {
-	SEGKMEM_BADOP(int),		/* dup */
-	SEGKMEM_BADOP(int),		/* unmap */
-	SEGKMEM_BADOP(void),		/* free */
-	segkmem_fault,
-	SEGKMEM_BADOP(faultcode_t),	/* faulta */
-	segkmem_setprot,
-	segkmem_checkprot,
-	segkmem_kluster,
-	SEGKMEM_BADOP(size_t),		/* swapout */
-	SEGKMEM_BADOP(int),		/* sync */
-	SEGKMEM_BADOP(size_t),		/* incore */
-	SEGKMEM_BADOP(int),		/* lockop */
-	SEGKMEM_BADOP(int),		/* getprot */
-	SEGKMEM_BADOP(u_offset_t),	/* getoffset */
-	SEGKMEM_BADOP(int),		/* gettype */
-	SEGKMEM_BADOP(int),		/* getvp */
-	SEGKMEM_BADOP(int),		/* advise */
-	segkmem_dump,
-	segkmem_pagelock,
-	SEGKMEM_BADOP(int),		/* setpgsz */
-	segkmem_getmemid,
-	segkmem_getpolicy,		/* getpolicy */
-	segkmem_capable,		/* capable */
-	seg_inherit_notsup		/* inherit */
+static const struct seg_ops segkmem_ops = {
+	.fault		= segkmem_fault,
+	.setprot	= segkmem_setprot,
+	.checkprot	= segkmem_checkprot,
+	.kluster	= segkmem_kluster,
+	.dump		= segkmem_dump,
+	.pagelock	= segkmem_pagelock,
+	.getmemid	= segkmem_getmemid,
+	.capable	= segkmem_capable,
 };
 
 int
