--- old/usr/src/uts/common/vm/seg_kmem.c	2015-05-08 18:04:17.028405761 -0400
+++ new/usr/src/uts/common/vm/seg_kmem.c	2015-05-08 18:04:17.035994406 -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,
@@ -539,7 +531,7 @@
 	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.
@@ -548,7 +540,7 @@
 	    BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base))))
 		return (segop_checkprot(segkp, addr, size, prot));
 
-	segkmem_badop();
+	panic("segkmem badop");
 	return (0);
 }
 
@@ -563,7 +555,7 @@
 	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.
@@ -572,7 +564,7 @@
 	    BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base))))
 		return (segop_kluster(segkp, addr, delta));
 
-	segkmem_badop();
+	panic("segkmem badop");
 	return (0);
 }
 
@@ -744,7 +736,7 @@
 	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.
@@ -753,7 +745,7 @@
 	    BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base))))
 		return (segop_getmemid(segkp, addr, memidp));
 
-	segkmem_badop();
+	panic("segkmem badop");
 	return (0);
 }
 
@@ -774,25 +766,12 @@
 }
 
 static struct seg_ops segkmem_ops = {
-	.dup		= SEGKMEM_BADOP(int),
-	.unmap		= SEGKMEM_BADOP(int),
-	.free		= SEGKMEM_BADOP(void),
 	.fault		= segkmem_fault,
-	.faulta		= SEGKMEM_BADOP(faultcode_t),
 	.setprot	= segkmem_setprot,
 	.checkprot	= segkmem_checkprot,
 	.kluster	= segkmem_kluster,
-	.sync		= SEGKMEM_BADOP(int),
-	.incore		= SEGKMEM_BADOP(size_t),
-	.lockop		= SEGKMEM_BADOP(int),
-	.getprot	= SEGKMEM_BADOP(int),
-	.getoffset	= SEGKMEM_BADOP(u_offset_t),
-	.gettype	= SEGKMEM_BADOP(int),
-	.getvp		= SEGKMEM_BADOP(int),
-	.advise		= SEGKMEM_BADOP(int),
 	.dump		= segkmem_dump,
 	.pagelock	= segkmem_pagelock,
-	.setpagesize	= SEGKMEM_BADOP(int),
 	.getmemid	= segkmem_getmemid,
 	.getpolicy	= segkmem_getpolicy,
 	.capable	= segkmem_capable,
--- old/usr/src/uts/common/vm/seg_kp.c	2015-05-08 18:04:17.285509145 -0400
+++ new/usr/src/uts/common/vm/seg_kp.c	2015-05-08 18:04:17.292792894 -0400
@@ -75,7 +75,6 @@
 /*
  * Private seg op routines
  */
-static void	segkp_badop(void);
 static void	segkp_dump(struct seg *seg);
 static int	segkp_checkprot(struct seg *seg, caddr_t addr, size_t len,
 			uint_t prot);
@@ -109,8 +108,6 @@
  */
 static struct segkp_cache segkp_cache[SEGKP_MAX_CACHE];
 
-#define	SEGKP_BADOP(t)	(t(*)())segkp_badop
-
 /*
  * When there are fewer than red_minavail bytes left on the stack,
  * segkp_map_red() will map in the redzone (if called).  5000 seems
@@ -146,25 +143,11 @@
 pgcnt_t anon_segkp_pages_resv;		/* anon reserved by seg_kp */
 
 static struct	seg_ops segkp_ops = {
-	.dup		= SEGKP_BADOP(int),
-	.unmap		= SEGKP_BADOP(int),
-	.free		= SEGKP_BADOP(void),
 	.fault		= segkp_fault,
-	.faulta		= SEGKP_BADOP(faultcode_t),
-	.setprot	= SEGKP_BADOP(int),
 	.checkprot	= segkp_checkprot,
 	.kluster	= segkp_kluster,
-	.sync		= SEGKP_BADOP(int),
-	.incore		= SEGKP_BADOP(size_t),
-	.lockop		= SEGKP_BADOP(int),
-	.getprot	= SEGKP_BADOP(int),
-	.getoffset	= SEGKP_BADOP(u_offset_t),
-	.gettype	= SEGKP_BADOP(int),
-	.getvp		= SEGKP_BADOP(int),
-	.advise		= SEGKP_BADOP(int),
 	.dump		= segkp_dump,
 	.pagelock	= segkp_pagelock,
-	.setpagesize	= SEGKP_BADOP(int),
 	.getmemid	= segkp_getmemid,
 	.getpolicy	= segkp_getpolicy,
 	.capable	= segkp_capable,
@@ -172,13 +155,6 @@
 };
 
 
-static void
-segkp_badop(void)
-{
-	panic("segkp_badop");
-	/*NOTREACHED*/
-}
-
 static void segkpinit_mem_config(struct seg *);
 
 static uint32_t segkp_indel;
--- old/usr/src/uts/common/vm/seg_kpm.c	2015-05-08 18:04:17.533042207 -0400
+++ new/usr/src/uts/common/vm/seg_kpm.c	2015-05-08 18:04:17.540229510 -0400
@@ -103,37 +103,39 @@
 faultcode_t segkpm_fault(struct hat *hat, struct seg *seg, caddr_t addr,
 			size_t len, enum fault_type type, enum seg_rw rw);
 static void	segkpm_dump(struct seg *);
-static void	segkpm_badop(void);
-static int	segkpm_notsup(void);
+static int	segkpm_pagelock(struct seg *seg, caddr_t addr, size_t len,
+			struct page ***page, enum lock_type type,
+			enum seg_rw rw);
 static int	segkpm_capable(struct seg *, segcapability_t);
 
-#define	SEGKPM_BADOP(t)	(t(*)())segkpm_badop
-#define	SEGKPM_NOTSUP	(int(*)())segkpm_notsup
-
 static struct seg_ops segkpm_ops = {
-	.dup		= SEGKPM_BADOP(int),
-	.unmap		= SEGKPM_BADOP(int),
-	.free		= SEGKPM_BADOP(void),
 	.fault		= segkpm_fault,
-	.faulta		= SEGKPM_BADOP(int),
-	.setprot	= SEGKPM_BADOP(int),
-	.checkprot	= SEGKPM_BADOP(int),
-	.kluster	= SEGKPM_BADOP(int),
-	.sync		= SEGKPM_BADOP(int),
-	.incore		= SEGKPM_BADOP(size_t),
-	.lockop		= SEGKPM_BADOP(int),
-	.getprot	= SEGKPM_BADOP(int),
-	.getoffset	= SEGKPM_BADOP(u_offset_t),
-	.gettype	= SEGKPM_BADOP(int),
-	.getvp		= SEGKPM_BADOP(int),
-	.advise		= SEGKPM_BADOP(int),
 	.dump		= segkpm_dump,
-	.pagelock	= SEGKPM_NOTSUP,
-	.setpagesize	= SEGKPM_BADOP(int),
-	.getmemid	= SEGKPM_BADOP(int),
-	.getpolicy	= SEGKPM_BADOP(lgrp_mem_policy_info_t *),
+	.pagelock	= segkpm_pagelock,
 	.capable	= segkpm_capable,
 	.inherit	= seg_inherit_notsup,
+//#ifndef SEGKPM_SUPPORT
+#if 0
+#error FIXME: define nop
+	.dup		= nop,
+	.unmap		= nop,
+	.free		= nop,
+	.faulta		= nop,
+	.setprot	= nop,
+	.checkprot	= nop,
+	.kluster	= nop,
+	.sync		= nop,
+	.incore		= nop,
+	.lockop		= nop,
+	.getprot	= nop,
+	.getoffset	= nop,
+	.gettype	= nop,
+	.getvp		= nop,
+	.advise		= nop,
+	.setpagesize	= nop,
+	.getmemid	= nop,
+	.getpolicy	= nop,
+#endif
 };
 
 /*
@@ -283,40 +285,41 @@
 	page_unlock(pp);
 }
 
-static void
-segkpm_badop()
-{
-	panic("segkpm_badop");
-}
-
 #else	/* SEGKPM_SUPPORT */
 
 /* segkpm stubs */
 
 /*ARGSUSED*/
-int segkpm_create(struct seg *seg, void *argsp) { return (0); }
+int segkpm_create(struct seg *seg, void *argsp)
+{
+	return (0);
+}
 
 /* ARGSUSED */
 faultcode_t
 segkpm_fault(struct hat *hat, struct seg *seg, caddr_t addr, size_t len,
 	enum fault_type type, enum seg_rw rw)
 {
-	return ((faultcode_t)0);
+	return (0);
 }
 
 /* ARGSUSED */
-caddr_t segkpm_create_va(u_offset_t off) { return (NULL); }
+caddr_t segkpm_create_va(u_offset_t off)
+{
+	return (NULL);
+}
 
 /* ARGSUSED */
-void segkpm_mapout_validkpme(struct kpme *kpme) {}
-
-static void
-segkpm_badop() {}
+void segkpm_mapout_validkpme(struct kpme *kpme)
+{
+}
 
 #endif	/* SEGKPM_SUPPORT */
 
+/* ARGSUSED */
 static int
-segkpm_notsup()
+segkpm_pagelock(struct seg *seg, caddr_t addr, size_t len,
+	struct page ***page, enum lock_type type, enum seg_rw rw)
 {
 	return (ENOTSUP);
 }
@@ -327,7 +330,8 @@
 /*ARGSUSED*/
 static void
 segkpm_dump(struct seg *seg)
-{}
+{
+}
 
 /*
  * We claim to have no special capabilities.
--- old/usr/src/uts/common/vm/seg_map.c	2015-05-08 18:04:17.744836451 -0400
+++ new/usr/src/uts/common/vm/seg_map.c	2015-05-08 18:04:17.752159846 -0400
@@ -87,7 +87,6 @@
 static int	segmap_pagelock(struct seg *seg, caddr_t addr, size_t len,
 			struct page ***ppp, enum lock_type type,
 			enum seg_rw rw);
-static void	segmap_badop(void);
 static int	segmap_getmemid(struct seg *seg, caddr_t addr, memid_t *memidp);
 static lgrp_mem_policy_info_t	*segmap_getpolicy(struct seg *seg,
     caddr_t addr);
@@ -98,28 +97,18 @@
 			struct smap *, enum seg_rw);
 struct smap	*get_smap_kpm(caddr_t, page_t **);
 
-#define	SEGMAP_BADOP(t)	(t(*)())segmap_badop
-
 static struct seg_ops segmap_ops = {
-	.dup		= SEGMAP_BADOP(int),
-	.unmap		= SEGMAP_BADOP(int),
 	.free		= segmap_free,
 	.fault		= segmap_fault,
 	.faulta		= segmap_faulta,
-	.setprot	= SEGMAP_BADOP(int),
 	.checkprot	= segmap_checkprot,
 	.kluster	= segmap_kluster,
-	.sync		= SEGMAP_BADOP(int),
-	.incore		= SEGMAP_BADOP(size_t),
-	.lockop		= SEGMAP_BADOP(int),
 	.getprot	= segmap_getprot,
 	.getoffset	= segmap_getoffset,
 	.gettype	= segmap_gettype,
 	.getvp		= segmap_getvp,
-	.advise		= SEGMAP_BADOP(int),
 	.dump		= segmap_dump,
 	.pagelock	= segmap_pagelock,
-	.setpagesize	= SEGMAP_BADOP(int),
 	.getmemid	= segmap_getmemid,
 	.getpolicy	= segmap_getpolicy,
 	.capable	= segmap_capable,
@@ -908,13 +897,6 @@
 	return (0);
 }
 
-static void
-segmap_badop()
-{
-	panic("segmap_badop");
-	/*NOTREACHED*/
-}
-
 /*
  * Special private segmap operations
  */
--- old/usr/src/uts/common/vm/seg_spt.c	2015-05-08 18:04:18.029203610 -0400
+++ new/usr/src/uts/common/vm/seg_spt.c	2015-05-08 18:04:18.036604601 -0400
@@ -76,38 +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 = {
-	.dup		= SEGSPT_BADOP(int),
 	.unmap		= segspt_unmap,
 	.free		= segspt_free,
-	.fault		= SEGSPT_BADOP(int),
-	.faulta		= SEGSPT_BADOP(faultcode_t),
-	.setprot	= SEGSPT_BADOP(int),
-	.checkprot	= SEGSPT_BADOP(int),
-	.kluster	= SEGSPT_BADOP(int),
-	.sync		= SEGSPT_BADOP(int),
-	.incore		= SEGSPT_BADOP(size_t),
-	.lockop		= SEGSPT_BADOP(int),
-	.getprot	= SEGSPT_BADOP(int),
-	.getoffset	= SEGSPT_BADOP(u_offset_t),
-	.gettype	= SEGSPT_BADOP(int),
-	.getvp		= SEGSPT_BADOP(int),
-	.advise		= SEGSPT_BADOP(int),
-	.dump		= SEGSPT_BADOP(void),
-	.pagelock	= SEGSPT_BADOP(int),
-	.setpagesize	= SEGSPT_BADOP(int),
-	.getmemid	= SEGSPT_BADOP(int),
 	.getpolicy	= segspt_getpolicy,
-	.capable	= SEGSPT_BADOP(int),
 	.inherit	= seg_inherit_notsup,
 };
 
--- old/usr/src/uts/sparc/v9/vm/seg_nf.c	2015-05-08 18:04:18.337372077 -0400
+++ new/usr/src/uts/sparc/v9/vm/seg_nf.c	2015-05-08 18:04:18.344562613 -0400
@@ -66,7 +66,6 @@
 		    size_t len, uint_t prot);
 static int	segnf_checkprot(struct seg *seg, caddr_t addr,
 		    size_t len, uint_t prot);
-static void	segnf_badop(void);
 static int	segnf_nop(void);
 static int	segnf_getprot(struct seg *seg, caddr_t addr,
 		    size_t len, uint_t *protv);
@@ -92,7 +91,6 @@
 	.faulta		= (faultcode_t (*)(struct seg *, caddr_t)) segnf_nomap,
 	.setprot	= segnf_setprot,
 	.checkprot	= segnf_checkprot,
-	.kluster	= (int (*)())segnf_badop,
 	.sync		= (int (*)(struct seg *, caddr_t, size_t, int, uint_t))
 		segnf_nop,
 	.incore		= (size_t (*)(struct seg *, caddr_t, size_t, char *))
@@ -401,13 +399,6 @@
 	return ((prot & sprot) == prot ? 0 : EACCES);
 }
 
-static void
-segnf_badop(void)
-{
-	panic("segnf_badop");
-	/*NOTREACHED*/
-}
-
 static int
 segnf_nop(void)
 {
