mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 17:28:56 +00:00
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>
This commit is contained in:
parent
cb41ed85ef
commit
60f723b411
@ -250,6 +250,8 @@ extern bool amd_iommu_dump;
|
|||||||
|
|
||||||
/* global flag if IOMMUs cache non-present entries */
|
/* global flag if IOMMUs cache non-present entries */
|
||||||
extern bool amd_iommu_np_cache;
|
extern bool amd_iommu_np_cache;
|
||||||
|
/* Only true if all IOMMUs support device IOTLBs */
|
||||||
|
extern bool amd_iommu_iotlb_sup;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make iterating over all IOMMUs easier
|
* Make iterating over all IOMMUs easier
|
||||||
|
@ -137,6 +137,7 @@ int amd_iommus_present;
|
|||||||
|
|
||||||
/* IOMMUs have a non-present cache? */
|
/* IOMMUs have a non-present cache? */
|
||||||
bool amd_iommu_np_cache __read_mostly;
|
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
|
* 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));
|
MMIO_GET_LD(range));
|
||||||
iommu->evt_msi_num = MMIO_MSI_NUM(misc);
|
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))
|
if (!is_rd890_iommu(iommu->dev))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user