iommu/iova: Fix compilation error with !CONFIG_IOMMU_IOVA [Linux 4.19.64]

This Linux kernel change "iommu/iova: Fix compilation error with !CONFIG_IOMMU_IOVA" is included in the Linux 4.19.64 release. This change is authored by Joerg Roedel <jroedel [at] suse.de> on Tue Jul 23 09:51:00 2019 +0200. The commit for this change in Linux stable tree is 3a0c22c (patch) which is from upstream commit 201c1db. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream 201c1db.

iommu/iova: Fix compilation error with !CONFIG_IOMMU_IOVA

commit 201c1db90cd643282185a00770f12f95da330eca upstream.

The stub function for !CONFIG_IOMMU_IOVA needs to be
'static inline'.

Fixes: effa467870c76 ('iommu/vt-d: Don't queue_iova() if there is no flush queue')
Signed-off-by: Joerg Roedel <[email protected]>
Signed-off-by: Dmitry Safonov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 include/linux/iova.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/iova.h b/include/linux/iova.h
index 073dc27..84fbe73 100644
--- a/include/linux/iova.h
+++ b/include/linux/iova.h
@@ -237,7 +237,7 @@ static inline void init_iova_domain(struct iova_domain *iovad,
 {
 }

-bool has_iova_flush_queue(struct iova_domain *iovad)
+static inline bool has_iova_flush_queue(struct iova_domain *iovad)
 {
    return false;
 }

Leave a Reply

Your email address will not be published. Required fields are marked *