| 438 | } |
| 439 | |
| 440 | static struct dmar_ctx * |
| 441 | dmar_ctx_alloc(struct dmar_domain *domain, uint16_t rid) |
| 442 | { |
| 443 | struct dmar_ctx *ctx; |
| 444 | |
| 445 | ctx = malloc(sizeof(*ctx), M_DMAR_CTX, M_WAITOK | M_ZERO); |
| 446 | ctx->context.domain = DOM2IODOM(domain); |
| 447 | ctx->context.tag = malloc(sizeof(struct bus_dma_tag_iommu), |
| 448 | M_DMAR_CTX, M_WAITOK | M_ZERO); |
| 449 | ctx->context.rid = rid; |
| 450 | ctx->refs = 1; |
| 451 | return (ctx); |
| 452 | } |
| 453 | |
| 454 | static void |
| 455 | dmar_ctx_link(struct dmar_ctx *ctx) |
no test coverage detected