]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
AMD IOMMU: fix WARN_ON in dma_ops unmap path
authorJoerg Roedel <joerg.roedel@amd.com>
Mon, 8 Dec 2008 13:37:20 +0000 (14:37 +0100)
committerJoerg Roedel <joerg.roedel@amd.com>
Mon, 8 Dec 2008 13:58:46 +0000 (14:58 +0100)
Impact: minor fix

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
arch/x86/kernel/amd_iommu.c

index 2fde073b6be6545d76604461d7ab39db3450aa64..3133a0ea09ff021196309d76dc7c6a6f0b1293b8 100644 (file)
@@ -910,7 +910,7 @@ static void dma_ops_domain_unmap(struct amd_iommu *iommu,
        if (address >= dom->aperture_size)
                return;
 
-       WARN_ON(address & 0xfffULL || address > dom->aperture_size);
+       WARN_ON(address & ~PAGE_MASK || address >= dom->aperture_size);
 
        pte  = dom->pte_pages[IOMMU_PTE_L1_INDEX(address)];
        pte += IOMMU_PTE_L0_INDEX(address);