From: Joerg Roedel <joerg.roedel@amd.com>
To: <iommu@lists.linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>,
David Woodhouse <dwmw2@infradead.org>,
Ohad Ben-Cohen <ohad@wizery.com>,
David Brown <davidb@codeaurora.org>,
Stepan Moskovchenko <stepanm@codeaurora.org>,
Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH] iommu: Remove stub functions for !CONFIG_IOMMU_API
Date: Fri, 26 Aug 2011 15:20:39 +0200 [thread overview]
Message-ID: <1314364839-28492-1-git-send-email-joerg.roedel@amd.com> (raw)
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@amd.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
next reply other threads:[~2011-08-26 13:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 13:20 Joerg Roedel [this message]
2011-08-27 11:56 ` Ohad Ben-Cohen
2011-08-29 10:15 ` Roedel, Joerg
2011-08-29 10:59 ` Ohad Ben-Cohen
2011-08-29 12:25 ` Roedel, Joerg
2011-08-29 12:55 ` Ohad Ben-Cohen
2011-08-29 13:05 ` Roedel, Joerg
2011-08-29 13:21 ` Ohad Ben-Cohen
2011-08-31 13:03 ` Roedel, Joerg
2011-09-02 0:57 ` Laura Abbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314364839-28492-1-git-send-email-joerg.roedel@amd.com \
--to=joerg.roedel@amd.com \
--cc=davidb@codeaurora.org \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ohad@wizery.com \
--cc=stepanm@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®