io-pgtable-fast: Implement the map_pages() callback
Implement the map_pages() callback for fastmap. Change-Id: Icce8f827a52f08f64967aa86c64145d243754d69 Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
@ -271,6 +271,18 @@ int av8l_fast_map_public(struct io_pgtable_ops *ops, unsigned long iova,
|
||||
return av8l_fast_map(ops, iova, paddr, size, prot, GFP_ATOMIC);
|
||||
}
|
||||
|
||||
static int av8l_fast_map_pages(struct io_pgtable_ops *ops, unsigned long iova,
|
||||
phys_addr_t paddr, size_t pgsize, size_t pgcount,
|
||||
int prot, gfp_t gfp, size_t *mapped)
|
||||
{
|
||||
int ret = av8l_fast_map(ops, iova, paddr, pgsize * pgcount, prot, gfp);
|
||||
|
||||
if (!ret)
|
||||
*mapped = pgsize * pgcount;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static size_t
|
||||
__av8l_fast_unmap(struct io_pgtable_ops *ops, unsigned long iova,
|
||||
size_t size, bool allow_stale_tlb)
|
||||
@ -413,6 +425,7 @@ av8l_fast_alloc_pgtable_data(struct io_pgtable_cfg *cfg)
|
||||
|
||||
data->iop.ops = (struct io_pgtable_ops) {
|
||||
.map = av8l_fast_map,
|
||||
.map_pages = av8l_fast_map_pages,
|
||||
.map_sg = av8l_fast_map_sg,
|
||||
.unmap = av8l_fast_unmap,
|
||||
.unmap_pages = av8l_fast_unmap_pages,
|
||||
|
Reference in New Issue
Block a user