Home
last modified time | relevance | path

Searched refs:mhp (Results 1 – 22 of 22) sorted by relevance

/titanic_50/usr/src/uts/common/os/
H A Dmem_config.c769 struct mem_handle *mhp; in kphysm_allocate_mem_handle() local
771 mhp = kmem_zalloc(sizeof (struct mem_handle), KM_SLEEP); in kphysm_allocate_mem_handle()
772 mutex_init(&mhp->mh_mutex, NULL, MUTEX_DEFAULT, NULL); in kphysm_allocate_mem_handle()
774 mutex_enter(&mhp->mh_mutex); in kphysm_allocate_mem_handle()
776 mhp->mh_exthandle = (memhandle_t)(uintptr_t)(++handle_gen); in kphysm_allocate_mem_handle()
777 mhp->mh_next = mem_handle_head; in kphysm_allocate_mem_handle()
778 mem_handle_head = mhp; in kphysm_allocate_mem_handle()
781 return (mhp); in kphysm_allocate_mem_handle()
785 kphysm_free_mem_handle(struct mem_handle *mhp) in kphysm_free_mem_handle() argument
789 ASSERT(mutex_owned(&mhp->mh_mutex)); in kphysm_free_mem_handle()
[all …]
H A Dmodhash.c478 mod_hash_t *mhp, *mhpp; in mod_hash_destroy_hash() local
492 for (mhp = mh_head; mhp != NULL; mhp = mhp->mh_next) { in mod_hash_destroy_hash()
493 if (mhp == hash) { in mod_hash_destroy_hash()
494 mhpp->mh_next = mhp->mh_next; in mod_hash_destroy_hash()
497 mhpp = mhp; in mod_hash_destroy_hash()
/titanic_50/usr/src/lib/fm/topo/libtopo/common/
H A Dtopo_module.c110 topo_modhash_lock(topo_modhash_t *mhp) in topo_modhash_lock() argument
112 (void) pthread_mutex_lock(&mhp->mh_lock); in topo_modhash_lock()
116 topo_modhash_unlock(topo_modhash_t *mhp) in topo_modhash_unlock() argument
118 (void) pthread_mutex_unlock(&mhp->mh_lock); in topo_modhash_unlock()
168 topo_modhash_t *mhp = thp->th_modhash; in topo_mod_lookup() local
170 topo_modhash_lock(mhp); in topo_mod_lookup()
171 mod = topo_modhash_lookup(mhp, name); in topo_mod_lookup()
174 topo_modhash_unlock(mhp); in topo_mod_lookup()
258 topo_modhash_t *mhp; in topo_modhash_create() local
260 if ((mhp = topo_hdl_zalloc(thp, sizeof (topo_modhash_t))) == NULL) in topo_modhash_create()
[all …]
/titanic_50/usr/src/uts/common/io/mac/plugins/
H A Dmac_wifi.c278 mac_wifi_header_info(mblk_t *mp, void *pdata, mac_header_info_t *mhp) in mac_wifi_header_info() argument
317 mhp->mhi_origsap = ntohs(llc->illc_ether_type); in mac_wifi_header_info()
318 mhp->mhi_bindsap = mhp->mhi_origsap; in mac_wifi_header_info()
319 mhp->mhi_pktsize = 0; in mac_wifi_header_info()
320 mhp->mhi_hdrsize = (uintptr_t)llcp + sizeof (*llc) - in mac_wifi_header_info()
331 mhp->mhi_bindsap = DLS_SAP_LLC; in mac_wifi_header_info()
332 mhp->mhi_hdrsize -= sizeof (*llc); in mac_wifi_header_info()
333 mhp->mhi_pktsize = mhp->mhi_hdrsize + mhp->mhi_origsap; in mac_wifi_header_info()
340 mhp->mhi_daddr = wh->i_addr1; in mac_wifi_header_info()
341 mhp->mhi_saddr = wh->i_addr2; in mac_wifi_header_info()
[all …]
/titanic_50/usr/src/cmd/fm/fmd/common/
H A Dfmd_module.c1025 fmd_modhash_t *mhp = fmd_alloc(sizeof (fmd_modhash_t), FMD_SLEEP); in fmd_modhash_create() local
1027 (void) pthread_rwlock_init(&mhp->mh_lock, NULL); in fmd_modhash_create()
1028 mhp->mh_hashlen = fmd.d_str_buckets; in fmd_modhash_create()
1029 mhp->mh_hash = fmd_zalloc(sizeof (void *) * mhp->mh_hashlen, FMD_SLEEP); in fmd_modhash_create()
1030 mhp->mh_nelems = 0; in fmd_modhash_create()
1032 return (mhp); in fmd_modhash_create()
1036 fmd_modhash_destroy(fmd_modhash_t *mhp) in fmd_modhash_destroy() argument
1041 for (i = 0; i < mhp->mh_hashlen; i++) { in fmd_modhash_destroy()
1042 for (mp = mhp->mh_hash[i]; mp != NULL; mp = nmp) { in fmd_modhash_destroy()
1049 fmd_free(mhp->mh_hash, sizeof (void *) * mhp->mh_hashlen); in fmd_modhash_destroy()
[all …]
H A Dfmd_builtin.c104 fmd_builtin_loadall(fmd_modhash_t *mhp) in fmd_builtin_loadall() argument
117 if (fmd_modhash_load(mhp, bp->bltin_name, in fmd_builtin_loadall()
H A Dfmd_xprt.c331 fmd_xprt_subscribe_modhash(fmd_xprt_impl_t *xip, fmd_modhash_t *mhp) in fmd_xprt_subscribe_modhash() argument
338 (void) pthread_rwlock_rdlock(&mhp->mh_lock); in fmd_xprt_subscribe_modhash()
340 for (i = 0; i < mhp->mh_hashlen; i++) { in fmd_xprt_subscribe_modhash()
341 for (mp = mhp->mh_hash[i]; mp != NULL; mp = mp->mod_next) in fmd_xprt_subscribe_modhash()
350 for (i = 0; i < mhp->mh_hashlen; i++) { in fmd_xprt_subscribe_modhash()
351 for (mp = mhp->mh_hash[i]; mp != NULL; mp = mp->mod_next) { in fmd_xprt_subscribe_modhash()
359 for (i = 0; i < mhp->mh_hashlen; i++) { in fmd_xprt_subscribe_modhash()
360 for (mp = mhp->mh_hash[i]; mp != NULL; mp = mp->mod_next) in fmd_xprt_subscribe_modhash()
364 (void) pthread_rwlock_unlock(&mhp->mh_lock); in fmd_xprt_subscribe_modhash()
/titanic_50/usr/src/cmd/ndmpd/tlm/
H A Dtlm_backup_reader.c1205 ndmp_metadata_header_ext_t *mhp; in zfs_put_prop_cb() local
1216 mhp = mhd->ml_xhdr; in zfs_put_prop_cb()
1217 mpp = &mhp->nh_property[mhp->nh_count]; in zfs_put_prop_cb()
1219 if (mhp->nh_count * sizeof (ndmp_metadata_property_ext_t) + in zfs_put_prop_cb()
1220 sizeof (ndmp_metadata_header_ext_t) > mhp->nh_total_bytes) in zfs_put_prop_cb()
1225 mhp->nh_count++; in zfs_put_prop_cb()
1241 sourcestr = mhp->nh_dataset; in zfs_put_prop_cb()
1255 mhp->nh_count++; in zfs_put_prop_cb()
1266 ndmp_metadata_header_ext_t *mhp; in zfs_put_quota_cb() local
1274 mhp = mhd->ml_xhdr; in zfs_put_quota_cb()
[all …]
H A Dtlm_restore_writer.c2322 ndmp_metadata_header_t *mhp; in ndmp_iter_zfs() local
2355 while ((mhp = (ndmp_metadata_header_t *)get_read_buffer(size, &rv, in ndmp_iter_zfs()
2359 if (strncmp(mhp->nh_magic, ZFS_META_MAGIC, in ndmp_iter_zfs()
2360 sizeof (mhp->nh_magic)) != 0 && in ndmp_iter_zfs()
2361 strncmp(mhp->nh_magic, ZFS_META_MAGIC_EXT, in ndmp_iter_zfs()
2362 sizeof (mhp->nh_magic)) != 0) { in ndmp_iter_zfs()
2369 if (strncmp(mhp->nh_magic, ZFS_META_MAGIC_EXT, in ndmp_iter_zfs()
2370 sizeof (mhp->nh_magic)) == 0) { in ndmp_iter_zfs()
2371 mhpx = (ndmp_metadata_header_ext_t *)mhp; in ndmp_iter_zfs()
2383 (void) memcpy(pp, (char *)mhp, (actual_size < size) ? in ndmp_iter_zfs()
[all …]
/titanic_50/usr/src/cmd/boot/bootadm/
H A Dbootadm.c6048 mhash_t *mhp; local
6063 mhp = s_calloc(1, sizeof (mhash_t));
6083 mcp->mc_next = mhp->mh_hash[idx];
6084 mhp->mh_hash[idx] = mcp;
6090 return (mhp);
6094 free_mnttab(mhash_t *mhp) argument
6101 while (mcp = mhp->mh_hash[i]) {
6102 mhp->mh_hash[i] = mcp->mc_next;
6111 assert(mhp->mh_hash[i] == NULL);
6113 free(mhp);
[all …]
/titanic_50/usr/src/uts/common/sys/
H A Dmac_impl.h299 #define MAC_RING_TX(mhp, rh, mp, rest) { \ argument
301 mac_impl_t *mimpl = (mac_impl_t *)mhp; \
/titanic_50/usr/src/uts/sun4u/starfire/io/
H A Didn_proto.c10492 idn_mboxhdr_t *mhp; in idn_chan_server_syncheader() local
10507 mhp = &mtp->mt_header; in idn_chan_server_syncheader()
10511 if (mhp != prev_mhp[channel]) { in idn_chan_server_syncheader()
10512 prev_mhp[channel] = mhp; in idn_chan_server_syncheader()
10514 proc, channel, IDN_GET_MBOXHDR_COOKIE(mhp), in idn_chan_server_syncheader()
10517 proc, channel, mhp->mh_svr_active_ptr, in idn_chan_server_syncheader()
10518 IDN_ADDR2OFFSET(&mhp->mh_svr_active)); in idn_chan_server_syncheader()
10520 proc, channel, mhp->mh_svr_ready_ptr, in idn_chan_server_syncheader()
10521 IDN_ADDR2OFFSET(&mhp->mh_svr_ready)); in idn_chan_server_syncheader()
10523 proc, channel, (int)mhp->mh_cksum, (int)mbox_csum); in idn_chan_server_syncheader()
[all …]
/titanic_50/usr/src/uts/sun4u/starfire/sys/
H A Didn.h2076 #define IDN_GET_MBOXHDR_COOKIE(mhp) \ argument
2077 ((mhp)->mh_cookie & ~0xff00)
2078 #define VALID_MBOXHDR(mhp, ch, cksum) \ argument
2079 ((IDN_GET_MBOXHDR_COOKIE(mhp) == \
2081 ((cksum) == (*(mhp)).mh_cksum))
/titanic_50/usr/src/uts/common/inet/sockmods/
H A Dsockmod_pfp.c1419 pfp_open_index(int index, mac_handle_t *mhp, mac_client_handle_t *mcip, in pfp_open_index() argument
1455 *mhp = mh; in pfp_open_index()
/titanic_50/usr/src/uts/common/io/mac/
H A Dmac_client.c319 mac_open(const char *macname, mac_handle_t *mhp) in mac_open() argument
344 *mhp = (mac_handle_t)mip; in mac_open()
355 *mhp = (mac_handle_t)mip; in mac_open()
370 mac_open_by_linkid(datalink_id_t linkid, mac_handle_t *mhp) in mac_open_by_linkid() argument
380 err = mac_open(dls_devnet_mac(dlh), mhp); in mac_open_by_linkid()
390 mac_open_by_linkname(const char *link, mac_handle_t *mhp) in mac_open_by_linkname() argument
397 return (mac_open_by_linkid(linkid, mhp)); in mac_open_by_linkname()
H A Dmac_provider.c122 mac_register(mac_register_t *mregp, mac_handle_t *mhp) in mac_register() argument
443 *mhp = (mac_handle_t)mip; in mac_register()
/titanic_50/usr/src/uts/sun4u/ngdr/io/
H A Ddr_mem.c67 static int dr_reserve_mem_spans(memhandle_t *mhp, struct memlist *mlist);
2010 dr_reserve_mem_spans(memhandle_t *mhp, struct memlist *ml) in dr_reserve_mem_spans() argument
2029 err = kphysm_del_span(*mhp, base, npgs); in dr_reserve_mem_spans()
/titanic_50/usr/src/uts/sun4u/io/
H A Dsbd_mem.c61 static int sbd_reserve_mem_spans(memhandle_t *mhp,
1488 sbd_reserve_mem_spans(memhandle_t *mhp, struct memlist *ml) in sbd_reserve_mem_spans() argument
1507 err = kphysm_del_span(*mhp, base, npgs); in sbd_reserve_mem_spans()
H A Dsbd.c3945 sbd_get_memhandle(sbd_handle_t *hp, dev_info_t *dip, memhandle_t *mhp) in sbd_get_memhandle() argument
3968 *mhp = mp->sbm_memhandle; in sbd_get_memhandle()
/titanic_50/usr/src/uts/sun4u/opl/io/
H A Ddr_mem.c77 static int dr_reserve_mem_spans(memhandle_t *mhp,
2082 dr_reserve_mem_spans(memhandle_t *mhp, struct memlist *ml) in dr_reserve_mem_spans() argument
2101 err = kphysm_del_span(*mhp, base, npgs); in dr_reserve_mem_spans()
/titanic_50/usr/src/uts/sun4u/sys/
H A Dsbdpriv.h736 memhandle_t *mhp);
/titanic_50/usr/src/uts/common/io/scsi/targets/
H A Dsd.c5026 struct mode_header_grp2 *mhp = in sd_get_physical_geometry() local
5029 bd_len = (mhp->bdesc_length_hi << 8) | mhp->bdesc_length_lo; in sd_get_physical_geometry()
5104 struct mode_header_grp2 *mhp = in sd_get_physical_geometry() local
5106 bd_len = (mhp->bdesc_length_hi << 8) | mhp->bdesc_length_lo; in sd_get_physical_geometry()
9438 struct mode_header_grp2 *mhp = in sd_get_caching_mode_page() local
9440 *bdlen = (mhp->bdesc_length_hi << 8) | mhp->bdesc_length_lo; in sd_get_caching_mode_page()
9549 struct mode_header_grp2 *mhp = in sd_cache_control() local
9551 mhp->bdesc_length_hi = bdlen >> 8; in sd_cache_control()
9552 mhp->bdesc_length_lo = (uchar_t)bdlen & 0xff; in sd_cache_control()