Lines Matching refs:sctns

173 static void fill_hdr(struct sthyi_sctns *sctns)  in fill_hdr()  argument
175 sctns->hdr.infhdln = sizeof(sctns->hdr); in fill_hdr()
176 sctns->hdr.infmoff = sizeof(sctns->hdr); in fill_hdr()
177 sctns->hdr.infmlen = sizeof(sctns->mac); in fill_hdr()
178 sctns->hdr.infplen = sizeof(sctns->par); in fill_hdr()
179 sctns->hdr.infpoff = sctns->hdr.infhdln + sctns->hdr.infmlen; in fill_hdr()
180 sctns->hdr.infhtotl = sctns->hdr.infpoff + sctns->hdr.infplen; in fill_hdr()
183 static void fill_stsi_mac(struct sthyi_sctns *sctns, in fill_stsi_mac() argument
186 sclp_ocf_cpc_name_copy(sctns->mac.infmname); in fill_stsi_mac()
187 if (*(u64 *)sctns->mac.infmname != 0) in fill_stsi_mac()
188 sctns->mac.infmval1 |= MAC_NAME_VLD; in fill_stsi_mac()
193 memcpy(sctns->mac.infmtype, sysinfo->type, sizeof(sctns->mac.infmtype)); in fill_stsi_mac()
194 memcpy(sctns->mac.infmmanu, sysinfo->manufacturer, sizeof(sctns->mac.infmmanu)); in fill_stsi_mac()
195 memcpy(sctns->mac.infmpman, sysinfo->plant, sizeof(sctns->mac.infmpman)); in fill_stsi_mac()
196 memcpy(sctns->mac.infmseq, sysinfo->sequence, sizeof(sctns->mac.infmseq)); in fill_stsi_mac()
198 sctns->mac.infmval1 |= MAC_ID_VLD; in fill_stsi_mac()
201 static void fill_stsi_par(struct sthyi_sctns *sctns, in fill_stsi_par() argument
207 sctns->par.infppnum = sysinfo->lpar_number; in fill_stsi_par()
208 memcpy(sctns->par.infppnam, sysinfo->name, sizeof(sctns->par.infppnam)); in fill_stsi_par()
210 sctns->par.infpval1 |= PAR_ID_VLD; in fill_stsi_par()
213 static void fill_stsi(struct sthyi_sctns *sctns) in fill_stsi() argument
222 fill_stsi_mac(sctns, sysinfo); in fill_stsi()
223 fill_stsi_par(sctns, sysinfo); in fill_stsi()
228 static void fill_diag_mac(struct sthyi_sctns *sctns, in fill_diag_mac() argument
238 sctns->mac.infmdcps++; in fill_diag_mac()
240 sctns->mac.infmscps++; in fill_diag_mac()
244 sctns->mac.infmdifl++; in fill_diag_mac()
246 sctns->mac.infmsifl++; in fill_diag_mac()
250 sctns->mac.infmval1 |= MAC_CNT_VLD; in fill_diag_mac()
333 static bool is_diag204_cached(struct sthyi_sctns *sctns) in is_diag204_cached() argument
339 if (sctns->par.infpval1) in is_diag204_cached()
344 static void fill_diag(struct sthyi_sctns *sctns, void *diag204_buf) in fill_diag() argument
376 sctns->par.infpflg1 = PAR_MT_EN; in fill_diag()
378 sctns->par.infpval1 |= PAR_GRP_VLD; in fill_diag()
379 sctns->par.infplgcp = scale_cap(lpar_inf.cp.lpar_grp_cap); in fill_diag()
380 sctns->par.infplgif = scale_cap(lpar_inf.ifl.lpar_grp_cap); in fill_diag()
381 memcpy(sctns->par.infplgnm, part_block->hdr.hardware_group_name, in fill_diag()
382 sizeof(sctns->par.infplgnm)); in fill_diag()
384 sctns->par.infpscps = lpar_inf.cp.cpu_num_shd; in fill_diag()
385 sctns->par.infpdcps = lpar_inf.cp.cpu_num_ded; in fill_diag()
386 sctns->par.infpsifl = lpar_inf.ifl.cpu_num_shd; in fill_diag()
387 sctns->par.infpdifl = lpar_inf.ifl.cpu_num_ded; in fill_diag()
388 sctns->par.infpval1 |= PAR_PCNT_VLD; in fill_diag()
390 sctns->par.infpabcp = scale_cap(lpar_inf.cp.lpar_cap); in fill_diag()
391 sctns->par.infpabif = scale_cap(lpar_inf.ifl.lpar_cap); in fill_diag()
392 sctns->par.infpval1 |= PAR_ABS_VLD; in fill_diag()
399 sctns->hdr.infhflg1 |= HDR_PERF_UNAV; in fill_diag()
403 fill_diag_mac(sctns, phys_block, diag224_buf); in fill_diag()
406 sctns->par.infpwbcp = sctns->mac.infmscps * 0x10000 * in fill_diag()
411 sctns->par.infpwbif = sctns->mac.infmsifl * 0x10000 * in fill_diag()
414 sctns->par.infpval1 |= PAR_WGHT_VLD; in fill_diag()
441 struct sthyi_sctns *sctns = (struct sthyi_sctns *)dst; in fill_dst() local
456 diag204_buf = diag204_get_data(is_diag204_cached(sctns)); in fill_dst()
460 fill_hdr(sctns); in fill_dst()
461 fill_stsi(sctns); in fill_dst()
462 fill_diag(sctns, diag204_buf); in fill_dst()