aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/virtio-iommu.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-25 09:22:13 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-25 09:22:13 +0200
commita12c689209185c1ad872723a644d0cd27e52d49c (patch)
tree11c01d147a9241561eb7a3ad5a999e234be2750c /drivers/iommu/virtio-iommu.c
parentMAINTAINERS: Solve warning regarding inexistent atmel-usart binding (diff)
parentMerge tag 'tty-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty (diff)
downloadlinux-dev-a12c689209185c1ad872723a644d0cd27e52d49c.tar.xz
linux-dev-a12c689209185c1ad872723a644d0cd27e52d49c.zip
Merge 7e2cd21e02b3 ("Merge tag 'tty-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into tty-next
We need the tty fixes and api additions in this branch. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iommu/virtio-iommu.c')
-rw-r--r--drivers/iommu/virtio-iommu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 08eeafc9529f..80151176ba12 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -1006,7 +1006,18 @@ static int viommu_of_xlate(struct device *dev, struct of_phandle_args *args)
return iommu_fwspec_add_ids(dev, args->args, 1);
}
+static bool viommu_capable(enum iommu_cap cap)
+{
+ switch (cap) {
+ case IOMMU_CAP_CACHE_COHERENCY:
+ return true;
+ default:
+ return false;
+ }
+}
+
static struct iommu_ops viommu_ops = {
+ .capable = viommu_capable,
.domain_alloc = viommu_domain_alloc,
.probe_device = viommu_probe_device,
.probe_finalize = viommu_probe_finalize,