aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/intel-iommu.h
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2009-05-10 14:58:49 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-05-10 14:58:49 -0400
commit1f0ef2aa18802a8ce7eb5a5164aaaf4d59073801 (patch)
tree953fd29f1853b0773e9dcd72ab1ecb3231c6b457 /include/linux/intel-iommu.h
parent4c25a2c1b90bf785fc2e2f0f0c74a80b3e070d39 (diff)
intel-iommu: Clean up handling of "caching mode" vs. IOTLB flushing.
As we just did for context cache flushing, clean up the logic around whether we need to flush the iotlb or just the write-buffer, depending on caching mode. Fix the same bug in qi_flush_iotlb() that qi_flush_context() had -- it isn't supposed to be returning an error; it's supposed to be returning a flag which triggers a write-buffer flush. Remove some superfluous conditional write-buffer flushes which could never have happened because they weren't for non-present-to-present mapping changes anyway. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/intel-iommu.h')
-rw-r--r--include/linux/intel-iommu.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index f2b94dafbf38..29e05a034c09 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -283,8 +283,8 @@ struct ir_table {
283struct iommu_flush { 283struct iommu_flush {
284 void (*flush_context)(struct intel_iommu *iommu, u16 did, u16 sid, 284 void (*flush_context)(struct intel_iommu *iommu, u16 did, u16 sid,
285 u8 fm, u64 type); 285 u8 fm, u64 type);
286 int (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr, 286 void (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr,
287 unsigned int size_order, u64 type, int non_present_entry_flush); 287 unsigned int size_order, u64 type);
288}; 288};
289 289
290enum { 290enum {
@@ -341,9 +341,8 @@ extern void qi_global_iec(struct intel_iommu *iommu);
341 341
342extern void qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, 342extern void qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid,
343 u8 fm, u64 type); 343 u8 fm, u64 type);
344extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, 344extern void qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
345 unsigned int size_order, u64 type, 345 unsigned int size_order, u64 type);
346 int non_present_entry_flush);
347 346
348extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); 347extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
349 348