]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
AMD IOMMU: fix detection of NP capable IOMMUs
authorJoerg Roedel <joerg.roedel@amd.com>
Thu, 30 Oct 2008 16:43:57 +0000 (17:43 +0100)
committerJoerg Roedel <joerg.roedel@amd.com>
Thu, 30 Oct 2008 16:50:14 +0000 (17:50 +0100)
This patch changes the code to use IOMMU_CAP_NPCACHE as a shift and not
as a mask.

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

index 3b346c6f551491516329b522af166c0b296b3a53..38e88d40ab1091099656cf0c326c5f902d307b86 100644 (file)
@@ -50,7 +50,7 @@ static int dma_ops_unity_map(struct dma_ops_domain *dma_dom,
 /* returns !0 if the IOMMU is caching non-present entries in its TLB */
 static int iommu_has_npcache(struct amd_iommu *iommu)
 {
-       return iommu->cap & IOMMU_CAP_NPCACHE;
+       return iommu->cap & (1UL << IOMMU_CAP_NPCACHE);
 }
 
 /****************************************************************************