diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
commit | 51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (patch) | |
tree | 9f54936c87764bef75e97395cb56b7d1e0df24c6 /drivers/char/agp/amd64-agp.c | |
parent | 4276e47e2d1c85a2477caf0d22b91c4f2377fba8 (diff) | |
parent | 6be325719b3e54624397e413efd4b33a997e55a3 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/char/agp/amd64-agp.c')
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 2fb2e6cc322a..1afb8968a342 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -728,6 +728,10 @@ int __init agp_amd64_init(void) | |||
728 | 728 | ||
729 | if (agp_off) | 729 | if (agp_off) |
730 | return -EINVAL; | 730 | return -EINVAL; |
731 | |||
732 | if (gart_iommu_aperture) | ||
733 | return agp_bridges_found ? 0 : -ENODEV; | ||
734 | |||
731 | err = pci_register_driver(&agp_amd64_pci_driver); | 735 | err = pci_register_driver(&agp_amd64_pci_driver); |
732 | if (err < 0) | 736 | if (err < 0) |
733 | return err; | 737 | return err; |
@@ -766,17 +770,15 @@ int __init agp_amd64_init(void) | |||
766 | 770 | ||
767 | static void __exit agp_amd64_cleanup(void) | 771 | static void __exit agp_amd64_cleanup(void) |
768 | { | 772 | { |
773 | if (gart_iommu_aperture) | ||
774 | return; | ||
769 | if (aperture_resource) | 775 | if (aperture_resource) |
770 | release_resource(aperture_resource); | 776 | release_resource(aperture_resource); |
771 | pci_unregister_driver(&agp_amd64_pci_driver); | 777 | pci_unregister_driver(&agp_amd64_pci_driver); |
772 | } | 778 | } |
773 | 779 | ||
774 | /* On AMD64 the PCI driver needs to initialize this driver early | ||
775 | for the IOMMU, so it has to be called via a backdoor. */ | ||
776 | #ifndef CONFIG_GART_IOMMU | ||
777 | module_init(agp_amd64_init); | 780 | module_init(agp_amd64_init); |
778 | module_exit(agp_amd64_cleanup); | 781 | module_exit(agp_amd64_cleanup); |
779 | #endif | ||
780 | 782 | ||
781 | MODULE_AUTHOR("Dave Jones <davej@redhat.com>, Andi Kleen"); | 783 | MODULE_AUTHOR("Dave Jones <davej@redhat.com>, Andi Kleen"); |
782 | module_param(agp_try_unsupported, bool, 0); | 784 | module_param(agp_try_unsupported, bool, 0); |