aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/amd_iommu_init.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-04-05 12:50:24 +0200
committerJoerg Roedel <joerg.roedel@amd.com>2011-04-11 09:04:03 +0200
commit60f723b4117507c05c8b0b5c8b98ecc12a76878e (patch)
treefb176152997ad9e92ba5e50b27e9bb7e53767b63 /arch/x86/kernel/amd_iommu_init.c
parentx86/amd-iommu: Flush device IOTLB if ATS is enabled (diff)
downloadlinux-dev-60f723b4117507c05c8b0b5c8b98ecc12a76878e.tar.xz
linux-dev-60f723b4117507c05c8b0b5c8b98ecc12a76878e.zip
x86/amd-iommu: Add flag to indicate IOTLB support
This patch adds a flag to the AMD IOMMU driver to indicate that all IOMMUs present in the system support device IOTLBs. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu_init.c')
-rw-r--r--arch/x86/kernel/amd_iommu_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index 8848dda808e2..b6c634f3dc07 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -137,6 +137,7 @@ int amd_iommus_present;
/* IOMMUs have a non-present cache? */
bool amd_iommu_np_cache __read_mostly;
+bool amd_iommu_iotlb_sup __read_mostly = true;
/*
* The ACPI table parsing functions set this variable on an error
@@ -673,6 +674,9 @@ static void __init init_iommu_from_pci(struct amd_iommu *iommu)
MMIO_GET_LD(range));
iommu->evt_msi_num = MMIO_MSI_NUM(misc);
+ if (!(iommu->cap & (1 << IOMMU_CAP_IOTLB)))
+ amd_iommu_iotlb_sup = false;
+
if (!is_rd890_iommu(iommu->dev))
return;