--- old/usr/src/uts/common/exec/elf/elf.c	2015-11-24 09:35:13.144332941 -0500
+++ new/usr/src/uts/common/exec/elf/elf.c	2015-11-24 09:35:13.148041182 -0500
@@ -1885,7 +1885,7 @@
 		caddr_t eaddr = seg->s_base + pr_getsegsize(seg, 0);
 		caddr_t saddr, naddr;
 		void *tmp = NULL;
-		extern struct seg_ops segspt_shmops;
+		extern const struct seg_ops segspt_shmops;
 
 		for (saddr = seg->s_base; saddr < eaddr; saddr = naddr) {
 			uint_t prot;
--- old/usr/src/uts/common/fs/proc/prsubr.c	2015-11-24 09:35:13.302791265 -0500
+++ new/usr/src/uts/common/fs/proc/prsubr.c	2015-11-24 09:35:13.306551600 -0500
@@ -97,8 +97,8 @@
 
 size_t pagev_lim = 256 * 1024;	/* limit on number of pages in prpagev_t */
 
-extern struct seg_ops segdev_ops;	/* needs a header file */
-extern struct seg_ops segspt_shmops;	/* needs a header file */
+extern const struct seg_ops segdev_ops;	/* needs a header file */
+extern const struct seg_ops segspt_shmops;	/* needs a header file */
 
 static	int	set_watched_page(proc_t *, caddr_t, caddr_t, ulong_t, ulong_t);
 static	void	clear_watched_page(proc_t *, caddr_t, caddr_t, ulong_t);
--- old/usr/src/uts/common/os/sunddi.c	2015-11-24 09:35:13.507963012 -0500
+++ new/usr/src/uts/common/os/sunddi.c	2015-11-24 09:35:13.511894664 -0500
@@ -8368,8 +8368,8 @@
 	 * locked) to be allowed for LONGTERM.
 	 */
 	if (flags & DDI_UMEMLOCK_LONGTERM) {
-		extern  struct seg_ops segspt_shmops;
-		extern	struct seg_ops segdev_ops;
+		extern const struct seg_ops segspt_shmops;
+		extern const struct seg_ops segdev_ops;
 		AS_LOCK_ENTER(as, &as->a_lock, RW_READER);
 		for (seg = as_segat(as, addr); ; seg = AS_SEGNEXT(as, seg)) {
 			if (seg == NULL || seg->s_base > addr + len)
--- old/usr/src/uts/common/os/urw.c	2015-11-24 09:35:13.816059777 -0500
+++ new/usr/src/uts/common/os/urw.c	2015-11-24 09:35:13.819764917 -0500
@@ -54,8 +54,8 @@
 #include <vm/seg_spt.h>
 #include <vm/seg_kmem.h>
 
-extern struct seg_ops segdev_ops;	/* needs a header file */
-extern struct seg_ops segspt_shmops;	/* needs a header file */
+extern const struct seg_ops segdev_ops;	/* needs a header file */
+extern const struct seg_ops segspt_shmops;	/* needs a header file */
 
 static int
 page_valid(struct seg *seg, caddr_t addr)
--- old/usr/src/uts/common/vm/seg.h	2015-11-24 09:35:13.932671687 -0500
+++ new/usr/src/uts/common/vm/seg.h	2015-11-24 09:35:13.936325514 -0500
@@ -106,7 +106,7 @@
 	uint_t	s_flags;		/* flags for segment, see below */
 	struct	as *s_as;		/* containing address space */
 	avl_node_t s_tree;		/* AVL tree links to segs in this as */
-	struct	seg_ops *s_ops;		/* ops vector: see below */
+	const struct seg_ops *s_ops;	/* ops vector: see below */
 	void *s_data;			/* private data for instance */
 	kmutex_t s_pmtx;		/* protects seg's pcache list */
 	pcache_link_t s_phead;		/* head of seg's pcache list */
--- old/usr/src/uts/common/vm/seg_dev.c	2015-11-24 09:35:14.048889147 -0500
+++ new/usr/src/uts/common/vm/seg_dev.c	2015-11-24 09:35:14.052754541 -0500
@@ -187,7 +187,7 @@
  *	the segment it has been passed. So if you make it
  *	"static" you'll need to fix rootnex_map_fault.
  */
-struct seg_ops segdev_ops = {
+const struct seg_ops segdev_ops = {
 	.dup		= segdev_dup,
 	.unmap		= segdev_unmap,
 	.free		= segdev_free,
--- old/usr/src/uts/common/vm/seg_dev.h	2015-11-24 09:35:14.246072878 -0500
+++ new/usr/src/uts/common/vm/seg_dev.h	2015-11-24 09:35:14.249656665 -0500
@@ -127,7 +127,7 @@
 
 extern int segdev_copyto(struct seg *, caddr_t, const void *, void *, size_t);
 extern int segdev_copyfrom(struct seg *, caddr_t, const void *, void *, size_t);
-extern struct seg_ops segdev_ops;
+extern const struct seg_ops segdev_ops;
 
 #endif	/* _KERNEL */
 
--- old/usr/src/uts/common/vm/seg_kmem.c	2015-11-24 09:35:14.360128445 -0500
+++ new/usr/src/uts/common/vm/seg_kmem.c	2015-11-24 09:35:14.364130415 -0500
@@ -766,7 +766,7 @@
 	return (0);
 }
 
-static struct seg_ops segkmem_ops = {
+static const struct seg_ops segkmem_ops = {
 	.dup		= SEGKMEM_BADOP(int),
 	.unmap		= SEGKMEM_BADOP(int),
 	.free		= SEGKMEM_BADOP(void),
--- old/usr/src/uts/common/vm/seg_kp.c	2015-11-24 09:35:14.504876998 -0500
+++ new/usr/src/uts/common/vm/seg_kp.c	2015-11-24 09:35:14.508590350 -0500
@@ -141,7 +141,7 @@
 pgcnt_t anon_segkp_pages_locked;	/* See vm/anon.h */
 pgcnt_t anon_segkp_pages_resv;		/* anon reserved by seg_kp */
 
-static struct	seg_ops segkp_ops = {
+static const struct seg_ops segkp_ops = {
 	.dup		= SEGKP_BADOP(int),
 	.unmap		= SEGKP_BADOP(int),
 	.free		= SEGKP_BADOP(void),
--- old/usr/src/uts/common/vm/seg_kpm.c	2015-11-24 09:35:14.644777160 -0500
+++ new/usr/src/uts/common/vm/seg_kpm.c	2015-11-24 09:35:14.648421994 -0500
@@ -106,7 +106,7 @@
 
 #define	SEGKPM_BADOP(t)	(t(*)())segkpm_badop
 
-static struct seg_ops segkpm_ops = {
+static const struct seg_ops segkpm_ops = {
 	.dup		= SEGKPM_BADOP(int),
 	.unmap		= SEGKPM_BADOP(int),
 	.free		= SEGKPM_BADOP(void),
--- old/usr/src/uts/common/vm/seg_map.c	2015-11-24 09:35:14.761307699 -0500
+++ new/usr/src/uts/common/vm/seg_map.c	2015-11-24 09:35:14.765071145 -0500
@@ -97,7 +97,7 @@
 
 #define	SEGMAP_BADOP(t)	(t(*)())segmap_badop
 
-static struct seg_ops segmap_ops = {
+static const struct seg_ops segmap_ops = {
 	.dup		= SEGMAP_BADOP(int),
 	.unmap		= SEGMAP_BADOP(int),
 	.free		= segmap_free,
--- old/usr/src/uts/common/vm/seg_spt.c	2015-11-24 09:35:14.925481595 -0500
+++ new/usr/src/uts/common/vm/seg_spt.c	2015-11-24 09:35:14.929269537 -0500
@@ -85,7 +85,7 @@
 
 #define	SEGSPT_BADOP(t)	(t(*)())segspt_badop
 
-struct seg_ops segspt_ops = {
+const struct seg_ops segspt_ops = {
 	.dup		= SEGSPT_BADOP(int),
 	.unmap		= segspt_unmap,
 	.free		= segspt_free,
@@ -141,7 +141,7 @@
 static int segspt_shmgetmemid(struct seg *, caddr_t, memid_t *);
 static lgrp_mem_policy_info_t *segspt_shmgetpolicy(struct seg *, caddr_t);
 
-struct seg_ops segspt_shmops = {
+const struct seg_ops segspt_shmops = {
 	.dup		= segspt_shmdup,
 	.unmap		= segspt_shmunmap,
 	.free		= segspt_shmfree,
--- old/usr/src/uts/common/vm/seg_vn.c	2015-11-24 09:35:15.104598780 -0500
+++ new/usr/src/uts/common/vm/seg_vn.c	2015-11-24 09:35:15.108535230 -0500
@@ -136,7 +136,7 @@
 static lgrp_mem_policy_info_t	*segvn_getpolicy(struct seg *, caddr_t);
 static int	segvn_inherit(struct seg *, caddr_t, size_t, uint_t);
 
-struct	seg_ops segvn_ops = {
+const struct seg_ops segvn_ops = {
 	.dup		= segvn_dup,
 	.unmap		= segvn_unmap,
 	.free		= segvn_free,
--- old/usr/src/uts/common/vm/seg_vn.h	2015-11-24 09:35:15.445386173 -0500
+++ new/usr/src/uts/common/vm/seg_vn.h	2015-11-24 09:35:15.449472406 -0500
@@ -230,7 +230,7 @@
 extern void	segvn_init(void);
 extern int	segvn_create(struct seg *, void *);
 
-extern	struct seg_ops segvn_ops;
+extern const struct seg_ops segvn_ops;
 
 /*
  * Provided as shorthand for creating user zfod segments.
--- old/usr/src/uts/common/vm/vm_as.c	2015-11-24 09:35:15.561650544 -0500
+++ new/usr/src/uts/common/vm/vm_as.c	2015-11-24 09:35:15.565844598 -0500
@@ -474,7 +474,7 @@
 		if (base + seg->s_size > addr) {
 			if (addr >= base || eaddr > base) {
 #ifdef __sparc
-				extern struct seg_ops segnf_ops;
+				extern const struct seg_ops segnf_ops;
 
 				/*
 				 * no-fault segs must disappear if overlaid.
@@ -882,9 +882,6 @@
 	klwp_t *lwp = ttolwp(curthread);
 	int is_xhat = 0;
 	int holding_wpage = 0;
-	extern struct seg_ops   segdev_ops;
-
-
 
 	if (as->a_hat != hat) {
 		/* This must be an XHAT then */
@@ -2088,7 +2085,7 @@
 int
 as_memory(struct as *as, caddr_t *basep, size_t *lenp)
 {
-	extern struct seg_ops segspt_shmops;	/* needs a header file */
+	extern const struct seg_ops segspt_shmops; /* needs a header file */
 	struct seg *seg;
 	caddr_t addr, eaddr;
 	caddr_t segend;
@@ -2192,7 +2189,7 @@
 	 * space reclaimed.
 	 */
 	for (seg = AS_SEGFIRST(as); seg != NULL; seg = AS_SEGNEXT(as, seg)) {
-		struct seg_ops *ov = seg->s_ops;
+		const struct seg_ops *ov = seg->s_ops;
 
 		/*
 		 * We have to check to see if the seg has
@@ -2632,7 +2629,7 @@
 	caddr_t eaddr;
 	faultcode_t fault_err = 0;
 	pgcnt_t pl_off;
-	extern struct seg_ops segspt_shmops;
+	extern const struct seg_ops segspt_shmops;
 
 	ASSERT(AS_LOCK_HELD(as, &as->a_lock));
 	ASSERT(seg != NULL);
--- old/usr/src/uts/common/vm/vm_seg.c	2015-11-24 09:35:15.755002030 -0500
+++ new/usr/src/uts/common/vm/vm_seg.c	2015-11-24 09:35:15.758691056 -0500
@@ -206,8 +206,8 @@
 
 kthread_t *seg_pasync_thr;
 
-extern struct seg_ops segvn_ops;
-extern struct seg_ops segspt_shmops;
+extern const struct seg_ops segvn_ops;
+extern const struct seg_ops segspt_shmops;
 
 #define	IS_PFLAGS_WIRED(flags) ((flags) & SEGP_FORCE_WIRED)
 #define	IS_PCP_WIRED(pcp) IS_PFLAGS_WIRED((pcp)->p_flags)
--- old/usr/src/uts/common/vm/vm_usage.c	2015-11-24 09:35:15.908429471 -0500
+++ new/usr/src/uts/common/vm/vm_usage.c	2015-11-24 09:35:15.912260165 -0500
@@ -297,8 +297,8 @@
 extern struct as kas;
 extern proc_t *practive;
 extern zone_t *global_zone;
-extern struct seg_ops segvn_ops;
-extern struct seg_ops segspt_shmops;
+extern const struct seg_ops segvn_ops;
+extern const struct seg_ops segspt_shmops;
 
 static vmu_data_t vmu_data;
 static kmem_cache_t *vmu_bound_cache;
--- old/usr/src/uts/i86pc/io/rootnex.c	2015-11-24 09:35:16.065184103 -0500
+++ new/usr/src/uts/i86pc/io/rootnex.c	2015-11-24 09:35:16.069031942 -0500
@@ -345,7 +345,7 @@
 /*
  *  extern hacks
  */
-extern struct seg_ops segdev_ops;
+extern const struct seg_ops segdev_ops;
 extern int ignore_hardware_nodes;	/* force flag from ddi_impl.c */
 #ifdef	DDI_MAP_DEBUG
 extern int ddi_map_debug_flag;
--- old/usr/src/uts/i86xpv/vm/seg_mf.c	2015-11-24 09:35:16.290450750 -0500
+++ new/usr/src/uts/i86xpv/vm/seg_mf.c	2015-11-24 09:35:16.294373757 -0500
@@ -99,7 +99,7 @@
 	segmf_map_t	*map;
 };
 
-static struct seg_ops segmf_ops;
+static const struct seg_ops segmf_ops;
 
 static int segmf_fault_gref_range(struct seg *seg, caddr_t addr, size_t len);
 
@@ -731,7 +731,7 @@
 	return (0);
 }
 
-static struct seg_ops segmf_ops = {
+static const struct seg_ops segmf_ops = {
 	.dup		= segmf_dup,
 	.unmap		= segmf_unmap,
 	.free		= segmf_free,
--- old/usr/src/uts/sparc/v9/vm/seg_nf.c	2015-11-24 09:35:16.417475680 -0500
+++ new/usr/src/uts/sparc/v9/vm/seg_nf.c	2015-11-24 09:35:16.421133737 -0500
@@ -77,7 +77,7 @@
 		    struct page ***ppp, enum lock_type type, enum seg_rw rw);
 
 
-struct seg_ops segnf_ops = {
+const struct seg_ops segnf_ops = {
 	.dup		= segnf_dup,
 	.unmap		= segnf_unmap,
 	.free		= segnf_free,
--- old/usr/src/uts/sun4/io/rootnex.c	2015-11-24 09:35:16.539367925 -0500
+++ new/usr/src/uts/sun4/io/rootnex.c	2015-11-24 09:35:16.543401113 -0500
@@ -719,7 +719,7 @@
     struct hat *hat, struct seg *seg, caddr_t addr,
     struct devpage *dp, pfn_t pfn, uint_t prot, uint_t lock)
 {
-	extern struct seg_ops segdev_ops;
+	extern const struct seg_ops segdev_ops;
 
 	DPRINTF(ROOTNEX_MAP_DEBUG, ("rootnex_map_fault: address <%p> "
 	    "pfn <%lx>", (void *)addr, pfn));
