Lines Matching refs:csp
129 sbd_fill_cpu_stat(sbd_cpu_unit_t *cp, dev_info_t *dip, sbd_cpu_stat_t *csp) in sbd_fill_cpu_stat() argument
133 bzero((caddr_t)csp, sizeof (*csp)); in sbd_fill_cpu_stat()
134 csp->cs_type = cp->sbc_cm.sbdev_type; in sbd_fill_cpu_stat()
135 csp->cs_unit = cp->sbc_cm.sbdev_unum; in sbd_fill_cpu_stat()
136 namelen = sizeof (csp->cs_name); in sbd_fill_cpu_stat()
138 OBP_DEVICETYPE, (caddr_t)csp->cs_name, &namelen); in sbd_fill_cpu_stat()
139 csp->cs_busy = cp->sbc_cm.sbdev_busy; in sbd_fill_cpu_stat()
140 csp->cs_time = cp->sbc_cm.sbdev_time; in sbd_fill_cpu_stat()
141 csp->cs_ostate = cp->sbc_cm.sbdev_ostate; in sbd_fill_cpu_stat()
142 csp->cs_cpuid = cp->sbc_cpu_id; in sbd_fill_cpu_stat()
143 csp->cs_suspend = 0; in sbd_fill_cpu_stat()
149 if (csp->cs_cond != SBD_COND_UNUSABLE) in sbd_fill_cpu_stat()
150 csp->cs_cond = sbd_get_comp_cond(dip); in sbd_fill_cpu_stat()
160 csp->cs_speed = cp->sbc_speed; in sbd_fill_cpu_stat()
161 csp->cs_ecache = cp->sbc_ecache; in sbd_fill_cpu_stat()
165 sbd_fill_cmp_stat(sbd_cpu_stat_t *csp, int ncores, int impl, in sbd_fill_cmp_stat() argument
170 ASSERT(csp && psp && (ncores >= 1)); in sbd_fill_cmp_stat()
179 psp->ps_unit = SBD_CMP_NUM(csp->cs_unit); in sbd_fill_cmp_stat()
180 (void) strncpy(psp->ps_name, csp->cs_name, sizeof (psp->ps_name)); in sbd_fill_cmp_stat()
181 psp->ps_cond = csp->cs_cond; in sbd_fill_cmp_stat()
182 psp->ps_busy = csp->cs_busy; in sbd_fill_cmp_stat()
183 psp->ps_time = csp->cs_time; in sbd_fill_cmp_stat()
184 psp->ps_ostate = csp->cs_ostate; in sbd_fill_cmp_stat()
185 psp->ps_suspend = csp->cs_suspend; in sbd_fill_cmp_stat()
188 *psp->ps_cpuid = csp->cs_cpuid; in sbd_fill_cmp_stat()
190 psp->ps_speed = csp->cs_speed; in sbd_fill_cmp_stat()
191 psp->ps_ecache = csp->cs_ecache; in sbd_fill_cmp_stat()
204 ASSERT(psp->ps_unit == SBD_CMP_NUM(csp[core].cs_unit)); in sbd_fill_cmp_stat()
205 ASSERT(psp->ps_speed == csp[core].cs_speed); in sbd_fill_cmp_stat()
207 psp->ps_cpuid[core] = csp[core].cs_cpuid; in sbd_fill_cmp_stat()
216 psp->ps_ecache += csp[core].cs_ecache; in sbd_fill_cmp_stat()
220 if (csp[core].cs_time > psp->ps_time) { in sbd_fill_cmp_stat()
221 psp->ps_time = csp[core].cs_time; in sbd_fill_cmp_stat()
224 psp->ps_busy |= csp[core].cs_busy; in sbd_fill_cmp_stat()
230 if (csp[core].cs_ostate == SBD_STAT_CONFIGURED) { in sbd_fill_cmp_stat()
231 psp->ps_ostate = csp[core].cs_ostate; in sbd_fill_cmp_stat()