|
@@ -29,6 +29,7 @@
|
|
|
#include <asm/amd_iommu.h>
|
|
|
#include <asm/iommu.h>
|
|
|
#include <asm/gart.h>
|
|
|
+#include <asm/x86_init.h>
|
|
|
|
|
|
/*
|
|
|
* definitions for the ACPI scanning code
|
|
@@ -1176,19 +1177,10 @@ static struct sys_device device_amd_iommu = {
|
|
|
* functions. Finally it prints some information about AMD IOMMUs and
|
|
|
* the driver state and enables the hardware.
|
|
|
*/
|
|
|
-int __init amd_iommu_init(void)
|
|
|
+static int __init amd_iommu_init(void)
|
|
|
{
|
|
|
int i, ret = 0;
|
|
|
|
|
|
-
|
|
|
- if (no_iommu) {
|
|
|
- printk(KERN_INFO "AMD-Vi disabled by kernel command line\n");
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- if (!amd_iommu_detected)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
/*
|
|
|
* First parse ACPI tables to find the largest Bus/Dev/Func
|
|
|
* we need to handle. Upon this information the shared data
|
|
@@ -1344,10 +1336,7 @@ void __init amd_iommu_detect(void)
|
|
|
if (acpi_table_parse("IVRS", early_amd_iommu_detect) == 0) {
|
|
|
iommu_detected = 1;
|
|
|
amd_iommu_detected = 1;
|
|
|
-#ifdef CONFIG_GART_IOMMU
|
|
|
- gart_iommu_aperture_disabled = 1;
|
|
|
- gart_iommu_aperture = 0;
|
|
|
-#endif
|
|
|
+ x86_init.iommu.iommu_init = amd_iommu_init;
|
|
|
}
|
|
|
}
|
|
|
|