Skip to content

Commit bfd8d98

Browse files
madscientist159mpe
authored andcommitted
powerpc/iommu: Only build sPAPR access functions on pSeries
and PowerNV A build failure with CONFIG_HAVE_PCI=y set without PSERIES or POWERNV set was caught by the random configuration checker. Guard the sPAPR specific IOMMU functions on CONFIG_PPC_PSERIES || CONFIG_PPC_POWERNV. Signed-off-by: Timothy Pearson <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/2015925968.3546872.1685990936823.JavaMail.zimbra@raptorengineeringinc.com
1 parent 331e2ca commit bfd8d98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/powerpc/kernel/iommu.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ void iommu_tce_kill(struct iommu_table *tbl,
10901090
}
10911091
EXPORT_SYMBOL_GPL(iommu_tce_kill);
10921092

1093+
#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
10931094
static int iommu_take_ownership(struct iommu_table *tbl)
10941095
{
10951096
unsigned long flags, i, sz = (tbl->it_size + 7) >> 3;
@@ -1140,6 +1141,7 @@ static void iommu_release_ownership(struct iommu_table *tbl)
11401141
spin_unlock(&tbl->pools[i].lock);
11411142
spin_unlock_irqrestore(&tbl->large_pool.lock, flags);
11421143
}
1144+
#endif
11431145

11441146
int iommu_add_device(struct iommu_table_group *table_group, struct device *dev)
11451147
{
@@ -1171,6 +1173,7 @@ int iommu_add_device(struct iommu_table_group *table_group, struct device *dev)
11711173
}
11721174
EXPORT_SYMBOL_GPL(iommu_add_device);
11731175

1176+
#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
11741177
/*
11751178
* A simple iommu_table_group_ops which only allows reusing the existing
11761179
* iommu_table. This handles VFIO for POWER7 or the nested KVM.
@@ -1398,5 +1401,6 @@ static int __init spapr_tce_setup_phb_iommus_initcall(void)
13981401
return 0;
13991402
}
14001403
postcore_initcall_sync(spapr_tce_setup_phb_iommus_initcall);
1404+
#endif
14011405

14021406
#endif /* CONFIG_IOMMU_API */

0 commit comments

Comments
 (0)