From: Joerg Roedel Date: Thu, 30 Oct 2008 16:43:57 +0000 (+0100) Subject: AMD IOMMU: fix detection of NP capable IOMMUs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ae9b9403644f3ecc76867af042e7e1cfd5c099d0;p=linux-beck.git AMD IOMMU: fix detection of NP capable IOMMUs This patch changes the code to use IOMMU_CAP_NPCACHE as a shift and not as a mask. Signed-off-by: Joerg Roedel --- diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 3b346c6f5514..38e88d40ab10 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -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); } /****************************************************************************