iommu: bcm2712-iommu: Map and unmap multiple pages in a single call#5977
Conversation
|
This is a leftover from #5833. The efficiency improvement is admittedly quite modest; the average Note that There is no change in the "pass-thru" default case (which perhaps should be an error case, as it's never used), which still returns one page at a time. The bug fix in the "off-the-top" error case is needed, I think. |
|
Looks reasonable based on my knowledge of it (ie very limited). |
|
Tested with camera/ISP; I'll do a bit more testing with other Pi 5 blocks then de-draft it. |
|
I'm going to push a tidied-up version that ignores special treatment of the "pass-through" region. |
For efficiency, the map_pages() and unmap_pages() calls now pay attention to their "count" argument. Remove a special case for a "pass-through" address range, which the DMA/IOMMU subsystem isn't told exists and should never use. Fix a bug where we omitted to set *mapped to 0 in error cases. Minor style fixes and tidying. Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
b4d79ec to
694e1f2
Compare
For efficiency, the map_pages() and unmap_pages() calls now pay attention to their "count" argument, at least in successful cases.
Fix a bugette where we omitted to set mapped to 0 in case of error. Minor style fix.