|
@@ -725,9 +725,14 @@ static struct pci_driver agp_amd64_pci_driver = {
|
|
|
int __init agp_amd64_init(void)
|
|
|
{
|
|
|
int err = 0;
|
|
|
+ static int done = 0;
|
|
|
|
|
|
if (agp_off)
|
|
|
return -EINVAL;
|
|
|
+
|
|
|
+ if (done++)
|
|
|
+ return agp_bridges_found ? 0 : -ENODEV;
|
|
|
+
|
|
|
err = pci_register_driver(&agp_amd64_pci_driver);
|
|
|
if (err < 0)
|
|
|
return err;
|
|
@@ -771,12 +776,8 @@ static void __exit agp_amd64_cleanup(void)
|
|
|
pci_unregister_driver(&agp_amd64_pci_driver);
|
|
|
}
|
|
|
|
|
|
-/* On AMD64 the PCI driver needs to initialize this driver early
|
|
|
- for the IOMMU, so it has to be called via a backdoor. */
|
|
|
-#ifndef CONFIG_GART_IOMMU
|
|
|
module_init(agp_amd64_init);
|
|
|
module_exit(agp_amd64_cleanup);
|
|
|
-#endif
|
|
|
|
|
|
MODULE_AUTHOR("Dave Jones <davej@redhat.com>, Andi Kleen");
|
|
|
module_param(agp_try_unsupported, bool, 0);
|