Commit ae9b9403 authored by Joerg Roedel's avatar Joerg Roedel

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: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 1e19b16a
...@@ -50,7 +50,7 @@ static int dma_ops_unity_map(struct dma_ops_domain *dma_dom, ...@@ -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 */ /* returns !0 if the IOMMU is caching non-present entries in its TLB */
static int iommu_has_npcache(struct amd_iommu *iommu) static int iommu_has_npcache(struct amd_iommu *iommu)
{ {
return iommu->cap & IOMMU_CAP_NPCACHE; return iommu->cap & (1UL << IOMMU_CAP_NPCACHE);
} }
/**************************************************************************** /****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment