Lines Matching refs:psr_cmt
148 struct psr_cmt *__read_mostly psr_cmt; variable
501 psr_cmt = xzalloc(struct psr_cmt); in init_psr_cmt()
502 if ( !psr_cmt ) in init_psr_cmt()
505 psr_cmt->features = edx; in init_psr_cmt()
506 psr_cmt->rmid_max = min(rmid_max, ebx); in init_psr_cmt()
509 if ( psr_cmt->features & PSR_RESOURCE_TYPE_L3 ) in init_psr_cmt()
512 psr_cmt->l3.upscaling_factor = ebx; in init_psr_cmt()
513 psr_cmt->l3.rmid_max = ecx; in init_psr_cmt()
514 psr_cmt->l3.features = edx; in init_psr_cmt()
517 psr_cmt->rmid_max = min(psr_cmt->rmid_max, psr_cmt->l3.rmid_max); in init_psr_cmt()
518 psr_cmt->rmid_to_dom = xmalloc_array(domid_t, psr_cmt->rmid_max + 1UL); in init_psr_cmt()
519 if ( !psr_cmt->rmid_to_dom ) in init_psr_cmt()
521 xfree(psr_cmt); in init_psr_cmt()
522 psr_cmt = NULL; in init_psr_cmt()
531 psr_cmt->rmid_to_dom[0] = DOMID_XEN; in init_psr_cmt()
532 for ( rmid = 1; rmid <= psr_cmt->rmid_max; rmid++ ) in init_psr_cmt()
533 psr_cmt->rmid_to_dom[rmid] = DOMID_INVALID; in init_psr_cmt()
548 for ( rmid = 1; rmid <= psr_cmt->rmid_max; rmid++ ) in psr_alloc_rmid()
550 if ( psr_cmt->rmid_to_dom[rmid] != DOMID_INVALID ) in psr_alloc_rmid()
553 psr_cmt->rmid_to_dom[rmid] = d->domain_id; in psr_alloc_rmid()
558 if ( rmid > psr_cmt->rmid_max ) in psr_alloc_rmid()
579 psr_cmt->rmid_to_dom[rmid] = DOMID_INVALID; in psr_free_rmid()