Lines Matching defs:csp
656 dr_fill_cpu_stat(dr_cpu_unit_t *cp, drmach_status_t *pstat, sbd_cpu_stat_t *csp)
658 ASSERT(cp && pstat && csp);
661 bzero((caddr_t)csp, sizeof (*csp));
662 csp->cs_type = cp->sbc_cm.sbdev_type;
663 csp->cs_unit = cp->sbc_cm.sbdev_unum;
664 (void) strncpy(csp->cs_name, pstat->type, sizeof (csp->cs_name));
665 csp->cs_cond = cp->sbc_cm.sbdev_cond;
666 csp->cs_busy = cp->sbc_cm.sbdev_busy | pstat->busy;
667 csp->cs_time = cp->sbc_cm.sbdev_time;
668 csp->cs_ostate = cp->sbc_cm.sbdev_ostate;
669 csp->cs_suspend = 0;
672 csp->cs_cpuid = cp->sbc_cpu_id;
675 csp->cs_isbootproc = (SIGBCPU->cpu_id == cp->sbc_cpu_id) ? 1 : 0;
686 csp->cs_speed = cp->sbc_speed;
687 csp->cs_ecache = cp->sbc_ecache;
690 if (!cpu_get(csp->cs_cpuid)) {
692 csp->cs_cm.c_ostate = SBD_STAT_UNCONFIGURED;
698 dr_fill_cmp_stat(sbd_cpu_stat_t *csp, int ncores, int impl, sbd_cmp_stat_t *psp)
702 ASSERT(csp && psp && (ncores >= 1));
711 psp->ps_unit = DR_UNUM2SBD_UNUM(csp->cs_unit, SBD_COMP_CMP);
712 (void) strncpy(psp->ps_name, csp->cs_name, sizeof (psp->ps_name));
713 psp->ps_cond = csp->cs_cond;
714 psp->ps_busy = csp->cs_busy;
715 psp->ps_time = csp->cs_time;
716 psp->ps_ostate = csp->cs_ostate;
717 psp->ps_suspend = csp->cs_suspend;
720 *psp->ps_cpuid = csp->cs_cpuid;
722 psp->ps_speed = csp->cs_speed;
723 psp->ps_ecache = csp->cs_ecache;
736 ASSERT(psp->ps_unit == DR_UNUM2SBD_UNUM(csp[core].cs_unit,
738 ASSERT(psp->ps_speed == csp[core].cs_speed);
740 psp->ps_cpuid[core] = csp[core].cs_cpuid;
749 psp->ps_ecache += csp[core].cs_ecache;
753 if (csp[core].cs_time > psp->ps_time) {
754 psp->ps_time = csp[core].cs_time;
757 psp->ps_busy |= csp[core].cs_busy;
763 if (csp[core].cs_ostate == SBD_STAT_CONFIGURED) {
764 psp->ps_ostate = csp[core].cs_ostate;