/titanic_44/usr/src/uts/common/io/usb/clients/usbser/usbser_keyspan/ |
H A D | keyspan_dsd.c | 301 keyspan_state_t *ksp; in keyspan_attach() local 304 ksp = (keyspan_state_t *)kmem_zalloc(sizeof (keyspan_state_t), in keyspan_attach() 306 ksp->ks_dip = aip->ai_dip; in keyspan_attach() 307 ksp->ks_usb_events = aip->ai_usb_events; in keyspan_attach() 308 *aip->ai_hdl = (ds_hdl_t)ksp; in keyspan_attach() 310 if (keyspan_usb_register(ksp) != USB_SUCCESS) { in keyspan_attach() 316 keyspan_init_sync_objs(ksp); in keyspan_attach() 319 if (keyspan_attach_dev(ksp) != USB_SUCCESS) { in keyspan_attach() 320 USB_DPRINTF_L2(DPRINT_ATTACH, ksp->ks_lh, "fail attach dev "); in keyspan_attach() 325 keyspan_attach_ports(ksp); in keyspan_attach() [all …]
|
H A D | keyspan_pipe.c | 49 keyspan_init_one_pipe(keyspan_state_t *ksp, keyspan_port_t *kp, in keyspan_init_one_pipe() argument 54 USB_DPRINTF_L4(DPRINT_OPEN, ksp->ks_lh, "keyspan_init_one_pipe: " in keyspan_init_one_pipe() 64 pipe->pipe_ksp = ksp; in keyspan_init_one_pipe() 67 pipe->pipe_lh = ksp->ks_lh; in keyspan_init_one_pipe() 95 keyspan_init_pipes(keyspan_state_t *ksp) in keyspan_init_pipes() argument 97 usb_client_dev_data_t *dev_data = ksp->ks_dev_data; in keyspan_init_pipes() 99 uint8_t port_cnt = ksp->ks_dev_spec.port_cnt; in keyspan_init_pipes() 125 tmp_ep = usb_lookup_ep_data(ksp->ks_dip, dev_data, ifc, alt, i, in keyspan_init_pipes() 128 USB_DPRINTF_L3(DPRINT_ATTACH, ksp->ks_lh, in keyspan_init_pipes() 136 USB_DPRINTF_L3(DPRINT_ATTACH, ksp->ks_lh, "keyspan_init_pipes: " in keyspan_init_pipes() [all …]
|
/titanic_44/usr/src/lib/libprtdiag/common/ |
H A D | kstat.c | 68 kstat_t *ksp; in read_platform_kstats() local 92 ksp = kstat_lookup(kc, UNIX, board, FHC_KSTAT_NAME); in read_platform_kstats() 95 if ((ksp != NULL) && (kstat_read(kc, ksp, NULL) == -1)) { in read_platform_kstats() 96 ksp = NULL; in read_platform_kstats() 100 if (ksp != NULL) { in read_platform_kstats() 111 knp = kstat_data_lookup(ksp, CSR_KSTAT_NAMED); in read_platform_kstats() 117 knp = kstat_data_lookup(ksp, BSR_KSTAT_NAMED); in read_platform_kstats() 126 ksp = kstat_lookup(kc, UNIX, board, AC_KSTAT_NAME); in read_platform_kstats() 129 if ((ksp != NULL) && (kstat_read(kc, ksp, NULL) == -1)) { in read_platform_kstats() 130 ksp = NULL; in read_platform_kstats() [all …]
|
/titanic_44/usr/src/lib/libkstat/common/ |
H A D | kstat.c | 54 kstat_t *ksp, *nksp; in kstat_chain_free() local 56 ksp = kc->kc_chain; in kstat_chain_free() 57 while (ksp) { in kstat_chain_free() 58 nksp = ksp->ks_next; in kstat_chain_free() 59 free(ksp->ks_data); in kstat_chain_free() 60 free(ksp); in kstat_chain_free() 61 ksp = nksp; in kstat_chain_free() 104 kstat_read(kstat_ctl_t *kc, kstat_t *ksp, void *data) in kstat_read() argument 108 if (ksp->ks_data == NULL && ksp->ks_data_size > 0) { in kstat_read() 109 kstat_zalloc(&ksp->ks_data, ksp->ks_data_size, 0); in kstat_read() [all …]
|
/titanic_44/usr/src/uts/common/os/ |
H A D | kstat_fr.c | 375 kstat_t *ksp; in kstat_hold() local 380 ksp = avl_find(t, template, NULL); in kstat_hold() 381 if (ksp == NULL) in kstat_hold() 383 e = (ekstat_t *)ksp; in kstat_hold() 391 return (ksp); in kstat_hold() 395 kstat_rele(kstat_t *ksp) in kstat_rele() argument 397 ekstat_t *e = (ekstat_t *)ksp; in kstat_rele() 471 kstat_t *ksp; in kstat_init() local 497 ksp = kstat_create("unix", 0, "kstat_headers", "kstat", KSTAT_TYPE_RAW, in kstat_init() 499 if (ksp) { in kstat_init() [all …]
|
/titanic_44/usr/src/uts/common/io/ |
H A D | kstat.c | 64 kstat_t user_kstat, *ksp; in read_kstat_data() local 89 ksp = kstat_hold_bykid(user_kstat.ks_kid, getzoneid()); in read_kstat_data() 90 if (ksp == NULL) { in read_kstat_data() 96 if (ksp->ks_flags & KSTAT_FLAG_INVALID) { in read_kstat_data() 102 kstat_rele(ksp); in read_kstat_data() 117 if (!(ksp->ks_flags & (KSTAT_FLAG_VAR_SIZE | KSTAT_FLAG_LONGSTRINGS))) { in read_kstat_data() 118 kbufsize = ksp->ks_data_size; in read_kstat_data() 121 kstat_rele(ksp); in read_kstat_data() 125 KSTAT_ENTER(ksp); in read_kstat_data() 126 if ((error = KSTAT_UPDATE(ksp, KSTAT_READ)) != 0) { in read_kstat_data() [all …]
|
/titanic_44/usr/src/cmd/powertop/common/ |
H A D | battery.c | 116 kstat_t *ksp; in pt_battery_stat_snapshot() local 128 ksp = kstat_lookup(kc, kstat_batt_mod[kstat_batt_idx], 0, in pt_battery_stat_snapshot() 131 if (ksp == NULL) { in pt_battery_stat_snapshot() 136 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 137 knp = kstat_data_lookup(ksp, "bif_unit"); in pt_battery_stat_snapshot() 151 ksp = kstat_lookup(kc, kstat_batt_mod[kstat_batt_idx], 0, in pt_battery_stat_snapshot() 154 if (ksp == NULL) { in pt_battery_stat_snapshot() 159 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 160 knp = kstat_data_lookup(ksp, "bst_rate"); in pt_battery_stat_snapshot() 178 ksp = kstat_lookup(kc, kstat_batt_mod[kstat_batt_idx], 0, in pt_battery_stat_snapshot() [all …]
|
H A D | turbo.c | 66 kstat_t *ksp; in pt_turbo_init() local 77 ksp = kstat_lookup(kc, "turbo", 0, NULL); in pt_turbo_init() 78 if (ksp == NULL) { in pt_turbo_init() 84 (void) kstat_read(kc, ksp, NULL); in pt_turbo_init() 86 knp = kstat_data_lookup(ksp, "turbo_supported"); in pt_turbo_init() 115 kstat_t *ksp; in pt_turbo_snapshot() local 125 ksp = kstat_lookup(kc, "turbo", g_cpu_table[cpu], NULL); in pt_turbo_snapshot() 126 if (ksp == NULL) { in pt_turbo_snapshot() 133 if (kstat_read(kc, ksp, NULL) == -1) { in pt_turbo_snapshot() 140 knp = kstat_data_lookup(ksp, "turbo_mcnt"); in pt_turbo_snapshot() [all …]
|
/titanic_44/usr/src/cmd/avs/dsstat/ |
H A D | common.c | 70 kstat_retrieve(kstat_ctl_t *kc, kstat_t *ksp) in kstat_retrieve() argument 79 if (ksp == NULL) in kstat_retrieve() 82 if (ksp->ks_data == NULL && in kstat_retrieve() 83 kstat_read(kc, ksp, NULL) == -1) in kstat_retrieve() 86 rval = (kstat_t *)calloc(1, sizeof (*ksp)); in kstat_retrieve() 87 (void) memcpy(rval, ksp, sizeof (*ksp)); in kstat_retrieve() 89 rval->ks_data = (void *) calloc(1, ksp->ks_data_size); in kstat_retrieve() 90 (void) memcpy(rval->ks_data, ksp->ks_data, in kstat_retrieve() 91 sizeof (kstat_named_t) * ksp->ks_ndata); in kstat_retrieve() 95 end = (char *)(knp + ksp->ks_ndata); in kstat_retrieve() [all …]
|
H A D | sndr_stats.c | 80 kstat_t *ksp; in sndr_discover() local 87 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in sndr_discover() 96 if (strcmp(ksp->ks_module, RDC_KSTAT_MODULE) != 0 || in sndr_discover() 97 strcmp(ksp->ks_name, RDC_KSTAT_INFO) != 0) { in sndr_discover() 101 if (kstat_read(kc, ksp, NULL) == -1) in sndr_discover() 108 if (sndr_validate(ksp)) in sndr_discover() 124 tst_vname = kstat_value(ksp, RDC_IKSTAT_FILE); in sndr_discover() 125 tst_inst = ksp->ks_instance; in sndr_discover() 136 kinst = ksp->ks_instance; in sndr_discover() 141 sndrstat->pre_set = kstat_retrieve(kc, ksp); in sndr_discover() [all …]
|
H A D | ii_stats.c | 54 int ii_validate(kstat_t *ksp); 68 kstat_t *ksp; in ii_discover() local 71 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in ii_discover() 81 if (strcmp(ksp->ks_class, II_KSTAT_CLASS) != 0) in ii_discover() 84 if (kstat_read(kc, ksp, NULL) == -1) in ii_discover() 91 if (ii_validate(ksp)) in ii_discover() 107 tst_vname = ksp->ks_name; in ii_discover() 108 tst_inst = ksp->ks_instance; in ii_discover() 123 iistat->pre_set = kstat_retrieve(kc, ksp); in ii_discover() 219 kstat_t *ksp = NULL; in ii_update() local [all …]
|
H A D | sdbc_stats.c | 67 kstat_t *ksp; in sdbc_discover() local 69 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in sdbc_discover() 76 if (strcmp(ksp->ks_module, SDBC_KSTAT_MODULE) != 0 || in sdbc_discover() 77 strncmp(ksp->ks_name, SDBC_KSTAT_CDSTATS, 2) != 0) in sdbc_discover() 80 if (kstat_read(kc, ksp, NULL) == -1) in sdbc_discover() 87 if (sdbc_validate(ksp)) in sdbc_discover() 102 tst_vname = kstat_value(ksp, in sdbc_discover() 114 kinst = ksp->ks_instance; in sdbc_discover() 119 sdbcstat->pre_set = kstat_retrieve(kc, ksp); in sdbc_discover() 167 kstat_t *ksp; in sdbc_update() local [all …]
|
/titanic_44/usr/src/cmd/kvmstat/ |
H A D | kvmstat.c | 83 kstat_field_hint(kstat_t *ksp, kstat_field_t *field) in kstat_field_hint() argument 85 kstat_named_t *nm = KSTAT_NAMED_PTR(ksp); in kstat_field_hint() 88 assert(ksp->ks_type == KSTAT_TYPE_NAMED); in kstat_field_hint() 90 for (i = 0; i < ksp->ks_ndata; i++) { in kstat_field_hint() 96 field->ksf_name, ksp->ks_name, ksp->ks_instance); in kstat_field_hint() 126 kstat_t *ksp; in kstat_instances_update() local 138 for (ksp = kcp->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in kstat_instances_update() 141 if (!interested(ksp)) in kstat_instances_update() 152 if (ksi->ksi_instance != ksp->ks_instance) in kstat_instances_update() 155 if (strcmp(ksi->ksi_name, ksp->ks_name) != 0) in kstat_instances_update() [all …]
|
/titanic_44/usr/src/uts/common/io/softmac/ |
H A D | softmac_stat.c | 178 kstat_t *ksp; in softmac_hold_dev_kstat() local 186 ksp = kstat_hold_byname(drv, ppa, softmac->smac_devname, ALL_ZONES); in softmac_hold_dev_kstat() 187 if (ksp != NULL) { in softmac_hold_dev_kstat() 188 KSTAT_ENTER(ksp); in softmac_hold_dev_kstat() 190 if ((ksp->ks_data != NULL) && in softmac_hold_dev_kstat() 191 (ksp->ks_type == KSTAT_TYPE_NAMED)) { in softmac_hold_dev_kstat() 195 if (KSTAT_UPDATE(ksp, KSTAT_READ) == 0) in softmac_hold_dev_kstat() 196 return (ksp); in softmac_hold_dev_kstat() 199 KSTAT_EXIT(ksp); in softmac_hold_dev_kstat() 200 kstat_rele(ksp); in softmac_hold_dev_kstat() [all …]
|
/titanic_44/usr/src/uts/common/io/drm/ |
H A D | drm_kstat.c | 44 drm_kstat_update(kstat_t *ksp, int flag) in drm_kstat_update() argument 53 sc = ksp->ks_private; in drm_kstat_update() 54 knp = ksp->ks_data; in drm_kstat_update() 67 kstat_t *ksp; in drm_init_kstats() local 74 ksp = kstat_create("drm", instance, "drminfo", "drm", in drm_init_kstats() 77 if (ksp == NULL) in drm_init_kstats() 80 ksp->ks_private = sc; in drm_init_kstats() 81 ksp->ks_update = drm_kstat_update; in drm_init_kstats() 82 for (knp = ksp->ks_data; (np = (*aknp)) != NULL; knp++, aknp++) { in drm_init_kstats() 85 kstat_install(ksp); in drm_init_kstats() [all …]
|
/titanic_44/usr/src/cmd/sa/ |
H A D | sadc.c | 323 kstat_t *ksp; in all_stat_init() local 369 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in all_stat_init() 370 if (strncmp(ksp->ks_name, "cpu_stat", 8) == 0) in all_stat_init() 372 if (strcmp(ksp->ks_class, "kmem_cache") == 0) in all_stat_init() 380 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in all_stat_init() 381 if (strncmp(ksp->ks_name, "cpu_stat", 8) == 0 && in all_stat_init() 382 kstat_read(kc, ksp, NULL) != -1) in all_stat_init() 383 cpu_stat_list[ncpus++] = ksp; in all_stat_init() 384 if (strcmp(ksp->ks_class, "kmem_cache") == 0 && in all_stat_init() 385 kstat_read(kc, ksp, NULL) != -1) in all_stat_init() [all …]
|
/titanic_44/usr/src/cmd/stat/common/ |
H A D | acquire.c | 55 kstat_t *ksp = kstat_lookup(kc, module, instance, name); in kstat_lookup_read() local 56 if (ksp == NULL) in kstat_lookup_read() 58 if (kstat_read(kc, ksp, NULL) == -1) in kstat_lookup_read() 60 return (ksp); in kstat_lookup_read() 80 kstat_t *ksp; in acquire_cpus() local 89 if ((ksp = kstat_lookup_read(kc, "cpu_info", i, NULL)) == NULL) in acquire_cpus() 99 if ((ksp = kstat_lookup_read(kc, "cpu", i, "vm")) == NULL) in acquire_cpus() 102 if (kstat_copy(ksp, &ss->s_cpus[i].cs_vm)) in acquire_cpus() 105 if ((ksp = kstat_lookup_read(kc, "cpu", i, "sys")) == NULL) in acquire_cpus() 108 if (kstat_copy(ksp, &ss->s_cpus[i].cs_sys)) in acquire_cpus() [all …]
|
/titanic_44/usr/src/uts/common/io/mac/ |
H A D | mac_stat.c | 298 i_mac_driver_stat_update(kstat_t *ksp, int rw) in i_mac_driver_stat_update() argument 300 mac_impl_t *mip = ksp->ks_private; in i_mac_driver_stat_update() 301 kstat_named_t *knp = ksp->ks_data; in i_mac_driver_stat_update() 352 i_mac_stat_update(kstat_t *ksp, int rw, uint64_t (*fn)(void *, uint_t), in i_mac_stat_update() argument 355 kstat_named_t *knp = ksp->ks_data; in i_mac_stat_update() 363 val = fn(ksp->ks_private, msi[i].msi_stat); in i_mac_stat_update() 390 kstat_t *ksp; in i_mac_stat_create() local 393 ksp = kstat_create(modname, 0, statname, "net", in i_mac_stat_create() 396 if (ksp == NULL) in i_mac_stat_create() 399 ksp->ks_update = fn; in i_mac_stat_create() [all …]
|
/titanic_44/usr/src/uts/common/syscall/ |
H A D | gid.c | 50 ksid_t ksid, *ksp; in setgid() local 60 ksp = &ksid; in setgid() 62 ksp = NULL; in setgid() 89 crsetsid(newcr, ksp, KSID_GROUP); in setgid() 109 crsetsid(newcr, ksp, KSID_GROUP); in setgid() 114 if (ksp != NULL) in setgid() 115 ksid_rele(ksp); in setgid() 150 ksid_t ksid, *ksp; in setegid() local 159 ksp = &ksid; in setegid() 161 ksp = NULL; in setegid() [all …]
|
H A D | uid.c | 53 ksid_t ksid, *ksp; in setuid() local 62 ksp = &ksid; in setuid() 64 ksp = NULL; in setuid() 93 crsetsid(newcr, ksp, KSID_USER); in setuid() 140 crsetsid(newcr, ksp, KSID_USER); in setuid() 149 if (ksp != NULL) in setuid() 150 ksid_rele(ksp); in setuid() 195 ksid_t ksid, *ksp; in seteuid() local 204 ksp = &ksid; in seteuid() 206 ksp = NULL; in seteuid() [all …]
|
/titanic_44/usr/src/cmd/pools/poolstat/ |
H A D | sa_kstat.c | 114 safe_kstat_data_lookup(kstat_t *ksp, char *name) in safe_kstat_data_lookup() argument 118 if ((dp = kstat_data_lookup(ksp, name)) == NULL) in safe_kstat_data_lookup() 120 ksp->ks_name, name, get_errstr()); in safe_kstat_data_lookup() 178 sdata_new(kstat_t *ksp) in sdata_new() argument 183 kstat_clone(ksp, &sdp->sd_nks, 0); in sdata_new() 208 kstat_t *ksp; in update_sdata_list() local 211 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in update_sdata_list() 212 if (strcmp(ksp->ks_module, module) == 0 && in update_sdata_list() 213 (name == NULL || strcmp(ksp->ks_name, name) == 0) && in update_sdata_list() 214 (instance == -1 || ksp->ks_instance == instance)) { in update_sdata_list() [all …]
|
/titanic_44/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/ |
H A D | piclkstat.c | 138 kstat_t *ksp; in kstat_name_lookup() local 144 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in kstat_name_lookup() 145 if (strcmp(ksp->ks_module, ks_module) == 0 && in kstat_name_lookup() 146 ksp->ks_instance == ks_instance && in kstat_name_lookup() 147 ksp->ks_type == KSTAT_TYPE_NAMED && in kstat_name_lookup() 148 kstat_read(kc, ksp, NULL) != -1 && in kstat_name_lookup() 149 kstat_data_lookup(ksp, name)) { in kstat_name_lookup() 151 ksp = kstat_lookup(kc, ks_module, ks_instance, in kstat_name_lookup() 152 ksp->ks_name); in kstat_name_lookup() 153 if (!ksp) in kstat_name_lookup() [all …]
|
/titanic_44/usr/src/uts/intel/io/agpgart/ |
H A D | agp_kstat.c | 54 agp_kstat_update(kstat_t *ksp, int flag) in agp_kstat_update() argument 63 sc = ksp->ks_private; in agp_kstat_update() 64 knp = ksp->ks_data; in agp_kstat_update() 93 kstat_t *ksp; in agp_init_kstats() local 101 ksp = kstat_create(AGPGART_DEVNODE, instance, "agpinfo", "agp", in agp_init_kstats() 104 if (ksp == NULL) in agp_init_kstats() 107 ksp->ks_private = sc; in agp_init_kstats() 108 ksp->ks_update = agp_kstat_update; in agp_init_kstats() 109 for (knp = ksp->ks_data; (np = (*aknp)) != NULL; knp++, aknp++) { in agp_init_kstats() 126 kstat_install(ksp); in agp_init_kstats() [all …]
|
/titanic_44/usr/src/lib/libdladm/common/ |
H A D | libdlstat.c | 174 kstat_t *ksp; in flow_kstats() local 191 ksp = dladm_kstat_lookup(kcp, NULL, -1, attr->fa_flowname, "flow"); in flow_kstats() 193 if (ksp == NULL) in flow_kstats() 197 dladm_get_stats(kcp, ksp, &currstats); in flow_kstats() 200 (void) dladm_kstat_value(ksp, "ifspeed", KSTAT_DATA_UINT64, in flow_kstats() 288 kstat_t *ksp; in link_kstats() local 318 ksp = dladm_kstat_lookup(kcp, NULL, -1, flist->linkname, "net"); in link_kstats() 320 if (ksp == NULL) in link_kstats() 324 dladm_get_stats(kcp, ksp, &currstats); in link_kstats() 327 (void) dladm_kstat_value(ksp, "ifspeed", KSTAT_DATA_UINT64, in link_kstats() [all …]
|
/titanic_44/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/ |
H A D | iod_main.c | 112 kstat_t *ksp; in iod_cpu_check_support() local 118 for (ksp = kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in iod_cpu_check_support() 119 if (strcmp(ksp->ks_module, "cpu_info") != 0) in iod_cpu_check_support() 122 if (kstat_read(kc, ksp, NULL) == -1) { in iod_cpu_check_support() 127 for (kn = ksp->ks_data, i = 0; i < ksp->ks_ndata; i++, kn++) { in iod_cpu_check_support()
|