Lines Matching refs:mod

45 get_fmtstr(topo_mod_t *mod, nvlist_t *in)  in get_fmtstr()  argument
51 topo_mod_dprintf(mod, "get_fmtstr() called\n"); in get_fmtstr()
54 topo_mod_dprintf(mod, "Failed to lookup 'args' list (%s)\n", in get_fmtstr()
56 (void) topo_mod_seterrno(mod, EMOD_NVL_INVAL); in get_fmtstr()
60 topo_mod_dprintf(mod, "Failed to lookup 'format' arg (%s)\n", in get_fmtstr()
62 (void) topo_mod_seterrno(mod, EMOD_NVL_INVAL); in get_fmtstr()
69 store_prop_val(topo_mod_t *mod, char *buf, char *propname, nvlist_t **out) in store_prop_val() argument
71 if (topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) != 0) { in store_prop_val()
72 topo_mod_dprintf(mod, "Failed to allocate 'out' nvlist\n"); in store_prop_val()
73 return (topo_mod_seterrno(mod, EMOD_NOMEM)); in store_prop_val()
76 topo_mod_dprintf(mod, "Failed to set '%s'\n", in store_prop_val()
79 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in store_prop_val()
83 topo_mod_dprintf(mod, "Failed to set '%s'\n", in store_prop_val()
86 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in store_prop_val()
89 topo_mod_dprintf(mod, "Failed to set '%s'\n", in store_prop_val()
92 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in store_prop_val()
114 simple_dimm_label(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in simple_dimm_label() argument
122 topo_mod_dprintf(mod, "simple_dimm_label() called\n"); in simple_dimm_label()
124 topo_mod_dprintf(mod, "Failed to lookup 'args' list (%s)\n", in simple_dimm_label()
126 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_dimm_label()
129 topo_mod_dprintf(mod, "Failed to lookup 'offset' arg (%s)\n", in simple_dimm_label()
131 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_dimm_label()
134 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in simple_dimm_label()
135 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in simple_dimm_label()
144 if (store_prop_val(mod, buf, "label", out) != 0) { in simple_dimm_label()
145 topo_mod_dprintf(mod, "Failed to set label\n"); in simple_dimm_label()
175 simple_dimm_label_mp(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in simple_dimm_label_mp() argument
184 topo_mod_dprintf(mod, "simple_dimm_label_mp() called\n"); in simple_dimm_label_mp()
187 topo_mod_dprintf(mod, "Failed to lookup 'args' list (%s)\n", in simple_dimm_label_mp()
189 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_dimm_label_mp()
192 topo_mod_dprintf(mod, "Failed to lookup 'offset' arg (%s)\n", in simple_dimm_label_mp()
194 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_dimm_label_mp()
198 topo_mod_dprintf(mod, "Failed to lookup 'dimms_per_chip' arg " in simple_dimm_label_mp()
200 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_dimm_label_mp()
203 topo_mod_dprintf(mod, "Failed to lookup 'order' arg (%s)\n", in simple_dimm_label_mp()
205 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_dimm_label_mp()
207 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in simple_dimm_label_mp()
208 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in simple_dimm_label_mp()
209 topo_mod_free(mod, order, BUFSZ); in simple_dimm_label_mp()
226 topo_mod_dprintf(mod, "Invalid value for order arg\n"); in simple_dimm_label_mp()
227 topo_mod_free(mod, order, BUFSZ); in simple_dimm_label_mp()
228 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_dimm_label_mp()
231 if (store_prop_val(mod, buf, "label", out) != 0) { in simple_dimm_label_mp()
232 topo_mod_dprintf(mod, "Failed to set label\n"); in simple_dimm_label_mp()
233 topo_mod_free(mod, order, BUFSZ); in simple_dimm_label_mp()
261 seq_dimm_label(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in seq_dimm_label() argument
270 topo_mod_dprintf(mod, "seq_dimm_label() called\n"); in seq_dimm_label()
272 topo_mod_dprintf(mod, "Failed to lookup 'args' list (%s)\n", in seq_dimm_label()
274 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in seq_dimm_label()
277 topo_mod_dprintf(mod, "Failed to lookup 'offset' arg (%s)\n", in seq_dimm_label()
279 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in seq_dimm_label()
282 topo_mod_dprintf(mod, "Failed to lookup 'order' arg (%s)\n", in seq_dimm_label()
284 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in seq_dimm_label()
287 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in seq_dimm_label()
288 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in seq_dimm_label()
289 topo_mod_free(mod, order, BUFSZ); in seq_dimm_label()
306 topo_mod_dprintf(mod, "Invalid value for order arg\n"); in seq_dimm_label()
307 topo_mod_free(mod, order, BUFSZ); in seq_dimm_label()
308 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in seq_dimm_label()
311 if (store_prop_val(mod, buf, "label", out) != 0) { in seq_dimm_label()
312 topo_mod_dprintf(mod, "Failed to set label\n"); in seq_dimm_label()
313 topo_mod_free(mod, order, BUFSZ); in seq_dimm_label()
339 simple_chip_label(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in simple_chip_label() argument
347 topo_mod_dprintf(mod, "simple_chip_label() called\n"); in simple_chip_label()
349 topo_mod_dprintf(mod, "Failed to lookup 'args' list (%s)\n", in simple_chip_label()
351 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_chip_label()
354 topo_mod_dprintf(mod, "Failed to lookup 'offset' arg (%s)\n", in simple_chip_label()
356 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_chip_label()
359 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in simple_chip_label()
360 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in simple_chip_label()
369 if (store_prop_val(mod, buf, "label", out) != 0) { in simple_chip_label()
370 topo_mod_dprintf(mod, "Failed to set label\n"); in simple_chip_label()
396 fsb2_chip_label(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in fsb2_chip_label() argument
404 topo_mod_dprintf(mod, "fsb2_chip_label() called\n"); in fsb2_chip_label()
406 topo_mod_dprintf(mod, "Failed to lookup 'args' list (%s)\n", in fsb2_chip_label()
408 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in fsb2_chip_label()
411 topo_mod_dprintf(mod, "Failed to lookup 'offset' arg (%s)\n", in fsb2_chip_label()
413 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in fsb2_chip_label()
416 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in fsb2_chip_label()
417 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in fsb2_chip_label()
426 if (store_prop_val(mod, buf, "label", out) != 0) { in fsb2_chip_label()
427 topo_mod_dprintf(mod, "Failed to set label\n"); in fsb2_chip_label()
447 g4_chip_label(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in g4_chip_label() argument
466 topo_mod_dprintf(mod, "g4_chip_label() called\n"); in g4_chip_label()
467 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in g4_chip_label()
468 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in g4_chip_label()
484 if (store_prop_val(mod, "", "label", out) != 0) { in g4_chip_label()
485 topo_mod_dprintf(mod, "Failed to set label\n"); in g4_chip_label()
491 topo_mod_dprintf(mod, "Failed to lookup 'CoherentNodes'" in g4_chip_label()
493 return (topo_mod_seterrno(mod, err)); in g4_chip_label()
502 topo_mod_dprintf(mod, "chip node instance range check failed:" in g4_chip_label()
504 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in g4_chip_label()
517 topo_mod_dprintf(mod, "Invalid number of CoherentNodes:" in g4_chip_label()
519 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in g4_chip_label()
525 if (store_prop_val(mod, buf, "label", out) != 0) { in g4_chip_label()
526 topo_mod_dprintf(mod, "Failed to set label\n"); in g4_chip_label()
540 get_num_chips(topo_mod_t *mod) in get_num_chips() argument
552 topo_mod_dprintf(mod, "get physcpu info failed:%s\n", in get_num_chips()
562 topo_mod_dprintf(mod, "lookup chipid failed\n"); in get_num_chips()
590 a4fplus_chip_label(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in a4fplus_chip_label() argument
596 topo_mod_dprintf(mod, "a4fplus_chip_label() called\n"); in a4fplus_chip_label()
597 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in a4fplus_chip_label()
598 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in a4fplus_chip_label()
609 if ((num_nodes = get_num_chips(mod)) < 0) { in a4fplus_chip_label()
610 topo_mod_dprintf(mod, "Failed to determine number of chip " in a4fplus_chip_label()
612 return (topo_mod_seterrno(mod, EMOD_UNKNOWN)); in a4fplus_chip_label()
626 topo_mod_dprintf(mod, "Invalid number of chip nodes:" in a4fplus_chip_label()
628 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in a4fplus_chip_label()
632 if (store_prop_val(mod, buf, "label", out) != 0) { in a4fplus_chip_label()
633 topo_mod_dprintf(mod, "Failed to set label\n"); in a4fplus_chip_label()
669 simple_cs_label_mp(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in simple_cs_label_mp() argument
678 topo_mod_dprintf(mod, "simple_cs_label_mp() called\n"); in simple_cs_label_mp()
681 topo_mod_dprintf(mod, "Failed to lookup 'args' list (%s)\n", in simple_cs_label_mp()
683 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_cs_label_mp()
686 topo_mod_dprintf(mod, "Failed to lookup 'offset' arg (%s)\n", in simple_cs_label_mp()
688 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in simple_cs_label_mp()
690 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in simple_cs_label_mp()
691 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in simple_cs_label_mp()
705 if (store_prop_val(mod, buf, "label", out) != 0) { in simple_cs_label_mp()
706 topo_mod_dprintf(mod, "Failed to set label\n"); in simple_cs_label_mp()
716 g4_dimm_label(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in g4_dimm_label() argument
725 topo_mod_dprintf(mod, "g4_dimm_label() called\n"); in g4_dimm_label()
728 topo_mod_dprintf(mod, "Failed to lookup 'args' list (%s)\n", in g4_dimm_label()
730 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in g4_dimm_label()
733 topo_mod_dprintf(mod, "Failed to lookup 'offset' arg (%s)\n", in g4_dimm_label()
735 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in g4_dimm_label()
737 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in g4_dimm_label()
738 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in g4_dimm_label()
751 topo_mod_dprintf(mod, "Failed to lookup label prop on %s=%" in g4_dimm_label()
754 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in g4_dimm_label()
761 topo_mod_strfree(mod, chip_lbl); in g4_dimm_label()
763 if (store_prop_val(mod, buf, "label", out) != 0) { in g4_dimm_label()
764 topo_mod_dprintf(mod, "Failed to set label\n"); in g4_dimm_label()
790 g12f_dimm_label(topo_mod_t *mod, tnode_t *node, topo_version_t vers, in g12f_dimm_label() argument
798 topo_mod_dprintf(mod, "g12f_dimm_label() called\n"); in g12f_dimm_label()
801 topo_mod_dprintf(mod, "Failed to lookup 'args' list (%s)\n", in g12f_dimm_label()
803 return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); in g12f_dimm_label()
805 if ((fmtstr = get_fmtstr(mod, in)) == NULL) { in g12f_dimm_label()
806 topo_mod_dprintf(mod, "Failed to retrieve 'format' arg\n"); in g12f_dimm_label()
820 if (store_prop_val(mod, buf, "label", out) != 0) { in g12f_dimm_label()
821 topo_mod_dprintf(mod, "Failed to set label\n"); in g12f_dimm_label()