* [PATCH] x86/agp: fix agp_amd64_init module initialization regression
@ 2010-02-04 0:12 FUJITA Tomonori
2010-02-04 9:51 ` [tip:x86/urgent] x86/agp: Fix amd64-agp " tip-bot for FUJITA Tomonori
0 siblings, 1 reply; 2+ messages in thread
From: FUJITA Tomonori @ 2010-02-04 0:12 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel, mitov, davej
This fixes the regression introduced by commit
42590a75019a50012f25a962246498dead428433 ("x86/agp: Fix agp_amd64_init
and agp_amd64_cleanup").
The commit 61684ceaad4f65d1a9832c722f7bd5e7fc714de9 fixed the above
regression but there is still a problem in the module initialization;
when apg_amd64 is built as a module, the GART IOMMU is not still
initialized.
Reported-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Marin Mitov <mitov@issp.bas.bg>
---
drivers/char/agp/amd64-agp.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 34cf04e..fd50ead 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -767,16 +767,19 @@ int __init agp_amd64_init(void)
static int __init agp_amd64_mod_init(void)
{
+#ifndef MODULE
if (gart_iommu_aperture)
return agp_bridges_found ? 0 : -ENODEV;
-
+#endif
return agp_amd64_init();
}
static void __exit agp_amd64_cleanup(void)
{
+#ifndef MODULE
if (gart_iommu_aperture)
return;
+#endif
if (aperture_resource)
release_resource(aperture_resource);
pci_unregister_driver(&agp_amd64_pci_driver);
--
1.5.6.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86/agp: Fix amd64-agp module initialization regression
2010-02-04 0:12 [PATCH] x86/agp: fix agp_amd64_init module initialization regression FUJITA Tomonori
@ 2010-02-04 9:51 ` tip-bot for FUJITA Tomonori
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for FUJITA Tomonori @ 2010-02-04 9:51 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, fujita.tomonori, tglx, mingo, mitov
Commit-ID: 06df6dafb5d9e3cfa3588c6ce79328b91582b6af
Gitweb: http://git.kernel.org/tip/06df6dafb5d9e3cfa3588c6ce79328b91582b6af
Author: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
AuthorDate: Thu, 4 Feb 2010 14:43:38 +0900
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 4 Feb 2010 07:27:26 +0100
x86/agp: Fix amd64-agp module initialization regression
This fixes the regression introduced by commit
42590a75019a50012f25a962246498dead428433 ("x86/agp: Fix
agp_amd64_init and agp_amd64_cleanup").
The commit 61684ceaad4f65d1a9832c722f7bd5e7fc714de9 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: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Marin Mitov <mitov@issp.bas.bg>
LKML-Reference: <20100204090802S.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
drivers/char/agp/amd64-agp.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 34cf04e..fd50ead 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -767,16 +767,19 @@ int __init agp_amd64_init(void)
static int __init agp_amd64_mod_init(void)
{
+#ifndef MODULE
if (gart_iommu_aperture)
return agp_bridges_found ? 0 : -ENODEV;
-
+#endif
return agp_amd64_init();
}
static void __exit agp_amd64_cleanup(void)
{
+#ifndef MODULE
if (gart_iommu_aperture)
return;
+#endif
if (aperture_resource)
release_resource(aperture_resource);
pci_unregister_driver(&agp_amd64_pci_driver);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-04 9:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-04 0:12 [PATCH] x86/agp: fix agp_amd64_init module initialization regression FUJITA Tomonori
2010-02-04 9:51 ` [tip:x86/urgent] x86/agp: Fix amd64-agp " tip-bot for FUJITA Tomonori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®