Lines Matching defs:cms

59 #define	CMS_OPS(cms)		(cms)->cms_ops
60 #define CMS_OP_PRESENT(cms, op) ((cms) && CMS_OPS(cms)->op != NULL)
77 typedef struct cms {
78 struct cms *cms_next;
79 struct cms *cms_prev;
113 cms_link(cms_t *cms)
117 cms->cms_prev = NULL;
118 cms->cms_next = cms_list;
120 cms_list->cms_prev = cms;
121 cms_list = cms;
125 cms_unlink(cms_t *cms)
128 ASSERT(cms->cms_refcnt == 0);
130 if (cms->cms_prev != NULL)
131 cms->cms_prev->cms_next = cms->cms_next;
133 if (cms->cms_next != NULL)
134 cms->cms_next->cms_prev = cms->cms_prev;
136 if (cms_list == cms)
137 cms_list = cms->cms_next;
146 cms_hold(cms_t *cms)
151 cms->cms_modp->mod_ref++;
153 cms->cms_refcnt++;
157 cms_rele(cms_t *cms)
162 cms->cms_modp->mod_ref--;
165 if (--cms->cms_refcnt == 0) {
166 cms_unlink(cms);
167 kmem_free(cms, sizeof (cms_t));
197 cms_t *cms;
202 for (cms = cms_list; cms != NULL; cms = cms->cms_next) {
203 if (cms->cms_modp == modp)
204 return (cms);
232 cms = kmem_zalloc(sizeof (cms_t), KM_SLEEP);
233 cms->cms_ops = ops;
234 cms->cms_modp = modp;
236 cms_link(cms);
238 return (cms);
287 cms_t *cms = NULL;
293 cms = HDL2CMS(dhdl);
297 return (cms);
312 cms_t *cms;
328 if ((cms = cms_search_list(hdl, match)) != NULL) {
329 cms_hold(cms);
330 return (cms);
340 cms = cms_load_modctl(modp);
341 if (cms)
342 cms_hold(cms);
345 return (cms);
351 cms_t *cms;
360 if ((cms = cms_load_module(hdl, i, &suffixlevel)) == NULL)
368 if ((err = cms->cms_ops->cms_init(hdl, datap)) == 0) {
373 cms->cms_modp->mod_modname,
377 return (cms);
381 cms->cms_modp->mod_modname,
391 cms_rele(cms);
401 cms_t *cms;
409 if ((cms = cms_load_specific(hdl, &data)) != NULL) {
415 cdp->cs_cms = cms;
426 cms_t *cms = HDL2CMS(hdl);
429 if (CMS_OP_PRESENT(cms, cms_fini))
430 CMS_OPS(cms)->cms_fini(hdl);
451 cms_t *cms = HDL2CMS(hdl);
453 if (CMS_OP_PRESENT(cms, cms_post_startup))
454 CMS_OPS(cms)->cms_post_startup(hdl);
460 cms_t *cms = HDL2CMS(hdl);
462 if (CMS_OP_PRESENT(cms, cms_post_mpstartup))
463 CMS_OPS(cms)->cms_post_mpstartup(hdl);
469 cms_t *cms = HDL2CMS(hdl);
471 if (!CMS_OP_PRESENT(cms, cms_logout_size))
474 return (CMS_OPS(cms)->cms_logout_size(hdl));
480 cms_t *cms = HDL2CMS(hdl);
482 if (!CMS_OP_PRESENT(cms, cms_mcgctl_val))
485 return (CMS_OPS(cms)->cms_mcgctl_val(hdl, nbanks, def));
491 cms_t *cms = HDL2CMS(hdl);
493 if (!CMS_OP_PRESENT(cms, cms_bankctl_skipinit))
496 return (CMS_OPS(cms)->cms_bankctl_skipinit(hdl, banknum));
502 cms_t *cms = HDL2CMS(hdl);
504 if (!CMS_OP_PRESENT(cms, cms_bankctl_val))
507 return (CMS_OPS(cms)->cms_bankctl_val(hdl, banknum, def));
513 cms_t *cms = HDL2CMS(hdl);
515 if (!CMS_OP_PRESENT(cms, cms_bankstatus_skipinit))
518 return (CMS_OPS(cms)->cms_bankstatus_skipinit(hdl, banknum));
524 cms_t *cms = HDL2CMS(hdl);
526 if (!CMS_OP_PRESENT(cms, cms_bankstatus_val))
529 return (CMS_OPS(cms)->cms_bankstatus_val(hdl, banknum, def));
535 cms_t *cms = HDL2CMS(hdl);
537 if (CMS_OP_PRESENT(cms, cms_mca_init))
538 CMS_OPS(cms)->cms_mca_init(hdl, nbanks);
544 cms_t *cms = HDL2CMS(hdl);
546 if (CMS_OP_PRESENT(cms, cms_poll_ownermask))
547 return (CMS_OPS(cms)->cms_poll_ownermask(hdl, poll_interval));
556 cms_t *cms = HDL2CMS(hdl);
558 if (mslogout != NULL && CMS_OP_PRESENT(cms, cms_bank_logout))
559 CMS_OPS(cms)->cms_bank_logout(hdl, banknum, status, addr,
566 cms_t *cms = HDL2CMS(hdl);
568 if (CMS_OP_PRESENT(cms, cms_msrinject))
569 return (CMS_OPS(cms)->cms_msrinject(hdl, msr, val));
578 cms_t *cms = HDL2CMS(hdl);
580 if (CMS_OP_PRESENT(cms, cms_error_action))
581 return (CMS_OPS(cms)->cms_error_action(hdl, ismc, banknum,
591 cms_t *cms = HDL2CMS(hdl);
593 if (CMS_OP_PRESENT(cms, cms_disp_match))
594 return (CMS_OPS(cms)->cms_disp_match(hdl, ismc, banknum,
605 cms_t *cms = HDL2CMS(hdl);
611 if (CMS_OP_PRESENT(cms, cms_ereport_class)) {
612 CMS_OPS(cms)->cms_ereport_class(hdl, mscookie, cpuclsp,
621 cms_t *cms = HDL2CMS(hdl);
623 if (CMS_OP_PRESENT(cms, cms_ereport_detector))
624 return (CMS_OPS(cms)->cms_ereport_detector(hdl, bankno,
634 cms_t *cms = HDL2CMS(hdl);
636 if (CMS_OP_PRESENT(cms, cms_ereport_includestack)) {
637 return (CMS_OPS(cms)->cms_ereport_includestack(hdl, mscookie));
648 cms_t *cms = HDL2CMS(hdl);
650 if (CMS_OP_PRESENT(cms, cms_ereport_add_logout))
651 CMS_OPS(cms)->cms_ereport_add_logout(hdl, nvl, nva, banknum,