提交 06df6daf 编写于 作者: F FUJITA Tomonori 提交者: Ingo Molnar

x86/agp: Fix amd64-agp module initialization regression

This fixes the regression introduced by commit
42590a75 ("x86/agp: Fix
agp_amd64_init and agp_amd64_cleanup").

The commit 61684cea fixed the
above regression but it's not enough. When amd64-agp is built as
a module, AGP isn't initialized, iommu is initialized, all the
aperture is owned by the iommu.
Reported-by: NMarin Mitov <mitov@issp.bas.bg>
Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: NMarin Mitov <mitov@issp.bas.bg>
LKML-Reference: <20100204090802S.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 ab09809f
...@@ -767,16 +767,19 @@ int __init agp_amd64_init(void) ...@@ -767,16 +767,19 @@ int __init agp_amd64_init(void)
static int __init agp_amd64_mod_init(void) static int __init agp_amd64_mod_init(void)
{ {
#ifndef MODULE
if (gart_iommu_aperture) if (gart_iommu_aperture)
return agp_bridges_found ? 0 : -ENODEV; return agp_bridges_found ? 0 : -ENODEV;
#endif
return agp_amd64_init(); return agp_amd64_init();
} }
static void __exit agp_amd64_cleanup(void) static void __exit agp_amd64_cleanup(void)
{ {
#ifndef MODULE
if (gart_iommu_aperture) if (gart_iommu_aperture)
return; return;
#endif
if (aperture_resource) if (aperture_resource)
release_resource(aperture_resource); release_resource(aperture_resource);
pci_unregister_driver(&agp_amd64_pci_driver); pci_unregister_driver(&agp_amd64_pci_driver);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册