Skip to content

Commit a871765

Browse files
Christoph Hellwigjoergroedel
authored andcommitted
iommu: remove iommu_dev_feature_enabled
Remove the unused iommu_dev_feature_enabled function. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Link: https://lore.kernel.org/r/20220708080616.238833-3-hch@lst.de Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 309c56e commit a871765

3 files changed

Lines changed: 0 additions & 23 deletions

File tree

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2853,7 +2853,6 @@ static struct iommu_ops arm_smmu_ops = {
28532853
.of_xlate = arm_smmu_of_xlate,
28542854
.get_resv_regions = arm_smmu_get_resv_regions,
28552855
.put_resv_regions = generic_iommu_put_resv_regions,
2856-
.dev_feat_enabled = arm_smmu_dev_feature_enabled,
28572856
.dev_enable_feat = arm_smmu_dev_enable_feature,
28582857
.dev_disable_feat = arm_smmu_dev_disable_feature,
28592858
.sva_bind = arm_smmu_sva_bind,

drivers/iommu/iommu.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2760,19 +2760,6 @@ int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features feat)
27602760
}
27612761
EXPORT_SYMBOL_GPL(iommu_dev_disable_feature);
27622762

2763-
bool iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features feat)
2764-
{
2765-
if (dev->iommu && dev->iommu->iommu_dev) {
2766-
const struct iommu_ops *ops = dev->iommu->iommu_dev->ops;
2767-
2768-
if (ops->dev_feat_enabled)
2769-
return ops->dev_feat_enabled(dev, feat);
2770-
}
2771-
2772-
return false;
2773-
}
2774-
EXPORT_SYMBOL_GPL(iommu_dev_feature_enabled);
2775-
27762763
/**
27772764
* iommu_sva_bind_device() - Bind a process address space to a device
27782765
* @dev: the device

include/linux/iommu.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ struct iommu_iotlb_gather {
215215
* driver init to device driver init (default no)
216216
* @dev_has/enable/disable_feat: per device entries to check/enable/disable
217217
* iommu specific features.
218-
* @dev_feat_enabled: check enabled feature
219218
* @sva_bind: Bind process address space to device
220219
* @sva_unbind: Unbind process address space from device
221220
* @sva_get_pasid: Get PASID associated to a SVA handle
@@ -247,7 +246,6 @@ struct iommu_ops {
247246
bool (*is_attach_deferred)(struct device *dev);
248247

249248
/* Per device IOMMU features */
250-
bool (*dev_feat_enabled)(struct device *dev, enum iommu_dev_features f);
251249
int (*dev_enable_feat)(struct device *dev, enum iommu_dev_features f);
252250
int (*dev_disable_feat)(struct device *dev, enum iommu_dev_features f);
253251

@@ -670,7 +668,6 @@ void iommu_release_device(struct device *dev);
670668

671669
int iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features f);
672670
int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features f);
673-
bool iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features f);
674671

675672
struct iommu_sva *iommu_sva_bind_device(struct device *dev,
676673
struct mm_struct *mm,
@@ -997,12 +994,6 @@ const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode)
997994
return NULL;
998995
}
999996

1000-
static inline bool
1001-
iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features feat)
1002-
{
1003-
return false;
1004-
}
1005-
1006997
static inline int
1007998
iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features feat)
1008999
{

0 commit comments

Comments
 (0)