staticint check_custom_allocator(enum io_pgtable_fmt fmt, struct io_pgtable_cfg *cfg)
{ /* No custom allocator, no need to check the format. */ if (!cfg->alloc && !cfg->free) return 0;
/* When passing a custom allocator, both the alloc and free * functions should be provided.
*/ if (!cfg->alloc || !cfg->free) return -EINVAL;
/* Make sure the format supports custom allocators. */ if (io_pgtable_init_table[fmt]->caps & IO_PGTABLE_CAP_CUSTOM_ALLOCATOR) return 0;
/* * It is the IOMMU driver's responsibility to ensure that the page table * is no longer accessible to the walker by this point.
*/ void free_io_pgtable_ops(struct io_pgtable_ops *ops)
{ struct io_pgtable *iop;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.