/titanic_44/usr/src/uts/sparc/v9/vm/ |
H A D | seg_nf.c | 61 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 …]
|
/titanic_44/usr/src/uts/common/vm/ |
H A D | seg_umap.c | 46 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 D | vm_as.c | 357 struct seg * 360 struct seg *seg = as->a_seglast; in as_findseg() local 365 if (seg != NULL && in as_findseg() 366 seg->s_base <= addr && in as_findseg() 367 addr < seg->s_base + seg->s_size) in as_findseg() 368 return (seg); in as_findseg() 370 seg = avl_find(&as->a_segtree, &addr, &where); in as_findseg() 371 if (seg != NULL) in as_findseg() 372 return (as->a_seglast = seg); in as_findseg() 374 seg = avl_nearest(&as->a_segtree, where, AVL_AFTER); in as_findseg() [all …]
|
H A D | seg_spt.c | 74 static int segspt_create(struct seg *seg, caddr_t argsp); 75 static int segspt_unmap(struct seg *seg, caddr_t raddr, size_t ssize); 76 static void segspt_free(struct seg *seg); 77 static void segspt_free_pages(struct seg *seg, caddr_t addr, size_t len); 78 static lgrp_mem_policy_info_t *segspt_getpolicy(struct seg *seg, caddr_t addr); 116 static int segspt_shmdup(struct seg *seg, struct seg *newseg); 117 static int segspt_shmunmap(struct seg *seg, caddr_t raddr, size_t ssize); 118 static void segspt_shmfree(struct seg *seg); 119 static faultcode_t segspt_shmfault(struct hat *hat, struct seg *seg, 121 static faultcode_t segspt_shmfaulta(struct seg *seg, caddr_t addr); [all …]
|
H A D | seg.h | 102 typedef struct seg { struct 118 int (*dup)(struct seg *, struct seg *); 119 int (*unmap)(struct seg *, caddr_t, size_t); 120 void (*free)(struct seg *); 121 faultcode_t (*fault)(struct hat *, struct seg *, caddr_t, size_t, 123 faultcode_t (*faulta)(struct seg *, caddr_t); 124 int (*setprot)(struct seg *, caddr_t, size_t, uint_t); 125 int (*checkprot)(struct seg *, caddr_t, size_t, uint_t); 126 int (*kluster)(struct seg *, caddr_t, ssize_t); 127 size_t (*swapout)(struct seg *); [all …]
|
H A D | seg_vn.c | 102 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 D | seg_kp.c | 79 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 D | seg_kpm.c | 103 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 D | seg_map.c | 74 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 …]
|
H A D | seg_kp.h | 61 #define SEGKP_VMEM(seg) (((struct segkp_segdata *)(seg)->s_data)->kpsd_arena) argument 108 struct seg *kpf_seg; /* segment */ 130 extern struct seg *segkp; 137 int segkp_create(struct seg *seg); 138 caddr_t segkp_get(struct seg *seg, size_t len, uint_t flags); 139 void segkp_release(struct seg *seg, caddr_t vaddr); 140 void * segkp_cache_init(struct seg *seg, int maxsize, size_t len, 150 caddr_t segkp_get_withanonmap(struct seg *, size_t, uint_t, struct anon_map *); 156 faultcode_t segkp_fault(struct hat *hat, struct seg *seg, caddr_t addr,
|
H A D | seg_kmem.c | 106 struct seg kvseg; /* primary kernel heap segment */ 107 struct seg kvseg_core; /* "core" kernel heap segment */ 108 struct seg kzioseg; /* Segment for zio mappings */ 115 struct seg kvseg32; /* 32-bit kernel heap segment */ 442 segkmem_fault(struct hat *hat, struct seg *seg, caddr_t addr, size_t size, in segkmem_fault() argument 448 struct vnode *vp = seg->s_data; in segkmem_fault() 450 ASSERT(RW_READ_HELD(&seg->s_as->a_lock)); in segkmem_fault() 452 if (seg->s_as != &kas || size > seg->s_size || in segkmem_fault() 453 addr < seg->s_base || addr + size > seg->s_base + seg->s_size) in segkmem_fault() 459 if (segkp_bitmap && seg == &kvseg && in segkmem_fault() [all …]
|
/titanic_44/usr/src/uts/common/io/fibre-channel/fca/emlxs/ |
H A D | emlxs_mem.c | 34 static uint32_t emlxs_mem_pool_alloc(emlxs_hba_t *hba, MEMSEG *seg, 36 static void emlxs_mem_pool_free(emlxs_hba_t *hba, MEMSEG *seg, uint32_t count); 45 MEMSEG *seg; in emlxs_mem_alloc_buffer() local 73 seg = &hba->memseg[i]; in emlxs_mem_alloc_buffer() 77 (void) strlcpy(seg->fc_label, "Node Pool", in emlxs_mem_alloc_buffer() 78 sizeof (seg->fc_label)); in emlxs_mem_alloc_buffer() 79 seg->fc_memtag = MEM_NLP; in emlxs_mem_alloc_buffer() 80 seg->fc_memsize = sizeof (NODELIST); in emlxs_mem_alloc_buffer() 81 seg->fc_hi_water = hba->max_nodes + 2; in emlxs_mem_alloc_buffer() 82 seg->fc_lo_water = 2; in emlxs_mem_alloc_buffer() [all …]
|
/titanic_44/usr/src/cmd/ipf/lib/common/ |
H A D | ports.c | 17 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 …]
|
/titanic_44/usr/src/uts/common/io/ |
H A D | vuid_store.c | 64 register Vuid_seg *seg; local 72 if ((seg = vuid_find_seg(state, vuid_id_addr(event->id))) == 75 seg = (Vuid_seg *) vuid_alloc(sizeof (*seg)); 76 bzero((caddr_t)seg, sizeof (*seg)); 77 seg->addr = vuid_id_addr(event->id); 79 *state_ptr = seg; 80 seg->next = state; 82 int_bit = vuid_get_int_bit(seg, offset); 85 (void) vuid_add_value(seg, offset); 91 vuid_set_boolean_bit(seg, offset); [all …]
|
/titanic_44/usr/src/lib/libast/common/vmalloc/ |
H A D | vmprivate.c | 48 reg Seg_t* seg; local 77 if(!(seg = vd->seg) ) 80 { if(!vd->wild || SEG(vd->wild) != seg) 87 addr = (Vmuchar_t*)(*memoryf)(vm,seg->addr,seg->extent, 88 seg->extent+size-s,vm->disc); 90 seg = NIL(Seg_t*); 92 { /**/ASSERT(addr == (Vmuchar_t*)seg->addr); 93 addr += seg->extent; 119 if(seg) 121 bp = BLOCK(seg->baddr); [all …]
|
H A D | vmlast.c | 44 reg Seg_t *seg, *last; local 63 { for(last = NIL(Seg_t*), seg = vd->seg; seg; last = seg, seg = seg->next) 64 { if(!(tp = seg->free) || (SIZE(tp)+sizeof(Head_t)) < size) 67 { last->next = seg->next; 68 seg->next = vd->seg; 69 vd->seg = seg; 76 { seg = SEG(tp); 88 SEG(next) = seg; 89 seg->free = next; 91 else seg->free = NIL(Block_t*); [all …]
|
H A D | vmwalk.c | 44 reg Seg_t* seg; local 53 for(seg = vm->data->seg; seg; seg = seg->next) 54 { rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle); 66 for(seg = vm->data->seg; seg; seg = seg->next) 67 { rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle);
|
/titanic_44/usr/src/uts/i86xpv/vm/ |
H A D | seg_mf.c | 104 static int segmf_fault_gref_range(struct seg *seg, caddr_t addr, size_t len); 107 segmf_data_zalloc(struct seg *seg) in segmf_data_zalloc() argument 112 seg->s_ops = &segmf_ops; in segmf_data_zalloc() 113 seg->s_data = data; in segmf_data_zalloc() 118 segmf_create(struct seg *seg, void *args) in segmf_create() argument 122 struct as *as = seg->s_as; in segmf_create() 123 pgcnt_t i, npages = seg_pages(seg); in segmf_create() 126 hat_map(as->a_hat, seg->s_base, seg->s_size, HAT_MAP); in segmf_create() 128 data = segmf_data_zalloc(seg); in segmf_create() 138 error = VOP_ADDMAP(VTOCVP(data->vp), 0, as, seg->s_base, seg->s_size, in segmf_create() [all …]
|
/titanic_44/usr/src/lib/librsm/common/ |
H A D | rsmloopback.c | 66 rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; in loopback_get8() local 68 (uint8_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; in loopback_get8() 77 if (seg->rsmseg_barmode == RSM_BARRIER_MODE_IMPLICIT) { in loopback_get8() 78 e = seg->rsmseg_ops->rsm_memseg_import_open_barrier( in loopback_get8() 79 (rsm_barrier_handle_t)seg->rsmseg_barrier); in loopback_get8() 89 if (seg->rsmseg_barmode == RSM_BARRIER_MODE_IMPLICIT) { in loopback_get8() 90 e = seg->rsmseg_ops->rsm_memseg_import_close_barrier( in loopback_get8() 91 (rsm_barrier_handle_t)seg->rsmseg_barrier); in loopback_get8() 109 rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; in loopback_get16() local 112 (uint16_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; in loopback_get16() [all …]
|
H A D | rsmgen.c | 109 rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; in __rsm_get8x8() local 111 (uint8_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; in __rsm_get8x8() 120 if (seg->rsmseg_barmode == RSM_BARRIER_MODE_IMPLICIT) { in __rsm_get8x8() 121 e = seg->rsmseg_ops->rsm_memseg_import_open_barrier( in __rsm_get8x8() 122 (rsm_barrier_handle_t)seg->rsmseg_barrier); in __rsm_get8x8() 132 if (seg->rsmseg_barmode == RSM_BARRIER_MODE_IMPLICIT) { in __rsm_get8x8() 133 e = seg->rsmseg_ops->rsm_memseg_import_close_barrier( in __rsm_get8x8() 134 (rsm_barrier_handle_t)seg->rsmseg_barrier); in __rsm_get8x8() 152 rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; in __rsm_get16x16() local 155 (uint16_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; in __rsm_get16x16() [all …]
|
H A D | rsmlib.c | 905 rsmseg_handle_t *seg; in rsm_memseg_export_destroy() local 916 seg = (rsmseg_handle_t *)memseg; in rsm_memseg_export_destroy() 918 mutex_lock(&seg->rsmseg_lock); in rsm_memseg_export_destroy() 919 if (seg->rsmseg_pollfd_refcnt) { in rsm_memseg_export_destroy() 920 mutex_unlock(&seg->rsmseg_lock); in rsm_memseg_export_destroy() 926 seg->rsmseg_state = EXPORT_BIND; in rsm_memseg_export_destroy() 928 mutex_unlock(&seg->rsmseg_lock); in rsm_memseg_export_destroy() 930 (void) close(seg->rsmseg_fd); in rsm_memseg_export_destroy() 931 mutex_destroy(&seg->rsmseg_lock); in rsm_memseg_export_destroy() 932 free((void *)seg); in rsm_memseg_export_destroy() [all …]
|
/titanic_44/usr/src/uts/common/io/rsm/ |
H A D | rsm.c | 452 static int rsm_closeconnection(rsmseg_t *seg, void **cookie); 453 static int rsm_unpublish(rsmseg_t *seg, int mode); 454 static int rsm_unbind(rsmseg_t *seg); 462 int rsm_disconnect(rsmseg_t *seg); 1742 rsmsharecv_signal(rsmseg_t *seg, int oldstate, int newstate) in rsmsharecv_signal() argument 1744 ASSERT(rsmsharelock_held(seg)); in rsmsharecv_signal() 1746 if (seg->s_share->rsmsi_state == oldstate) { in rsmsharecv_signal() 1747 seg->s_share->rsmsi_state = newstate; in rsmsharecv_signal() 1748 cv_broadcast(&seg->s_share->rsmsi_cv); in rsmsharecv_signal() 1831 rsmseg_free(rsmseg_t *seg) in rsmseg_free() argument [all …]
|
/titanic_44/usr/src/uts/common/os/ |
H A D | urw.c | 61 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 …]
|
/titanic_44/usr/src/test/zfs-tests/cmd/getholes/ |
H A D | getholes.c | 74 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 …]
|
/titanic_44/usr/src/uts/common/sys/ |
H A D | vuid_store.h | 95 #define vuid_set_boolean_bit(seg, offset) \ argument 96 (seg)->booleans[(offset)/BITSPERBYTE] |= \ 98 #define vuid_clear_boolean_bit(seg, offset) \ argument 99 (seg)->booleans[(offset)/BITSPERBYTE] &= \ 101 #define vuid_get_boolean_bit(seg, offset) \ argument 102 ((seg)->booleans[(offset)/BITSPERBYTE] & \ 105 #define vuid_set_int_bit(seg, offset) \ argument 106 (seg)->ints[(offset)/BITSPERBYTE] |= \ 108 #define vuid_clear_int_bit(seg, offset) \ argument 109 (seg)->ints[(offset)/BITSPERBYTE] &= \ [all …]
|