[PATCH v5 2/6] iommu/iova: Optimise the padding calculation

2017-09-21 Thread Robin Murphy
From: Zhen Lei The mask for calculating the padding size doesn't change, so there's no need to recalculate it every loop iteration. Furthermore, Once we've done that, it becomes clear that we don't actually need to calculate a padding size at all - by flipping the

[PATCH v5 2/6] iommu/iova: Optimise the padding calculation

2017-09-21 Thread Robin Murphy
From: Zhen Lei The mask for calculating the padding size doesn't change, so there's no need to recalculate it every loop iteration. Furthermore, Once we've done that, it becomes clear that we don't actually need to calculate a padding size at all - by flipping the arithmetic around, we can just