MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dmar_ctx_alloc

Function dmar_ctx_alloc

freebsd/x86/iommu/intel_ctx.c:440–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440static struct dmar_ctx *
441dmar_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
454static void
455dmar_ctx_link(struct dmar_ctx *ctx)

Callers 1

dmar_get_ctx_for_dev1Function · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected