aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dma_remapping.h8
-rw-r--r--include/linux/intel-iommu.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
index 1a455f1f86d7..e0a03aff63d9 100644
--- a/include/linux/dma_remapping.h
+++ b/include/linux/dma_remapping.h
@@ -13,6 +13,9 @@
13#define DMA_PTE_WRITE (2) 13#define DMA_PTE_WRITE (2)
14#define DMA_PTE_SNP (1 << 11) 14#define DMA_PTE_SNP (1 << 11)
15 15
16#define CONTEXT_TT_MULTI_LEVEL 0
17#define CONTEXT_TT_PASS_THROUGH 2
18
16struct intel_iommu; 19struct intel_iommu;
17struct dmar_domain; 20struct dmar_domain;
18struct root_entry; 21struct root_entry;
@@ -21,11 +24,16 @@ extern void free_dmar_iommu(struct intel_iommu *iommu);
21 24
22#ifdef CONFIG_DMAR 25#ifdef CONFIG_DMAR
23extern int iommu_calculate_agaw(struct intel_iommu *iommu); 26extern int iommu_calculate_agaw(struct intel_iommu *iommu);
27extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
24#else 28#else
25static inline int iommu_calculate_agaw(struct intel_iommu *iommu) 29static inline int iommu_calculate_agaw(struct intel_iommu *iommu)
26{ 30{
27 return 0; 31 return 0;
28} 32}
33static inline int iommu_calculate_max_sagaw(struct intel_iommu *iommu)
34{
35 return 0;
36}
29#endif 37#endif
30 38
31extern int dmar_disabled; 39extern int dmar_disabled;
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index aa8c53171233..7246971a7feb 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -120,6 +120,7 @@ static inline void dmar_writeq(void __iomem *addr, u64 val)
120 (ecap_iotlb_offset(e) + ecap_niotlb_iunits(e) * 16) 120 (ecap_iotlb_offset(e) + ecap_niotlb_iunits(e) * 16)
121#define ecap_coherent(e) ((e) & 0x1) 121#define ecap_coherent(e) ((e) & 0x1)
122#define ecap_qis(e) ((e) & 0x2) 122#define ecap_qis(e) ((e) & 0x2)
123#define ecap_pass_through(e) ((e >> 6) & 0x1)
123#define ecap_eim_support(e) ((e >> 4) & 0x1) 124#define ecap_eim_support(e) ((e >> 4) & 0x1)
124#define ecap_ir_support(e) ((e >> 3) & 0x1) 125#define ecap_ir_support(e) ((e >> 3) & 0x1)
125#define ecap_max_handle_mask(e) ((e >> 20) & 0xf) 126#define ecap_max_handle_mask(e) ((e >> 20) & 0xf)
@@ -302,6 +303,7 @@ struct intel_iommu {
302 spinlock_t register_lock; /* protect register handling */ 303 spinlock_t register_lock; /* protect register handling */
303 int seq_id; /* sequence id of the iommu */ 304 int seq_id; /* sequence id of the iommu */
304 int agaw; /* agaw of this iommu */ 305 int agaw; /* agaw of this iommu */
306 int msagaw; /* max sagaw of this iommu */
305 unsigned int irq; 307 unsigned int irq;
306 unsigned char name[13]; /* Device Name */ 308 unsigned char name[13]; /* Device Name */
307 309