Hi Paul, On 15/09/2020 09:29, Paul Durrant wrote:
From: Paul Durrant <[email protected]>The 'legacy' functions do implicit flushing so amend the callers to do the appropriate flushing. Unfortunately, because of the structure of the P2M code, we cannot remove the per-CPU 'iommu_dont_flush_iotlb' global and the optimization it facilitates. Checking of this flag is now done only in relevant callers of iommu_iotlb_flush(). Also, 'iommu_dont_flush_iotlb' is now declared as bool (rather than bool_t) and setting/clearing it are no longer pointlessly gated on is_iommu_enabled() returning true. (Arguably it is also pointless to gate the call to iommu_iotlb_flush() on that condition - since it is a no-op in that case - but the if clause allows the scope of a stack variable to be restricted). NOTE: The code in memory_add() now sets 'ret' if iommu_map() or iommu_iotlb_flush() fails. Signed-off-by: Paul Durrant <[email protected]>
The changes in common code looks good to me: Acked-by: Julien Grall <[email protected]> Cheers, -- Julien Grall
