Lines Matching refs:refs

161 	KASSERT(domain->refs == 0,  in amdiommu_domain_destroy()
162 ("destroying dom %p with refs %d", domain, domain->refs)); in amdiommu_domain_destroy()
284 ctx->context.refs = 1; in amdiommu_ctx_alloc()
295 KASSERT(domain->refs >= domain->ctx_cnt, in amdiommu_ctx_link()
296 ("dom %p ref underflow %d %d", domain, domain->refs, in amdiommu_ctx_link()
298 domain->refs++; in amdiommu_ctx_link()
310 KASSERT(domain->refs > 0, in amdiommu_ctx_unlink()
311 ("domain %p ctx dtr refs %d", domain, domain->refs)); in amdiommu_ctx_unlink()
312 KASSERT(domain->ctx_cnt >= domain->refs, in amdiommu_ctx_unlink()
314 domain->refs, domain->ctx_cnt)); in amdiommu_ctx_unlink()
315 domain->refs--; in amdiommu_ctx_unlink()
361 KASSERT(ctx->context.refs >= 1, in amdiommu_free_ctx_locked()
362 ("amdiommu %p ctx %p refs %u", unit, ctx, ctx->context.refs)); in amdiommu_free_ctx_locked()
368 if (ctx->context.refs > 1) { in amdiommu_free_ctx_locked()
369 ctx->context.refs--; in amdiommu_free_ctx_locked()
406 KASSERT(domain->refs >= 1, in amdiommu_unref_domain_locked()
408 domain->refs)); in amdiommu_unref_domain_locked()
409 KASSERT(domain->refs > domain->ctx_cnt, in amdiommu_unref_domain_locked()
411 domain, domain->refs, domain->ctx_cnt)); in amdiommu_unref_domain_locked()
413 if (domain->refs > 1) { in amdiommu_unref_domain_locked()
414 domain->refs--; in amdiommu_unref_domain_locked()
575 ctx->context.refs++; /* tag referenced us */ in amdiommu_get_ctx_for_dev()
581 ctx->context.refs++; /* tag referenced us */ in amdiommu_get_ctx_for_dev()