mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
intel-iommu: Clean up handling of "caching mode" vs. context flushing.
It really doesn't make a lot of sense to have some of the logic to handle caching vs. non-caching mode duplicated in qi_flush_context() and __iommu_flush_context(), while the return value indicates whether the caller should take other action which depends on the same thing. Especially since qi_flush_context() thought it was returning something entirely different anyway. This patch makes qi_flush_context() and __iommu_flush_context() both return void, removes the 'non_present_entry_flush' argument and makes the only call site which _set_ that argument to 1 do the right thing. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
fa3b6dcd52
commit
4c25a2c1b9
3 changed files with 28 additions and 45 deletions
|
@ -281,8 +281,8 @@ struct ir_table {
|
|||
#endif
|
||||
|
||||
struct iommu_flush {
|
||||
int (*flush_context)(struct intel_iommu *iommu, u16 did, u16 sid, u8 fm,
|
||||
u64 type, int non_present_entry_flush);
|
||||
void (*flush_context)(struct intel_iommu *iommu, u16 did, u16 sid,
|
||||
u8 fm, u64 type);
|
||||
int (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr,
|
||||
unsigned int size_order, u64 type, int non_present_entry_flush);
|
||||
};
|
||||
|
@ -339,8 +339,8 @@ extern void dmar_disable_qi(struct intel_iommu *iommu);
|
|||
extern int dmar_reenable_qi(struct intel_iommu *iommu);
|
||||
extern void qi_global_iec(struct intel_iommu *iommu);
|
||||
|
||||
extern int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid,
|
||||
u8 fm, u64 type, int non_present_entry_flush);
|
||||
extern void qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid,
|
||||
u8 fm, u64 type);
|
||||
extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
|
||||
unsigned int size_order, u64 type,
|
||||
int non_present_entry_flush);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue