[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1314364839-28492-1-git-send-email-joerg.roedel@amd.com>
Date: Fri, 26 Aug 2011 15:20:39 +0200
From: Joerg Roedel <joerg.roedel@....com>
To: <iommu@...ts.linux-foundation.org>
CC: <linux-kernel@...r.kernel.org>,
David Woodhouse <dwmw2@...radead.org>,
Ohad Ben-Cohen <ohad@...ery.com>,
David Brown <davidb@...eaurora.org>,
Stepan Moskovchenko <stepanm@...eaurora.org>,
Joerg Roedel <joerg.roedel@....com>
Subject: [PATCH] iommu: Remove stub functions for !CONFIG_IOMMU_API
Remove most of the stub functions because they are only
allowed to use when CONFIG_IOMMU_API is set anyway. This
will catch missing 'select' entries in kconfig at compile
time already.
Signed-off-by: Joerg Roedel <joerg.roedel@....com>
---
include/linux/iommu.h | 52 +-----------------------------------------------
1 files changed, 2 insertions(+), 50 deletions(-)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 9940319..296f41a 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -19,6 +19,8 @@
#ifndef __LINUX_IOMMU_H
#define __LINUX_IOMMU_H
+#ifdef CONFIG_IOMMU_API
+
#include <linux/errno.h>
#define IOMMU_READ (1)
@@ -49,8 +51,6 @@ struct iommu_ops {
unsigned long cap);
};
-#ifdef CONFIG_IOMMU_API
-
extern void register_iommu(struct iommu_ops *ops);
extern bool iommu_found(void);
extern struct iommu_domain *iommu_domain_alloc(void);
@@ -70,59 +70,11 @@ extern int iommu_domain_has_cap(struct iommu_domain *domain,
#else /* CONFIG_IOMMU_API */
-static inline void register_iommu(struct iommu_ops *ops)
-{
-}
-
static inline bool iommu_found(void)
{
return false;
}
-static inline struct iommu_domain *iommu_domain_alloc(void)
-{
- return NULL;
-}
-
-static inline void iommu_domain_free(struct iommu_domain *domain)
-{
-}
-
-static inline int iommu_attach_device(struct iommu_domain *domain,
- struct device *dev)
-{
- return -ENODEV;
-}
-
-static inline void iommu_detach_device(struct iommu_domain *domain,
- struct device *dev)
-{
-}
-
-static inline int iommu_map(struct iommu_domain *domain, unsigned long iova,
- phys_addr_t paddr, int gfp_order, int prot)
-{
- return -ENODEV;
-}
-
-static inline int iommu_unmap(struct iommu_domain *domain, unsigned long iova,
- int gfp_order)
-{
- return -ENODEV;
-}
-
-static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
- unsigned long iova)
-{
- return 0;
-}
-
-static inline int domain_has_cap(struct iommu_domain *domain,
- unsigned long cap)
-{
- return 0;
-}
-
#endif /* CONFIG_IOMMU_API */
#endif /* __LINUX_IOMMU_H */
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists