92 static lgrp_mem_policy_info_t *segmap_getpolicy(struct seg *seg,
93 caddr_t addr);
94 static int segmap_capable(struct seg *seg, segcapability_t capability);
95
96 /* segkpm support */
97 static caddr_t segmap_pagecreate_kpm(struct seg *, vnode_t *, u_offset_t,
98 struct smap *, enum seg_rw);
99 struct smap *get_smap_kpm(caddr_t, page_t **);
100
101 #define SEGMAP_BADOP(t) (t(*)())segmap_badop
102
103 static struct seg_ops segmap_ops = {
104 SEGMAP_BADOP(int), /* dup */
105 SEGMAP_BADOP(int), /* unmap */
106 segmap_free,
107 segmap_fault,
108 segmap_faulta,
109 SEGMAP_BADOP(int), /* setprot */
110 segmap_checkprot,
111 segmap_kluster,
112 SEGMAP_BADOP(size_t), /* swapout */
113 SEGMAP_BADOP(int), /* sync */
114 SEGMAP_BADOP(size_t), /* incore */
115 SEGMAP_BADOP(int), /* lockop */
116 segmap_getprot,
117 segmap_getoffset,
118 segmap_gettype,
119 segmap_getvp,
120 SEGMAP_BADOP(int), /* advise */
121 segmap_dump,
122 segmap_pagelock, /* pagelock */
123 SEGMAP_BADOP(int), /* setpgsz */
124 segmap_getmemid, /* getmemid */
125 segmap_getpolicy, /* getpolicy */
126 segmap_capable, /* capable */
127 };
128
129 /*
130 * Private segmap routines.
131 */
132 static void segmap_unlock(struct hat *hat, struct seg *seg, caddr_t addr,
|
92 static lgrp_mem_policy_info_t *segmap_getpolicy(struct seg *seg,
93 caddr_t addr);
94 static int segmap_capable(struct seg *seg, segcapability_t capability);
95
96 /* segkpm support */
97 static caddr_t segmap_pagecreate_kpm(struct seg *, vnode_t *, u_offset_t,
98 struct smap *, enum seg_rw);
99 struct smap *get_smap_kpm(caddr_t, page_t **);
100
101 #define SEGMAP_BADOP(t) (t(*)())segmap_badop
102
103 static struct seg_ops segmap_ops = {
104 SEGMAP_BADOP(int), /* dup */
105 SEGMAP_BADOP(int), /* unmap */
106 segmap_free,
107 segmap_fault,
108 segmap_faulta,
109 SEGMAP_BADOP(int), /* setprot */
110 segmap_checkprot,
111 segmap_kluster,
112 SEGMAP_BADOP(int), /* sync */
113 SEGMAP_BADOP(size_t), /* incore */
114 SEGMAP_BADOP(int), /* lockop */
115 segmap_getprot,
116 segmap_getoffset,
117 segmap_gettype,
118 segmap_getvp,
119 SEGMAP_BADOP(int), /* advise */
120 segmap_dump,
121 segmap_pagelock, /* pagelock */
122 SEGMAP_BADOP(int), /* setpgsz */
123 segmap_getmemid, /* getmemid */
124 segmap_getpolicy, /* getpolicy */
125 segmap_capable, /* capable */
126 };
127
128 /*
129 * Private segmap routines.
130 */
131 static void segmap_unlock(struct hat *hat, struct seg *seg, caddr_t addr,
|