aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-01-06 18:07:56 +1100
committerEli Qiao <taget@linux.vnet.ibm.com>2014-01-06 15:58:16 +0800
commit1dc745db4fd87b58811330771f8ef33425010d64 (patch)
tree5f0193a6cc14d49bdbc36b58db179eb22297de65
parent2b858ca7c853e7dcc2ed54d6cf30142bf1e44a01 (diff)
downloadpowerkvm-1dc745db4fd87b58811330771f8ef33425010d64.tar.gz
powerpc: fix compilation without CONFIG_IOMMU_API
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
-rw-r--r--arch/powerpc/include/asm/iommu.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
index 22bef393ad456..8255841057f9c 100644
--- a/arch/powerpc/include/asm/iommu.h
+++ b/arch/powerpc/include/asm/iommu.h
@@ -103,10 +103,27 @@ extern void iommu_free_table(struct iommu_table *tbl, const char *node_name);
*/
extern struct iommu_table *iommu_init_table(struct iommu_table * tbl,
int nid);
+#ifdef CONFIG_IOMMU_API
extern void iommu_register_group(struct iommu_table *tbl,
int pci_domain_number, unsigned long pe_num);
extern int iommu_add_device(struct device *dev);
extern void iommu_del_device(struct device *dev);
+#else
+static inline void iommu_register_group(struct iommu_table *tbl,
+ int pci_domain_number,
+ unsigned long pe_num)
+{
+}
+
+static inline int iommu_add_device(struct device *dev)
+{
+ return 0;
+}
+
+static inline void iommu_del_device(struct device *dev)
+{
+}
+#endif /* !CONFIG_IOMMU_API */
static inline void set_iommu_table_base_and_group(struct device *dev,
void *base)