Home
last modified time | relevance | path

Searched refs:seg (Results 1 – 25 of 270) sorted by relevance

1234567891011

/illumos-gate/usr/src/uts/common/vm/
H A Dseg_hole.c31 static int seghole_dup(struct seg *, struct seg *);
32 static int seghole_unmap(struct seg *, caddr_t, size_t);
33 static void seghole_free(struct seg *);
34 static faultcode_t seghole_fault(struct hat *, struct seg *, caddr_t, size_t,
36 static faultcode_t seghole_faulta(struct seg *, caddr_t);
37 static int seghole_setprot(struct seg *, caddr_t, size_t, uint_t);
38 static int seghole_checkprot(struct seg *, caddr_t, size_t, uint_t);
39 static int seghole_sync(struct seg *, caddr_t, size_t, int, uint_t);
40 static size_t seghole_incore(struct seg *, caddr_t, size_t, char *);
41 static int seghole_lockop(struct seg *, caddr_t, size_t, int, int, ulong_t *,
[all …]
H A Dseg_umap.c46 static int segumap_dup(struct seg *, struct seg *);
47 static int segumap_unmap(struct seg *, caddr_t, size_t);
48 static void segumap_free(struct seg *);
49 static faultcode_t segumap_fault(struct hat *, struct seg *, caddr_t, size_t,
51 static faultcode_t segumap_faulta(struct seg *, caddr_t);
52 static int segumap_setprot(struct seg *, caddr_t, size_t, uint_t);
53 static int segumap_checkprot(struct seg *, caddr_t, size_t, uint_t);
54 static int segumap_sync(struct seg *, caddr_t, size_t, int, uint_t);
55 static size_t segumap_incore(struct seg *, caddr_t, size_t, char *);
56 static int segumap_lockop(struct seg *, caddr_t, size_t, int, int, ulong_t *,
[all …]
H A Dvm_as.c356 struct seg *
359 struct seg *seg = as->a_seglast; in as_findseg() local
364 if (seg != NULL && in as_findseg()
365 seg->s_base <= addr && in as_findseg()
366 addr < seg->s_base + seg->s_size) in as_findseg()
367 return (seg); in as_findseg()
369 seg = avl_find(&as->a_segtree, &addr, &where); in as_findseg()
370 if (seg != NULL) in as_findseg()
371 return (as->a_seglast = seg); in as_findseg()
373 seg = avl_nearest(&as->a_segtree, where, AVL_AFTER); in as_findseg()
[all …]
H A Dseg_spt.c67 static int segspt_create(struct seg **segpp, void *argsp);
68 static int segspt_unmap(struct seg *seg, caddr_t raddr, size_t ssize);
69 static void segspt_free(struct seg *seg);
70 static void segspt_free_pages(struct seg *seg, caddr_t addr, size_t len);
71 static lgrp_mem_policy_info_t *segspt_getpolicy(struct seg *seg, caddr_t addr);
75 segspt_badop_dup(struct seg *seg __unused, struct seg *newseg __unused) in segspt_badop_dup()
82 segspt_badop_fault(struct hat *hat, struct seg *seg, caddr_t addr, in segspt_badop_fault() argument
90 segspt_badop_faulta(struct seg *seg __unused, caddr_t addr __unused) in segspt_badop_faulta()
97 segspt_badop_prot(struct seg *seg, caddr_t addr, size_t len, uint_t prot) in segspt_badop_prot() argument
104 segspt_badop_checkprot(struct seg *seg, caddr_t addr, size_t size, uint_t prot) in segspt_badop_checkprot() argument
[all …]
H A Dseg.h102 typedef struct seg { struct
119 int (*dup)(struct seg *, struct seg *);
120 int (*unmap)(struct seg *, caddr_t, size_t);
121 void (*free)(struct seg *);
122 faultcode_t (*fault)(struct hat *, struct seg *, caddr_t, size_t,
124 faultcode_t (*faulta)(struct seg *, caddr_t);
125 int (*setprot)(struct seg *, caddr_t, size_t, uint_t);
126 int (*checkprot)(struct seg *, caddr_t, size_t, uint_t);
127 int (*kluster)(struct seg *, caddr_t, ssize_t);
128 size_t (*swapout)(struct seg *);
[all …]
H A Dseg_vn.c102 static int segvn_dup(struct seg *seg, struct seg *newseg);
103 static int segvn_unmap(struct seg *seg, caddr_t addr, size_t len);
104 static void segvn_free(struct seg *seg);
105 static faultcode_t segvn_fault(struct hat *hat, struct seg *seg,
108 static faultcode_t segvn_faulta(struct seg *seg, caddr_t addr);
109 static int segvn_setprot(struct seg *seg, caddr_t addr,
111 static int segvn_checkprot(struct seg *seg, caddr_t addr,
113 static int segvn_kluster(struct seg *seg, caddr_t addr, ssize_t delta);
114 static size_t segvn_swapout(struct seg *seg);
115 static int segvn_sync(struct seg *seg, caddr_t addr, size_t len,
[all …]
H A Dseg_kp.c79 static void segkp_dump(struct seg *seg);
80 static int segkp_checkprot(struct seg *seg, caddr_t addr, size_t len,
82 static int segkp_kluster(struct seg *seg, caddr_t addr, ssize_t delta);
83 static int segkp_pagelock(struct seg *seg, caddr_t addr, size_t len,
86 static void segkp_insert(struct seg *seg, struct segkp_data *kpd);
87 static void segkp_delete(struct seg *seg, struct segkp_data *kpd);
88 static caddr_t segkp_get_internal(struct seg *seg, size_t len, uint_t flags,
90 static void segkp_release_internal(struct seg *seg,
92 static int segkp_unlock(struct hat *hat, struct seg *seg, caddr_t vaddr,
94 static int segkp_load(struct hat *hat, struct seg *seg, caddr_t vaddr,
[all …]
H A Dseg_kpm.c103 faultcode_t segkpm_fault(struct hat *hat, struct seg *seg, caddr_t addr,
105 static void segkpm_dump(struct seg *);
108 static int segkpm_capable(struct seg *, segcapability_t);
153 segkpm_create(struct seg *seg, void *argsp) in segkpm_create() argument
160 ASSERT(seg->s_as && RW_WRITE_HELD(&seg->s_as->a_lock)); in segkpm_create()
161 ASSERT(btokpmp(seg->s_size) >= 1 && in segkpm_create()
162 kpmpageoff((uintptr_t)seg->s_base) == 0 && in segkpm_create()
163 kpmpageoff((uintptr_t)seg->s_base + seg->s_size) == 0); in segkpm_create()
167 seg->s_data = (void *)skd; in segkpm_create()
168 seg->s_ops = &segkpm_ops; in segkpm_create()
[all …]
H A Dseg_map.c74 static void segmap_free(struct seg *seg);
75 faultcode_t segmap_fault(struct hat *hat, struct seg *seg, caddr_t addr,
77 static faultcode_t segmap_faulta(struct seg *seg, caddr_t addr);
78 static int segmap_checkprot(struct seg *seg, caddr_t addr, size_t len,
80 static int segmap_kluster(struct seg *seg, caddr_t addr, ssize_t);
81 static int segmap_getprot(struct seg *seg, caddr_t addr, size_t len,
83 static u_offset_t segmap_getoffset(struct seg *seg, caddr_t addr);
84 static int segmap_gettype(struct seg *seg, caddr_t addr);
85 static int segmap_getvp(struct seg *seg, caddr_t addr, struct vnode **vpp);
86 static void segmap_dump(struct seg *seg);
[all …]
/illumos-gate/usr/src/uts/sparc/v9/vm/
H A Dseg_nf.c61 static int segnf_dup(struct seg *seg, struct seg *newseg);
62 static int segnf_unmap(struct seg *seg, caddr_t addr, size_t len);
63 static void segnf_free(struct seg *seg);
65 static int segnf_setprot(struct seg *seg, caddr_t addr,
67 static int segnf_checkprot(struct seg *seg, caddr_t addr,
71 static int segnf_getprot(struct seg *seg, caddr_t addr,
73 static u_offset_t segnf_getoffset(struct seg *seg, caddr_t addr);
74 static int segnf_gettype(struct seg *seg, caddr_t addr);
75 static int segnf_getvp(struct seg *seg, caddr_t addr, struct vnode **vpp);
76 static void segnf_dump(struct seg *seg);
[all …]
/illumos-gate/usr/src/uts/common/io/fibre-channel/fca/emlxs/
H A Demlxs_mem.c36 static uint32_t emlxs_mem_pool_alloc(emlxs_hba_t *hba, MEMSEG *seg,
38 static void emlxs_mem_pool_free(emlxs_hba_t *hba, MEMSEG *seg, uint32_t count);
47 MEMSEG *seg; in emlxs_mem_alloc_buffer() local
75 seg = &hba->memseg[i]; in emlxs_mem_alloc_buffer()
79 (void) strlcpy(seg->fc_label, "Node Pool", in emlxs_mem_alloc_buffer()
80 sizeof (seg->fc_label)); in emlxs_mem_alloc_buffer()
81 seg->fc_memtag = MEM_NLP; in emlxs_mem_alloc_buffer()
82 seg->fc_memsize = sizeof (NODELIST); in emlxs_mem_alloc_buffer()
83 seg->fc_hi_water = hba->max_nodes + 2; in emlxs_mem_alloc_buffer()
84 seg->fc_lo_water = 2; in emlxs_mem_alloc_buffer()
[all …]
/illumos-gate/usr/src/uts/intel/io/vmm/
H A Dseg_vmm.c57 static int segvmm_dup(struct seg *, struct seg *);
58 static int segvmm_unmap(struct seg *, caddr_t, size_t);
59 static void segvmm_free(struct seg *);
60 static faultcode_t segvmm_fault(struct hat *, struct seg *, caddr_t, size_t,
62 static faultcode_t segvmm_faulta(struct seg *, caddr_t);
63 static int segvmm_setprot(struct seg *, caddr_t, size_t, uint_t);
64 static int segvmm_checkprot(struct seg *, caddr_t, size_t, uint_t);
65 static int segvmm_sync(struct seg *, caddr_t, size_t, int, uint_t);
66 static size_t segvmm_incore(struct seg *, caddr_t, size_t, char *);
67 static int segvmm_lockop(struct seg *, caddr_t, size_t, int, int, ulong_t *,
[all …]
/illumos-gate/usr/src/cmd/ipf/lib/
H A Dports.c17 int ports(seg, proto, pp, cp, tp, linenum) in ports() argument
18 char ***seg; in ports()
27 if (!*seg || !**seg || !***seg)
29 if (!strcasecmp(**seg, "port") && *(*seg + 1) && *(*seg + 2)) {
30 (*seg)++;
31 if (ISALNUM(***seg) && *(*seg + 2)) {
32 if (portnum(**seg, proto, pp, linenum) == 0)
34 (*seg)++;
35 if (!strcmp(**seg, "<>"))
37 else if (!strcmp(**seg, "><"))
[all …]
/illumos-gate/usr/src/uts/common/io/
H A Dvuid_store.c62 register Vuid_seg *seg; local
70 if ((seg = vuid_find_seg(state, vuid_id_addr(event->id))) ==
73 seg = (Vuid_seg *) vuid_alloc(sizeof (*seg));
74 bzero((caddr_t)seg, sizeof (*seg));
75 seg->addr = vuid_id_addr(event->id);
77 *state_ptr = seg;
78 seg->next = state;
80 int_bit = vuid_get_int_bit(seg, offset);
83 (void) vuid_add_value(seg, offset);
89 vuid_set_boolean_bit(seg, offset);
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/vmalloc/
H A Dvmlast.c45 Seg_t *seg, *last; local
53 for(last = NIL(Seg_t*), seg = vd->seg; seg; last = seg, seg = seg->next)
54 { if(!(tp = seg->free) || (SIZE(tp)+sizeof(Head_t)) < size)
57 { last->next = seg->next;
58 seg->next = vd->seg;
59 vd->seg = seg;
66 { seg = SEG(tp);
75 SEG(next) = seg;
76 seg->free = next;
78 else seg->free = NIL(Block_t*);
[all …]
H A Dvmprivate.c49 reg Seg_t* seg; local
70 if(!(seg = vd->seg) ) /* there is no current segment */
73 { addr = (Vmuchar_t*)(*vm->disc->memoryf)(vm,seg->addr,seg->extent,
74 seg->extent+size,vm->disc);
75 if(addr == (Vmuchar_t*)seg->addr)
76 addr += seg->extent; /* seg successfully extended */
77 else seg = NIL(Seg_t*); /* a new segment was created */
92 if(seg)
94 bp = BLOCK(seg->baddr);
98 /**/ ASSERT(SEG(bp) == seg);
[all …]
H A Dvmwalk.c44 reg Seg_t *seg; local
51 for(seg = vm->data->seg; seg; seg = seg->next)
52 if((rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle)) < 0 )
60 for(seg = vm->data->seg; seg; seg = seg->next)
61 if((rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle)) < 0 )
H A Dvmpool.c52 reg Seg_t *seg; local
74 for(tp = NIL(Block_t*), seg = vd->seg; seg; seg = seg->next)
75 { if((tp = seg->free) &&
82 seg = SEG(tp);
96 seg->free = NIL(Block_t*);
100 SEG(next) = seg;
101 seg->free = next;
125 Seg_t *seg; local
132 for(seg = vd->seg; seg; seg = seg->next)
133 { laddr = (Vmuchar_t*)SEGBLOCK(seg);
[all …]
/illumos-gate/usr/src/uts/i86xpv/vm/
H A Dseg_mf.c105 static int segmf_fault_gref_range(struct seg *seg, caddr_t addr, size_t len);
108 segmf_data_zalloc(struct seg *seg) in segmf_data_zalloc() argument
113 seg->s_ops = &segmf_ops; in segmf_data_zalloc()
114 seg->s_data = data; in segmf_data_zalloc()
119 segmf_create(struct seg **segpp, void *args) in segmf_create()
121 struct seg *seg = *segpp; in segmf_create() local
124 struct as *as = seg->s_as; in segmf_create()
125 pgcnt_t i, npages = seg_pages(seg); in segmf_create()
128 hat_map(as->a_hat, seg->s_base, seg->s_size, HAT_MAP); in segmf_create()
130 data = segmf_data_zalloc(seg); in segmf_create()
[all …]
/illumos-gate/usr/src/lib/librsm/common/
H A Drsmloopback.c64 rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; in loopback_get8() local
66 (uint8_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; in loopback_get8()
75 if (seg->rsmseg_barmode == RSM_BARRIER_MODE_IMPLICIT) { in loopback_get8()
76 e = seg->rsmseg_ops->rsm_memseg_import_open_barrier( in loopback_get8()
77 (rsm_barrier_handle_t)seg->rsmseg_barrier); in loopback_get8()
87 if (seg->rsmseg_barmode == RSM_BARRIER_MODE_IMPLICIT) { in loopback_get8()
88 e = seg->rsmseg_ops->rsm_memseg_import_close_barrier( in loopback_get8()
89 (rsm_barrier_handle_t)seg->rsmseg_barrier); in loopback_get8()
107 rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; in loopback_get16() local
110 (uint16_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; in loopback_get16()
[all …]
H A Drsmgen.c107 rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; in __rsm_get8x8() local
109 (uint8_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; in __rsm_get8x8()
118 if (seg->rsmseg_barmode == RSM_BARRIER_MODE_IMPLICIT) { in __rsm_get8x8()
119 e = seg->rsmseg_ops->rsm_memseg_import_open_barrier( in __rsm_get8x8()
120 (rsm_barrier_handle_t)seg->rsmseg_barrier); in __rsm_get8x8()
130 if (seg->rsmseg_barmode == RSM_BARRIER_MODE_IMPLICIT) { in __rsm_get8x8()
131 e = seg->rsmseg_ops->rsm_memseg_import_close_barrier( in __rsm_get8x8()
132 (rsm_barrier_handle_t)seg->rsmseg_barrier); in __rsm_get8x8()
150 rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; in __rsm_get16x16() local
153 (uint16_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; in __rsm_get16x16()
[all …]
H A Drsmlib.c903 rsmseg_handle_t *seg; in rsm_memseg_export_destroy() local
914 seg = (rsmseg_handle_t *)memseg; in rsm_memseg_export_destroy()
916 mutex_lock(&seg->rsmseg_lock); in rsm_memseg_export_destroy()
917 if (seg->rsmseg_pollfd_refcnt) { in rsm_memseg_export_destroy()
918 mutex_unlock(&seg->rsmseg_lock); in rsm_memseg_export_destroy()
924 seg->rsmseg_state = EXPORT_BIND; in rsm_memseg_export_destroy()
926 mutex_unlock(&seg->rsmseg_lock); in rsm_memseg_export_destroy()
928 (void) close(seg->rsmseg_fd); in rsm_memseg_export_destroy()
929 mutex_destroy(&seg->rsmseg_lock); in rsm_memseg_export_destroy()
930 free((void *)seg); in rsm_memseg_export_destroy()
[all …]
/illumos-gate/usr/src/uts/common/io/rsm/
H A Drsm.c454 static int rsm_closeconnection(rsmseg_t *seg, void **cookie);
455 static int rsm_unpublish(rsmseg_t *seg, int mode);
456 static int rsm_unbind(rsmseg_t *seg);
464 int rsm_disconnect(rsmseg_t *seg);
1744 rsmsharecv_signal(rsmseg_t *seg, int oldstate, int newstate) in rsmsharecv_signal() argument
1746 ASSERT(rsmsharelock_held(seg)); in rsmsharecv_signal()
1748 if (seg->s_share->rsmsi_state == oldstate) { in rsmsharecv_signal()
1749 seg->s_share->rsmsi_state = newstate; in rsmsharecv_signal()
1750 cv_broadcast(&seg->s_share->rsmsi_cv); in rsmsharecv_signal()
1833 rsmseg_free(rsmseg_t *seg) in rsmseg_free() argument
[all …]
/illumos-gate/usr/src/uts/common/os/
H A Durw.c61 page_valid(struct seg *seg, caddr_t addr) in page_valid() argument
72 if (seg->s_ops == &segvn_ops && in page_valid()
73 SEGOP_GETVP(seg, addr, &vp) == 0 && in page_valid()
77 u_offset_t offset = SEGOP_GETOFFSET(seg, addr); in page_valid()
87 if (seg->s_ops == &segspt_shmops && in page_valid()
88 addr >= seg->s_base + spt_realsize(seg)) in page_valid()
96 if (seg->s_ops == &segdev_ops && in page_valid()
97 ((SEGOP_GETTYPE(seg, addr) & (MAP_SHARED | MAP_PRIVATE)) == 0)) in page_valid()
106 if (seg->s_ops == &segvn_ops && in page_valid()
107 (svd = (struct segvn_data *)seg->s_data) != NULL && in page_valid()
[all …]
/illumos-gate/usr/src/test/zfs-tests/cmd/getholes/
H A Dgetholes.c74 seg_t *seg; in print_list() local
82 while ((seg = list_remove_head(seg_list)) != NULL) { in print_list()
85 seg->seg_type == SEEK_HOLE ? 'h' : 'd', in print_list()
86 seg->seg_offset, seg->seg_len); in print_list()
88 if (seg->seg_type == SEEK_HOLE) { in print_list()
89 hole_blks_seen += seg->seg_len / bs; in print_list()
91 data_blks_seen += seg->seg_len / bs; in print_list()
93 umem_free(seg, sizeof (seg_t)); in print_list()
123 seg_t *seg = NULL; in main() local
164 seg = umem_alloc(sizeof (seg_t), UMEM_DEFAULT); in main()
[all …]

1234567891011