From: Joerg Roedel <jroedel@suse.de>
Date: Mon, 21 Dec 2015 15:40:38 +0100
Subject: iommu/amd: Pass correct shift to iommu_area_alloc()
Git-commit: b57c3c802e51e83620b739759c8bba829e231b57
Patch-mainline: v4.5-rc1
References: fate#321026

The page-offset of the aperture must be passed instead of 0.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1704,7 +1704,7 @@ static unsigned long dma_ops_area_alloc(
 
 		spin_lock_irqsave(&dom->aperture[i]->bitmap_lock, flags);
 		address = iommu_area_alloc(dom->aperture[i]->bitmap,
-					   limit, next_bit, pages, 0,
+					   limit, next_bit, pages, offset,
 					    boundary_size, align_mask);
 		spin_unlock_irqrestore(&dom->aperture[i]->bitmap_lock, flags);
 		if (address != -1) {
