Commit 114a6f50 authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel

iommu: Remove trivial ops->capable implementations

Implementing ops->capable to always return false is pointless since it's
the default behaviour anyway. Clean up the unnecessary implementations.
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Reviewed-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/8413578c6f8a7cf75530b00cba8f10f5b88f8517.1644495614.git.robin.murphy@arm.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 754e0b0e
...@@ -558,11 +558,6 @@ static phys_addr_t msm_iommu_iova_to_phys(struct iommu_domain *domain, ...@@ -558,11 +558,6 @@ static phys_addr_t msm_iommu_iova_to_phys(struct iommu_domain *domain,
return ret; return ret;
} }
static bool msm_iommu_capable(enum iommu_cap cap)
{
return false;
}
static void print_ctx_regs(void __iomem *base, int ctx) static void print_ctx_regs(void __iomem *base, int ctx)
{ {
unsigned int fsr = GET_FSR(base, ctx); unsigned int fsr = GET_FSR(base, ctx);
...@@ -672,7 +667,6 @@ irqreturn_t msm_iommu_fault_handler(int irq, void *dev_id) ...@@ -672,7 +667,6 @@ irqreturn_t msm_iommu_fault_handler(int irq, void *dev_id)
} }
static struct iommu_ops msm_iommu_ops = { static struct iommu_ops msm_iommu_ops = {
.capable = msm_iommu_capable,
.domain_alloc = msm_iommu_domain_alloc, .domain_alloc = msm_iommu_domain_alloc,
.domain_free = msm_iommu_domain_free, .domain_free = msm_iommu_domain_free,
.attach_dev = msm_iommu_attach_dev, .attach_dev = msm_iommu_attach_dev,
......
...@@ -238,11 +238,6 @@ static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain, ...@@ -238,11 +238,6 @@ static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain,
return pte & GART_PAGE_MASK; return pte & GART_PAGE_MASK;
} }
static bool gart_iommu_capable(enum iommu_cap cap)
{
return false;
}
static struct iommu_device *gart_iommu_probe_device(struct device *dev) static struct iommu_device *gart_iommu_probe_device(struct device *dev)
{ {
if (!dev_iommu_fwspec_get(dev)) if (!dev_iommu_fwspec_get(dev))
...@@ -276,7 +271,6 @@ static void gart_iommu_sync(struct iommu_domain *domain, ...@@ -276,7 +271,6 @@ static void gart_iommu_sync(struct iommu_domain *domain,
} }
static const struct iommu_ops gart_iommu_ops = { static const struct iommu_ops gart_iommu_ops = {
.capable = gart_iommu_capable,
.domain_alloc = gart_iommu_domain_alloc, .domain_alloc = gart_iommu_domain_alloc,
.domain_free = gart_iommu_domain_free, .domain_free = gart_iommu_domain_free,
.attach_dev = gart_iommu_attach_dev, .attach_dev = gart_iommu_attach_dev,
......
...@@ -272,11 +272,6 @@ static void tegra_smmu_free_asid(struct tegra_smmu *smmu, unsigned int id) ...@@ -272,11 +272,6 @@ static void tegra_smmu_free_asid(struct tegra_smmu *smmu, unsigned int id)
clear_bit(id, smmu->asids); clear_bit(id, smmu->asids);
} }
static bool tegra_smmu_capable(enum iommu_cap cap)
{
return false;
}
static struct iommu_domain *tegra_smmu_domain_alloc(unsigned type) static struct iommu_domain *tegra_smmu_domain_alloc(unsigned type)
{ {
struct tegra_smmu_as *as; struct tegra_smmu_as *as;
...@@ -967,7 +962,6 @@ static int tegra_smmu_of_xlate(struct device *dev, ...@@ -967,7 +962,6 @@ static int tegra_smmu_of_xlate(struct device *dev,
} }
static const struct iommu_ops tegra_smmu_ops = { static const struct iommu_ops tegra_smmu_ops = {
.capable = tegra_smmu_capable,
.domain_alloc = tegra_smmu_domain_alloc, .domain_alloc = tegra_smmu_domain_alloc,
.domain_free = tegra_smmu_domain_free, .domain_free = tegra_smmu_domain_free,
.attach_dev = tegra_smmu_attach_dev, .attach_dev = tegra_smmu_attach_dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment