Commit 5c87cff
iommu: generalize the batched sync after map interface
For the upcoming IOVA-based DMA API we want to batch the
ops->iotlb_sync_map() call after mapping multiple IOVAs from
dma-iommu without having a scatterlist. Improve the API.
Add a wrapper for the map_sync as iommu_sync_map() so that callers
don't need to poke into the methods directly.
Formalize __iommu_map() into iommu_map_nosync() which requires the
caller to call iommu_sync_map() after all maps are completed.
Refactor the existing sanity checks from all the different layers
into iommu_map_nosync().
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Will Deacon <will@kernel.org>
Tested-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>1 parent ca2c2e4 commit 5c87cff
2 files changed
+33
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2440 | 2440 | | |
2441 | 2441 | | |
2442 | 2442 | | |
2443 | | - | |
2444 | | - | |
| 2443 | + | |
| 2444 | + | |
2445 | 2445 | | |
2446 | 2446 | | |
2447 | 2447 | | |
| |||
2450 | 2450 | | |
2451 | 2451 | | |
2452 | 2452 | | |
| 2453 | + | |
| 2454 | + | |
2453 | 2455 | | |
2454 | 2456 | | |
2455 | 2457 | | |
2456 | 2458 | | |
2457 | 2459 | | |
2458 | 2460 | | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
2459 | 2466 | | |
2460 | 2467 | | |
2461 | 2468 | | |
| |||
2503 | 2510 | | |
2504 | 2511 | | |
2505 | 2512 | | |
2506 | | - | |
2507 | | - | |
| 2513 | + | |
2508 | 2514 | | |
2509 | 2515 | | |
2510 | | - | |
2511 | | - | |
2512 | | - | |
2513 | 2516 | | |
2514 | | - | |
2515 | | - | |
2516 | | - | |
2517 | | - | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
2518 | 2521 | | |
2519 | | - | |
2520 | | - | |
2521 | | - | |
2522 | | - | |
2523 | | - | |
2524 | | - | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
2525 | 2526 | | |
2526 | | - | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
2527 | 2530 | | |
2528 | | - | |
2529 | | - | |
2530 | | - | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
2531 | 2534 | | |
2532 | 2535 | | |
2533 | 2536 | | |
| |||
2627 | 2630 | | |
2628 | 2631 | | |
2629 | 2632 | | |
2630 | | - | |
2631 | 2633 | | |
2632 | 2634 | | |
2633 | 2635 | | |
2634 | 2636 | | |
2635 | 2637 | | |
2636 | | - | |
2637 | | - | |
2638 | | - | |
2639 | | - | |
2640 | | - | |
2641 | | - | |
2642 | | - | |
2643 | 2638 | | |
2644 | 2639 | | |
2645 | 2640 | | |
2646 | 2641 | | |
2647 | | - | |
| 2642 | + | |
2648 | 2643 | | |
2649 | | - | |
2650 | 2644 | | |
2651 | 2645 | | |
2652 | 2646 | | |
| |||
2669 | 2663 | | |
2670 | 2664 | | |
2671 | 2665 | | |
2672 | | - | |
2673 | | - | |
2674 | | - | |
2675 | | - | |
2676 | | - | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
2677 | 2670 | | |
2678 | 2671 | | |
2679 | 2672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
875 | 879 | | |
876 | 880 | | |
877 | 881 | | |
| |||
0 commit comments