@@ -77,3 +77,12 @@ void free_io_pgtable_ops(struct io_pgtable_ops *ops)
io_pgtable_tlb_flush_all(iop);
io_pgtable_init_table[iop->fmt]->free(iop);
}
+
+void io_pgtable_set_non_strict(struct io_pgtable_ops *ops, bool val) {
+ struct io_pgtable *iop = io_pgtable_ops_to_pgtable(ops);
+
+ if (val)
+ iop->cfg.quirks |= IO_PGTABLE_QUIRK_NON_STRICT;
+ else
+ iop->cfg.quirks &= ~IO_PGTABLE_QUIRK_NON_STRICT;
+}
@@ -153,6 +153,7 @@ struct io_pgtable_ops *alloc_io_pgtable_ops(enum io_pgtable_fmt fmt,
*/
void free_io_pgtable_ops(struct io_pgtable_ops *ops);
+void io_pgtable_set_non_strict(struct io_pgtable_ops *ops, bool val);
/*
* Internal structures for page table allocator implementations.
Since this might become a repeated idiom in drivers, let's add a tidy encapsulation from the outset. Signed-off-by: Robin Murphy <robin.murphy@arm.com> --- drivers/iommu/io-pgtable.c | 9 +++++++++ drivers/iommu/io-pgtable.h | 1 + 2 files changed, 10 insertions(+)