Zhen Lei
2da274cdf9
iommu/dma: Add support for non-strict mode
...
With the flush queue infrastructure already abstracted into IOVA
domains, hooking it up in iommu-dma is pretty simple. Since there is a
degree of dependency on the IOMMU driver knowing what to do to play
along, we key the whole thing off a domain attribute which will be set
on default DMA ops domains to request non-strict invalidation. That way,
drivers can indicate the appropriate support by acknowledging the
attribute, and we can easily fall back to strict invalidation otherwise.
The flush queue callback needs a handle on the iommu_domain which owns
our cookie, so we have to add a pointer back to that, but neatly, that's
also sufficient to indicate whether we're using a flush queue or not,
and thus which way to release IOVAs. The only slight subtlety is
switching __iommu_dma_unmap() from calling iommu_unmap() to explicit
iommu_unmap_fast()/iommu_tlb_sync() so that we can elide the sync
entirely in non-strict mode.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com >
[rm: convert to domain attribute, tweak comments and commit message]
Signed-off-by: Robin Murphy <robin.murphy@arm.com >
Signed-off-by: Will Deacon <will.deacon@arm.com >
2018-10-01 13:01:32 +01:00
..
2018-08-02 21:33:25 +02:00
2018-08-18 15:55:59 -07:00
2018-08-05 17:11:49 -07:00
2018-08-10 23:19:17 +02:00
2018-08-22 14:07:56 +02:00
2018-08-09 16:11:21 -04:00
2018-08-03 19:52:14 +05:30
2018-08-23 13:44:43 -07:00
2018-08-16 14:21:29 -06:00
2018-08-11 12:19:35 +02:00
2018-08-08 18:23:49 +02:00
2018-08-24 13:10:38 -07:00
2018-08-09 14:05:30 -07:00
2018-08-22 12:34:08 -07:00
2018-08-23 13:44:43 -07:00
2018-08-14 12:01:08 -07:00
2018-08-09 18:47:47 +03:00
2018-08-23 16:03:58 -07:00
2018-08-18 10:21:49 -07:00
2018-08-22 08:08:27 -07:00
2018-08-22 10:52:46 -07:00
2018-08-22 10:52:46 -07:00
2018-08-17 16:20:27 -07:00
2018-08-01 15:49:40 -07:00
2018-08-22 10:52:48 -07:00
2018-08-11 15:41:25 -06:00
2018-08-14 10:23:25 -07:00
2018-08-09 09:12:26 -06:00
2018-08-02 12:17:27 -06:00
2018-08-11 01:58:46 +02:00
2018-08-03 00:47:32 +02:00
2018-08-13 00:52:45 +02:00
2018-08-07 15:48:38 -07:00
2018-08-02 15:22:13 -06:00
2018-08-13 01:02:39 +02:00
2018-08-17 16:20:32 -07:00
2018-08-14 16:39:13 -07:00
2018-08-23 14:23:08 -07:00
2018-08-22 17:31:34 -07:00
2018-08-22 17:31:34 -07:00
2018-08-22 17:31:34 -07:00
2018-08-22 10:52:47 -07:00
2018-07-31 13:06:57 +02:00
2018-08-14 13:12:24 -07:00
2018-08-23 13:44:43 -07:00
2018-08-13 09:05:05 -07:00
2018-08-22 10:52:46 -07:00
2018-08-22 10:52:48 -07:00
2018-08-21 18:19:09 -07:00
2018-08-18 11:44:53 -07:00
2018-07-31 17:33:21 -04:00
2018-08-17 16:20:32 -07:00
2018-07-31 18:04:55 -05:00
2018-08-25 13:40:38 -07:00
2018-08-17 15:56:23 -07:00
2018-08-23 18:48:43 -07:00
2018-08-17 16:49:31 -07:00
2018-07-31 11:32:27 -04:00
2018-08-23 18:48:43 -07:00
2018-08-02 10:24:51 +02:00
2018-08-20 18:09:06 +02:00
2018-08-25 18:43:59 -07:00
2018-08-23 18:48:44 -07:00
2018-08-02 10:20:59 +02:00
2018-08-24 14:42:45 +02:00
2018-08-26 11:48:42 -07:00
2018-08-15 10:25:26 -07:00
2018-08-22 10:52:47 -07:00
2018-08-08 12:02:27 +02:00
2018-10-01 13:01:32 +01:00
2018-08-22 10:52:52 -07:00
2018-08-10 15:11:25 -04:00
2018-08-16 19:36:55 +02:00
2018-08-17 16:20:30 -07:00
2018-08-26 11:25:21 -07:00
2018-08-22 10:52:46 -07:00
2018-08-18 11:44:53 -07:00
2018-08-22 10:52:44 -07:00
2018-08-24 13:20:33 -07:00
2018-08-17 16:20:32 -07:00
2018-08-10 15:11:25 -04:00
2018-08-15 10:25:26 -07:00
2018-08-02 12:17:28 -06:00
2018-08-22 10:52:45 -07:00
2018-08-22 10:52:45 -07:00
2018-08-17 11:32:50 -07:00
2018-08-25 18:43:59 -07:00
2018-08-22 10:52:44 -07:00
2018-08-22 10:52:45 -07:00
2018-08-22 10:52:48 -07:00
2018-07-31 12:40:22 -07:00
2018-08-10 10:22:22 -07:00
2018-08-03 21:15:09 +02:00
2018-08-23 16:03:58 -07:00
2018-08-09 12:56:39 -04:00
2018-08-13 17:04:23 -04:00
2018-08-09 12:56:39 -04:00
2018-08-17 16:20:29 -07:00
2018-08-22 10:52:45 -07:00
2018-08-08 11:55:45 +02:00
2018-08-03 18:57:15 +05:30
2018-08-23 18:48:44 -07:00
2018-08-08 09:47:26 -06:00
2018-08-17 16:20:28 -07:00
2018-08-23 18:48:43 -07:00
2018-08-15 14:59:03 -05:00
2018-07-31 18:04:55 -05:00
2018-08-22 10:52:47 -07:00
2018-08-22 10:52:45 -07:00
2018-08-09 11:08:19 -07:00
2018-07-31 11:32:27 -04:00
2018-08-14 13:36:15 +02:00
2018-08-22 10:52:46 -07:00
2018-08-03 20:10:54 -05:00
2018-08-02 17:33:06 -04:00
2018-08-09 11:15:06 +01:00
2018-08-01 21:09:50 -04:00
2018-08-02 17:16:05 +02:00
2018-08-22 12:34:08 -07:00
2018-08-15 10:25:26 -07:00
2018-08-02 10:07:09 +02:00
2018-08-20 09:22:45 -07:00
2018-08-22 10:52:43 -07:00
2018-08-22 12:34:08 -07:00
2018-08-13 10:07:23 -07:00
2018-08-17 16:20:30 -07:00
2018-08-16 12:14:42 -07:00
2018-08-09 11:16:28 -07:00
2018-08-06 12:35:20 +02:00
2018-08-22 10:52:44 -07:00
2018-08-23 18:48:44 -07:00
2018-08-14 16:39:13 -07:00
2018-08-18 11:44:53 -07:00
2018-07-31 09:10:26 -06:00
2018-08-01 09:56:10 -07:00
2018-08-22 15:11:35 +02:00
2018-08-14 14:29:31 -07:00
2018-08-22 10:52:47 -07:00
2018-08-13 20:08:33 -04:00
2018-08-23 18:48:44 -07:00
2018-08-16 09:57:20 -07:00
2018-08-11 12:02:18 -07:00
2018-08-17 16:20:32 -07:00