diff options
| author | Joerg Roedel <joerg.roedel@amd.com> | 2011-04-05 06:50:24 -0400 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2011-04-11 03:04:03 -0400 |
| commit | 60f723b4117507c05c8b0b5c8b98ecc12a76878e (patch) | |
| tree | fb176152997ad9e92ba5e50b27e9bb7e53767b63 /arch | |
| parent | cb41ed85efa01e633388314c03a4f3004c6b783b (diff) | |
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')
| -rw-r--r-- | arch/x86/include/asm/amd_iommu_types.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h index f5d184e7d5be..cb811c965548 100644 --- a/arch/x86/include/asm/amd_iommu_types.h +++ b/arch/x86/include/asm/amd_iommu_types.h | |||
| @@ -250,6 +250,8 @@ extern bool amd_iommu_dump; | |||
| 250 | 250 | ||
| 251 | /* global flag if IOMMUs cache non-present entries */ | 251 | /* global flag if IOMMUs cache non-present entries */ |
| 252 | extern bool amd_iommu_np_cache; | 252 | extern bool amd_iommu_np_cache; |
| 253 | /* Only true if all IOMMUs support device IOTLBs */ | ||
| 254 | extern bool amd_iommu_iotlb_sup; | ||
| 253 | 255 | ||
| 254 | /* | 256 | /* |
| 255 | * Make iterating over all IOMMUs easier | 257 | * Make iterating over all IOMMUs easier |
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; | |||
| 137 | 137 | ||
| 138 | /* IOMMUs have a non-present cache? */ | 138 | /* IOMMUs have a non-present cache? */ |
| 139 | bool amd_iommu_np_cache __read_mostly; | 139 | bool amd_iommu_np_cache __read_mostly; |
| 140 | bool amd_iommu_iotlb_sup __read_mostly = true; | ||
| 140 | 141 | ||
| 141 | /* | 142 | /* |
| 142 | * The ACPI table parsing functions set this variable on an error | 143 | * 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) | |||
| 673 | MMIO_GET_LD(range)); | 674 | MMIO_GET_LD(range)); |
| 674 | iommu->evt_msi_num = MMIO_MSI_NUM(misc); | 675 | iommu->evt_msi_num = MMIO_MSI_NUM(misc); |
| 675 | 676 | ||
| 677 | if (!(iommu->cap & (1 << IOMMU_CAP_IOTLB))) | ||
| 678 | amd_iommu_iotlb_sup = false; | ||
| 679 | |||
| 676 | if (!is_rd890_iommu(iommu->dev)) | 680 | if (!is_rd890_iommu(iommu->dev)) |
| 677 | return; | 681 | return; |
| 678 | 682 | ||
