Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b09603b1
Commit
b09603b1
authored
Jan 03, 2003
by
Andi Kleen
Committed by
Dave Jones
Jan 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix x86-64 AGPGART/IOMMU compilation.
parent
c3e454f0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
arch/x86_64/kernel/pci-gart.c
arch/x86_64/kernel/pci-gart.c
+7
-2
drivers/char/agp/amd-k8-agp.c
drivers/char/agp/amd-k8-agp.c
+12
-1
No files found.
arch/x86_64/kernel/pci-gart.c
View file @
b09603b1
...
...
@@ -72,6 +72,7 @@ static unsigned long *iommu_gart_bitmap; /* guarded by iommu_bitmap_lock */
#define EMERGENCY_PAGES 32
/* = 128KB */
#ifdef CONFIG_AGP
extern
int
agp_amdk8_init
(
void
);
extern
int
agp_init
(
void
);
#define AGPEXTERN extern
#else
...
...
@@ -453,10 +454,14 @@ void __init pci_iommu_init(void)
unsigned
long
aper_size
;
unsigned
long
iommu_start
;
#ifndef CONFIG_AGP
#ifndef CONFIG_AGP
_AMD_8151
no_agp
=
1
;
#else
no_agp
=
no_agp
||
(
agp_init
()
<
0
)
||
(
agp_copy_info
(
&
info
)
<
0
);
/* Add other K8 AGP bridge drivers here */
no_agp
=
no_agp
||
(
agp_init
()
<
0
)
||
(
agp_amdk8_init
()
<
0
)
||
(
agp_copy_info
(
&
info
)
<
0
);
#endif
if
(
no_iommu
||
(
!
force_mmu
&&
end_pfn
<
0xffffffff
>>
PAGE_SHIFT
))
{
...
...
drivers/char/agp/amd-k8-agp.c
View file @
b09603b1
...
...
@@ -8,6 +8,12 @@
* removed now).
*/
/*
* On x86-64 the AGP driver needs to be initialized early by the IOMMU
* code. When you use this driver as a template for a new K8 AGP bridge
* driver don't forget to change arch/x86_64/kernel/pci-gart.c too -AK.
*/
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/init.h>
...
...
@@ -505,7 +511,8 @@ static struct __initdata pci_driver agp_amdk8_pci_driver = {
.
probe
=
agp_amdk8_probe
,
};
static
int
__init
agp_amdk8_init
(
void
)
/* Not static due to IOMMU code calling it early. */
int
__init
agp_amdk8_init
(
void
)
{
int
ret_val
;
...
...
@@ -524,8 +531,12 @@ static void __exit agp_amdk8_cleanup(void)
pci_unregister_driver
(
&
agp_amdk8_pci_driver
);
}
/* On x86-64 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_amdk8_init
);
module_exit
(
agp_amdk8_cleanup
);
#endif
MODULE_AUTHOR
(
"Dave Jones <davej@codemonkey.org.uk>"
);
MODULE_LICENSE
(
"GPL and additional rights"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment