|
@@ -46,6 +46,7 @@
|
|
|
#include <asm/dma.h>
|
|
|
#include <asm/rio.h>
|
|
|
#include <asm/bios_ebda.h>
|
|
|
+#include <asm/x86_init.h>
|
|
|
|
|
|
#ifdef CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT
|
|
|
int use_calgary __read_mostly = 1;
|
|
@@ -1344,6 +1345,8 @@ static void __init get_tce_space_from_tar(void)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+int __init calgary_iommu_init(void);
|
|
|
+
|
|
|
void __init detect_calgary(void)
|
|
|
{
|
|
|
int bus;
|
|
@@ -1445,6 +1448,8 @@ void __init detect_calgary(void)
|
|
|
/* swiotlb for devices that aren't behind the Calgary. */
|
|
|
if (max_pfn > MAX_DMA32_PFN)
|
|
|
swiotlb = 1;
|
|
|
+
|
|
|
+ x86_init.iommu.iommu_init = calgary_iommu_init;
|
|
|
}
|
|
|
return;
|
|
|
|
|
@@ -1461,12 +1466,6 @@ int __init calgary_iommu_init(void)
|
|
|
{
|
|
|
int ret;
|
|
|
|
|
|
- if (no_iommu || (swiotlb && !calgary_detected))
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
- if (!calgary_detected)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
/* ok, we're trying to use Calgary - let's roll */
|
|
|
printk(KERN_INFO "PCI-DMA: Using Calgary IOMMU\n");
|
|
|
|