Commit be46fd81 authored by Dave Jones's avatar Dave Jones

Merge tetrachloride.(none):/mnt/stuff/kernel/2.5/bk-linus

into tetrachloride.(none):/mnt/stuff/kernel/2.5/agpgart
parents 1d0619c5 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)) {
......
......@@ -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");
......
......@@ -203,9 +203,9 @@ static struct agp_device_ids via_agp_device_ids[] __initdata =
.chipset_name = "Apollo ProSavage PM133"
},
{
.device_id = PCI_DEVICE_ID_VIA_8235_0,
.chipset = VIA_P4X400,
.chipset_name = "P4X400"
.device_id = PCI_DEVICE_ID_VIA_8754,
.chipset = VIA_P4X,
.chipset_name = "Apollo P4X333/P4X400"
},
{ }, /* dummy final entry, always present */
};
......
......@@ -63,7 +63,7 @@ enum chipset_type {
VIA_APOLLO_KT400_3,
VIA_APOLLO_PRO_266,
VIA_VT8605,
VIA_P4X400,
VIA_P4X,
SIS_GENERIC,
AMD_GENERIC,
AMD_IRONGATE,
......
......@@ -1092,7 +1092,7 @@
#define PCI_DEVICE_ID_VIA_8233C_0 0x3109
#define PCI_DEVICE_ID_VIA_8361 0x3112
#define PCI_DEVICE_ID_VIA_8233A 0x3147
#define PCI_DEVICE_ID_VIA_8235_0 0x3168
#define PCI_DEVICE_ID_VIA_8754 0x3168
#define PCI_DEVICE_ID_VIA_8235 0x3177
#define PCI_DEVICE_ID_VIA_8377_0 0x3189
#define PCI_DEVICE_ID_VIA_86C100A 0x6100
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment