Lines Matching refs:rc

149     int rc;  in libxl_psr_cmt_attach()  local
151 rc = xc_psr_cmt_attach(ctx->xch, domid); in libxl_psr_cmt_attach()
152 if (rc < 0) { in libxl_psr_cmt_attach()
154 rc = ERROR_FAIL; in libxl_psr_cmt_attach()
158 return rc; in libxl_psr_cmt_attach()
164 int rc; in libxl_psr_cmt_detach() local
166 rc = xc_psr_cmt_detach(ctx->xch, domid); in libxl_psr_cmt_detach()
167 if (rc < 0) { in libxl_psr_cmt_detach()
169 rc = ERROR_FAIL; in libxl_psr_cmt_detach()
173 return rc; in libxl_psr_cmt_detach()
178 int rc; in libxl_psr_cmt_domain_attached() local
181 rc = xc_psr_cmt_get_domain_rmid(ctx->xch, domid, &rmid); in libxl_psr_cmt_domain_attached()
182 if (rc < 0) in libxl_psr_cmt_domain_attached()
196 int rc; in libxl_psr_cmt_get_total_rmid() local
198 rc = xc_psr_cmt_get_total_rmid(ctx->xch, total_rmid); in libxl_psr_cmt_get_total_rmid()
199 if (rc < 0) { in libxl_psr_cmt_get_total_rmid()
201 rc = ERROR_FAIL; in libxl_psr_cmt_get_total_rmid()
205 return rc; in libxl_psr_cmt_get_total_rmid()
214 int rc; in libxl_psr_cmt_get_l3_cache_size() local
219 rc = ERROR_FAIL; in libxl_psr_cmt_get_l3_cache_size()
223 rc = xc_psr_cmt_get_l3_cache_size(ctx->xch, cpu, l3_cache_size); in libxl_psr_cmt_get_l3_cache_size()
224 if (rc < 0) { in libxl_psr_cmt_get_l3_cache_size()
226 rc = ERROR_FAIL; in libxl_psr_cmt_get_l3_cache_size()
231 return rc; in libxl_psr_cmt_get_l3_cache_size()
238 int rc; in libxl_psr_cmt_type_supported() local
240 rc = xc_psr_cmt_get_l3_event_mask(ctx->xch, &event_mask); in libxl_psr_cmt_type_supported()
241 if (rc < 0) { in libxl_psr_cmt_type_supported()
243 rc = 0; in libxl_psr_cmt_type_supported()
245 rc = event_mask & (1 << (type - 1)); in libxl_psr_cmt_type_supported()
249 return rc; in libxl_psr_cmt_type_supported()
263 int cpu, rc; in libxl_psr_cmt_get_sample() local
265 rc = xc_psr_cmt_get_domain_rmid(ctx->xch, domid, &rmid); in libxl_psr_cmt_get_sample()
266 if (rc < 0 || rmid == 0) { in libxl_psr_cmt_get_sample()
269 rc = ERROR_FAIL; in libxl_psr_cmt_get_sample()
276 rc = ERROR_FAIL; in libxl_psr_cmt_get_sample()
280 rc = xc_psr_cmt_get_data(ctx->xch, rmid, cpu, type - 1, in libxl_psr_cmt_get_sample()
282 if (rc < 0) { in libxl_psr_cmt_get_sample()
284 rc = ERROR_FAIL; in libxl_psr_cmt_get_sample()
288 rc = xc_psr_cmt_get_l3_upscaling_factor(ctx->xch, &upscaling_factor); in libxl_psr_cmt_get_sample()
289 if (rc < 0) { in libxl_psr_cmt_get_sample()
291 rc = ERROR_FAIL; in libxl_psr_cmt_get_sample()
298 return rc; in libxl_psr_cmt_get_sample()
307 int rc; in libxl_psr_cmt_get_cache_occupancy() local
309 rc = libxl_psr_cmt_get_sample(ctx, domid, in libxl_psr_cmt_get_cache_occupancy()
312 if (rc < 0) in libxl_psr_cmt_get_cache_occupancy()
317 return rc; in libxl_psr_cmt_get_cache_occupancy()
382 int rc; in libxl_psr_cat_get_info() local
387 rc = libxl_psr_get_hw_info(ctx, LIBXL_PSR_FEAT_TYPE_CAT, lvl, nr, &hw_info); in libxl_psr_cat_get_info()
388 if (rc) in libxl_psr_cat_get_info()
402 return rc; in libxl_psr_cat_get_info()
408 int rc; in libxl_psr_cat_get_l3_info() local
411 rc = libxl_psr_cat_get_info(ctx, info, &num, 3); in libxl_psr_cat_get_l3_info()
412 if (!rc) in libxl_psr_cat_get_l3_info()
415 return rc; in libxl_psr_cat_get_l3_info()
432 int rc, socketid, nr_sockets; in libxl_psr_set_val() local
435 rc = libxl__count_physical_sockets(gc, &nr_sockets); in libxl_psr_set_val()
436 if (rc) { in libxl_psr_set_val()
448 rc = ERROR_FAIL; in libxl_psr_set_val()
454 return rc; in libxl_psr_set_val()
462 int rc = 0; in libxl_psr_get_val() local
468 rc = ERROR_FAIL; in libxl_psr_get_val()
472 return rc; in libxl_psr_get_val()
500 int rc, nr_sockets; in libxl_psr_get_hw_info() local
511 rc = libxl__count_physical_sockets(gc, &nr_sockets); in libxl_psr_get_hw_info()
512 if (rc) { in libxl_psr_get_hw_info()
518 rc = libxl_get_online_socketmap(ctx, &socketmap); in libxl_psr_get_hw_info()
519 if (rc) { in libxl_psr_get_hw_info()
529 rc = ERROR_FAIL; in libxl_psr_get_hw_info()
544 return rc; in libxl_psr_get_hw_info()