blob: a92171528c7bd289bd9b2b8b0556ed3b5fd1947c [file] [log] [blame]
From joerg.roedel@amd.com Mon Jan 12 16:38:59 2009
From: Joerg Roedel <joerg.roedel@amd.com>
Date: Fri, 19 Dec 2008 14:42:14 +0100
Subject: AMD IOMMU: initialize phys_addr correctly in iommu_page_map
To: stable@kernel.org
Cc: Joerg Roedel <joerg.roedel@amd.com>
Message-ID: <1229694135-27157-4-git-send-email-joerg.roedel@amd.com>
From: Joerg Roedel <joerg.roedel@amd.com>
Upstream commit bb9d4ff80bc032d7961815c2ff5eaf458ae3adff
Due to this bug mappings for devices requested by the ACPI table are
incorrect.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/amd_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -235,7 +235,7 @@ static int iommu_map(struct protection_d
u64 __pte, *pte, *page;
bus_addr = PAGE_ALIGN(bus_addr);
- phys_addr = PAGE_ALIGN(bus_addr);
+ phys_addr = PAGE_ALIGN(phys_addr);
/* only support 512GB address spaces for now */
if (bus_addr > IOMMU_MAP_SIZE_L3 || !(prot & IOMMU_PROT_MASK))