diff -Naur linux-2.6.11-rc3-mm2/arch/x86_64/kernel/pci-gart.c linux-2.6.11-rc3-mm2-nvidia/arch/x86_64/kernel/pci-gart.c
--- linux-2.6.11-rc3-mm2/arch/x86_64/kernel/pci-gart.c	2005-02-14 17:29:19.305093952 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/arch/x86_64/kernel/pci-gart.c	2005-02-16 23:10:19.305877568 -0800
@@ -789,7 +789,7 @@
 	/* Add other K8 AGP bridge drivers here */
 	no_agp = no_agp || 
 		(agp_amd64_init() < 0) || 
-		(agp_copy_info(agp_bridge, &info) < 0);
+		(agp_copy_info(&info) < 0); 
 #endif	
 
 	if (swiotlb) { 
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/agp.h linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/agp.h
--- linux-2.6.11-rc3-mm2/drivers/char/agp/agp.h	2005-02-14 17:29:20.589898632 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/agp.h	2005-02-16 23:10:19.253885472 -0800
@@ -1,6 +1,5 @@
 /*
  * AGPGART
- * Copyright (C) 2004 Silicon Graphics, Inc.
  * Copyright (C) 2002-2004 Dave Jones
  * Copyright (C) 1999 Jeff Hartmann
  * Copyright (C) 1999 Precision Insight, Inc.
@@ -101,19 +100,18 @@
 	struct gatt_mask *masks;
 	int (*fetch_size)(void);
 	int (*configure)(void);
-	void (*agp_enable)(struct agp_bridge_data *, u32);
+	void (*agp_enable)(u32);
 	void (*cleanup)(void);
 	void (*tlb_flush)(struct agp_memory *);
-	unsigned long (*mask_memory)(struct agp_bridge_data *,
-		unsigned long, int);
+	unsigned long (*mask_memory)(unsigned long, int);
 	void (*cache_flush)(void);
-	int (*create_gatt_table)(struct agp_bridge_data *);
-	int (*free_gatt_table)(struct agp_bridge_data *);
+	int (*create_gatt_table)(void);
+	int (*free_gatt_table)(void);
 	int (*insert_memory)(struct agp_memory *, off_t, int);
 	int (*remove_memory)(struct agp_memory *, off_t, int);
 	struct agp_memory *(*alloc_by_type) (size_t, int);
 	void (*free_by_type)(struct agp_memory *);
-	void *(*agp_alloc_page)(struct agp_bridge_data *);
+	void *(*agp_alloc_page)(void);
 	void (*agp_destroy_page)(void *);
 };
 
@@ -142,7 +140,6 @@
 	int flags;
 	char major_version;
 	char minor_version;
-	struct list_head list;
 };
 
 #define KB(x)	((x) * 1024)
@@ -247,15 +244,15 @@
 void agp_frontend_cleanup(void);
 
 /* Generic routines. */
-void agp_generic_enable(struct agp_bridge_data *bridge, u32 mode);
-int agp_generic_create_gatt_table(struct agp_bridge_data *bridge);
-int agp_generic_free_gatt_table(struct agp_bridge_data *bridge);
+void agp_generic_enable(u32 mode);
+int agp_generic_create_gatt_table(void);
+int agp_generic_free_gatt_table(void);
 struct agp_memory *agp_create_memory(int scratch_pages);
 int agp_generic_insert_memory(struct agp_memory *mem, off_t pg_start, int type);
 int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type);
 struct agp_memory *agp_generic_alloc_by_type(size_t page_count, int type);
 void agp_generic_free_by_type(struct agp_memory *curr);
-void *agp_generic_alloc_page(struct agp_bridge_data *bridge);
+void *agp_generic_alloc_page(void);
 void agp_generic_destroy_page(void *addr);
 void agp_free_key(int key);
 int agp_num_entries(void);
@@ -264,9 +261,7 @@
 int agp_3_5_enable(struct agp_bridge_data *bridge);
 void global_cache_flush(void);
 void get_agp_version(struct agp_bridge_data *bridge);
-unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge,
-	unsigned long addr, int type);
-struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev);
+unsigned long agp_generic_mask_memory(unsigned long addr, int type);
 
 /* generic routines for agp>=3 */
 int agp3_generic_fetch_size(void);
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/ali-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/ali-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/ali-agp.c	2005-02-14 17:29:20.591898328 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/ali-agp.c	2005-02-16 23:10:00.371755992 -0800
@@ -139,9 +139,9 @@
 	}
 }
 
-static void *m1541_alloc_page(struct agp_bridge_data *bridge)
+static void *m1541_alloc_page(void)
 {
-	void *addr = agp_generic_alloc_page(agp_bridge);
+	void *addr = agp_generic_alloc_page();
 	u32 temp;
 
 	if (!addr)
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/alpha-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/alpha-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/alpha-agp.c	2005-02-14 17:29:20.592898176 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/alpha-agp.c	2005-02-16 23:09:50.185304568 -0800
@@ -76,12 +76,11 @@
 	alpha_mv.mv_pci_tbi(agp->hose, 0, -1);
 }
 
-static void alpha_core_agp_enable(struct agp_bridge_data *bridge, u32 mode)
+static void alpha_core_agp_enable(u32 mode)
 {
-	alpha_agp_info *agp = bridge->dev_private_data;
+	alpha_agp_info *agp = agp_bridge->dev_private_data;
 
-	agp->mode.lw = agp_collect_device_status(bridge, mode,
-					agp->capability.lw);
+	agp->mode.lw = agp_collect_device_status(mode, agp->capability.lw);
 
 	agp->mode.bits.enable = 1;
 	agp->ops->configure(agp);
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/amd-k7-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/amd-k7-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/amd-k7-agp.c	2005-02-14 17:29:20.595897720 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/amd-k7-agp.c	2005-02-16 23:09:50.188304112 -0800
@@ -132,7 +132,7 @@
 #define GET_GATT(addr) (amd_irongate_private.gatt_pages[\
 	GET_PAGE_DIR_IDX(addr)]->remapped)
 
-static int amd_create_gatt_table(struct agp_bridge_data *bridge)
+static int amd_create_gatt_table(void)
 {
 	struct aper_size_info_lvl2 *value;
 	struct amd_page_map page_dir;
@@ -175,7 +175,7 @@
 	return 0;
 }
 
-static int amd_free_gatt_table(struct agp_bridge_data *bridge)
+static int amd_free_gatt_table(void)
 {
 	struct amd_page_map page_dir;
 
@@ -314,8 +314,7 @@
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
 		addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr;
 		cur_gatt = GET_GATT(addr);
-		writel(agp_generic_mask_memory(agp_bridge,
-			mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr));
+		writel(agp_generic_mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr));
 		readl(cur_gatt+GET_GATT_OFF(addr));	/* PCI Posting. */
 	}
 	amd_irongate_tlbflush(mem);
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/amd64-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/amd64-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/amd64-agp.c	2005-02-14 17:29:20.593898024 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/amd64-agp.c	2005-02-16 23:09:50.186304416 -0800
@@ -106,8 +106,7 @@
 	}
 
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
-		tmp = agp_bridge->driver->mask_memory(agp_bridge,
-			mem->memory[i], mem->type);
+		tmp = agp_bridge->driver->mask_memory(mem->memory[i], mem->type);
 
 		BUG_ON(tmp & 0xffffff0000000ffcULL);
 		pte = (tmp & 0x000000ff00000000ULL) >> 28;
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/ati-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/ati-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/ati-agp.c	2005-02-14 17:29:20.596897568 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/ati-agp.c	2005-02-16 23:09:50.194303200 -0800
@@ -291,8 +291,7 @@
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
 		addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr;
 		cur_gatt = GET_GATT(addr);
-		writel(agp_bridge->driver->mask_memory(agp_bridge,
-			mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr));
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr));
 		readl(cur_gatt+GET_GATT_OFF(addr));	/* PCI Posting. */
 	}
 	agp_bridge->driver->tlb_flush(mem);
@@ -320,7 +319,7 @@
 	return 0;
 }
 
-static int ati_create_gatt_table(struct agp_bridge_data *bridge)
+static int ati_create_gatt_table(void)
 {
 	struct aper_size_info_lvl2 *value;
 	ati_page_map page_dir;
@@ -381,7 +380,7 @@
 	return 0;
 }
 
-static int ati_free_gatt_table(struct agp_bridge_data *bridge)
+static int ati_free_gatt_table(void)
 {
 	ati_page_map page_dir;
 
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/backend.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/backend.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/backend.c	2005-02-14 17:29:20.598897264 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/backend.c	2005-02-16 23:10:19.255885168 -0800
@@ -1,6 +1,5 @@
 /*
  * AGPGART driver backend routines.
- * Copyright (C) 2004 Silicon Graphics, Inc.
  * Copyright (C) 2002-2003 Dave Jones.
  * Copyright (C) 1999 Jeff Hartmann.
  * Copyright (C) 1999 Precision Insight, Inc.
@@ -43,38 +42,34 @@
  * fix some real stupidity. It's only by chance we can bump
  * past 0.99 at all due to some boolean logic error. */
 #define AGPGART_VERSION_MAJOR 0
-#define AGPGART_VERSION_MINOR 101
+#define AGPGART_VERSION_MINOR 100
 static struct agp_version agp_current_version =
 {
 	.major = AGPGART_VERSION_MAJOR,
 	.minor = AGPGART_VERSION_MINOR,
 };
 
-struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *) =
-	&agp_generic_find_bridge;
+static int agp_count=0;
 
-struct agp_bridge_data *agp_bridge;
-LIST_HEAD(agp_bridges);
+struct agp_bridge_data agp_bridge_dummy = { .type = NOT_SUPPORTED };
+struct agp_bridge_data *agp_bridge = &agp_bridge_dummy;
 EXPORT_SYMBOL(agp_bridge);
-EXPORT_SYMBOL(agp_bridges);
+
 
 /**
- *	agp_backend_acquire  -  attempt to acquire an agp backend.
+ *	agp_backend_acquire  -  attempt to acquire the agp backend.
  *
+ *	returns -EBUSY if agp is in use,
+ *	returns 0 if the caller owns the agp backend
  */
-struct agp_bridge_data *agp_backend_acquire(struct pci_dev *pdev)
+int agp_backend_acquire(void)
 {
-	struct agp_bridge_data *bridge;
-
-	bridge = agp_find_bridge(pdev);
-
-	if (!bridge)
-		return NULL;
-
-	if (atomic_read(&bridge->agp_in_use))
-		return NULL;
-	atomic_inc(&bridge->agp_in_use);
-	return bridge;
+	if (agp_bridge->type == NOT_SUPPORTED)
+		return -EINVAL;
+	if (atomic_read(&agp_bridge->agp_in_use))
+		return -EBUSY;
+	atomic_inc(&agp_bridge->agp_in_use);
+	return 0;
 }
 EXPORT_SYMBOL(agp_backend_acquire);
 
@@ -87,11 +82,10 @@
  *
  *	(Ensure that all memory it bound is unbound.)
  */
-void agp_backend_release(struct agp_bridge_data *bridge)
+void agp_backend_release(void)
 {
-
-	if (bridge)
-		atomic_dec(&bridge->agp_in_use);
+	if (agp_bridge->type != NOT_SUPPORTED)
+		atomic_dec(&agp_bridge->agp_in_use);
 }
 EXPORT_SYMBOL(agp_backend_release);
 
@@ -127,6 +121,7 @@
 	     (maxes_table[index].agp - maxes_table[index - 1].agp)) /
 	   (maxes_table[index].mem - maxes_table[index - 1].mem);
 
+	printk(KERN_INFO PFX "Maximum main memory to use for agp memory: %ldM\n", result);
 	result = result << (20 - PAGE_SHIFT);
 	return result;
 }
@@ -140,7 +135,7 @@
 	bridge->version = &agp_current_version;
 
 	if (bridge->driver->needs_scratch_page) {
-		void *addr = bridge->driver->agp_alloc_page(bridge);
+		void *addr = bridge->driver->agp_alloc_page();
 
 		if (!addr) {
 			printk(KERN_ERR PFX "unable to get memory for scratch page.\n");
@@ -149,7 +144,7 @@
 
 		bridge->scratch_page_real = virt_to_phys(addr);
 		bridge->scratch_page =
-		    bridge->driver->mask_memory(bridge, bridge->scratch_page_real, 0);
+		    bridge->driver->mask_memory(bridge->scratch_page_real, 0);
 	}
 
 	size_value = bridge->driver->fetch_size();
@@ -158,7 +153,7 @@
 		rc = -EINVAL;
 		goto err_out;
 	}
-	if (bridge->driver->create_gatt_table(bridge)) {
+	if (bridge->driver->create_gatt_table()) {
 		printk(KERN_ERR PFX
 		    "unable to get memory for graphics translation table.\n");
 		rc = -ENOMEM;
@@ -183,6 +178,9 @@
 		goto err_out;
 	}
 
+	printk(KERN_INFO PFX "AGP aperture is %dM @ 0x%lx\n",
+	       size_value, bridge->gart_bus_addr);
+
 	return 0;
 
 err_out:
@@ -190,7 +188,7 @@
 		bridge->driver->agp_destroy_page(
 				phys_to_virt(bridge->scratch_page_real));
 	if (got_gatt)
-		bridge->driver->free_gatt_table(bridge);
+		bridge->driver->free_gatt_table();
 	if (got_keylist) {
 		vfree(bridge->key_list);
 		bridge->key_list = NULL;
@@ -204,7 +202,7 @@
 	if (bridge->driver->cleanup)
 		bridge->driver->cleanup();
 	if (bridge->driver->free_gatt_table)
-		bridge->driver->free_gatt_table(bridge);
+		bridge->driver->free_gatt_table();
 	if (bridge->key_list) {
 		vfree(bridge->key_list);
 		bridge->key_list = NULL;
@@ -216,35 +214,16 @@
 				phys_to_virt(bridge->scratch_page_real));
 }
 
-/* When we remove the global variable agp_bridge from all drivers
- * then agp_alloc_bridge and agp_generic_find_bridge need to be updated
- */
-
+/* XXX Kludge alert: agpgart isn't ready for multiple bridges yet */
 struct agp_bridge_data *agp_alloc_bridge(void)
 {
-	struct agp_bridge_data *bridge = kmalloc(sizeof(*bridge), GFP_KERNEL);
-
-	if (!bridge)
-		return NULL;
-
-	memset(bridge, 0, sizeof(*bridge));
-	atomic_set(&bridge->agp_in_use, 0);
-	atomic_set(&bridge->current_memory_agp, 0);
-
-	if (list_empty(&agp_bridges))
-		agp_bridge = bridge;
-
-	return bridge;
+	return agp_bridge;
 }
 EXPORT_SYMBOL(agp_alloc_bridge);
 
 
 void agp_put_bridge(struct agp_bridge_data *bridge)
 {
-        kfree(bridge);
-
-        if (list_empty(&agp_bridges))
-                agp_bridge = NULL;
 }
 EXPORT_SYMBOL(agp_put_bridge);
 
@@ -261,38 +240,40 @@
 		return -EINVAL;
 	}
 
+	if (agp_count) {
+		printk (KERN_INFO PFX
+		       "Only one agpgart device currently supported.\n");
+		return -ENODEV;
+	}
+
 	/* Grab reference on the chipset driver. */
 	if (!try_module_get(bridge->driver->owner)) {
 		printk (KERN_INFO PFX "Couldn't lock chipset driver.\n");
 		return -EINVAL;
 	}
 
-	error = agp_backend_initialize(bridge);
+	bridge->type = SUPPORTED;
+
+	error = agp_backend_initialize(agp_bridge);
 	if (error) {
 		printk (KERN_INFO PFX "agp_backend_initialize() failed.\n");
 		goto err_out;
 	}
 
-	if (list_empty(&agp_bridges)) {
-		error = agp_frontend_initialize();
-		if (error) {
-			printk (KERN_INFO PFX "agp_frontend_initialize() failed.\n");
-			goto frontend_err;
-		}
-
-		printk(KERN_INFO PFX "AGP aperture is %dM @ 0x%lx\n",
-			bridge->driver->fetch_size(), bridge->gart_bus_addr);
-
+	error = agp_frontend_initialize();
+	if (error) {
+		printk (KERN_INFO PFX "agp_frontend_initialize() failed.\n");
+		goto frontend_err;
 	}
 
-	list_add(&bridge->list, &agp_bridges);
+	agp_count++;
 	return 0;
 
 frontend_err:
-	agp_backend_cleanup(bridge);
+	agp_backend_cleanup(agp_bridge);
 err_out:
+	bridge->type = NOT_SUPPORTED;
 	module_put(bridge->driver->owner);
-	agp_put_bridge(bridge);
 	return error;
 }
 EXPORT_SYMBOL_GPL(agp_add_bridge);
@@ -300,10 +281,10 @@
 
 void agp_remove_bridge(struct agp_bridge_data *bridge)
 {
+	bridge->type = NOT_SUPPORTED;
+	agp_frontend_cleanup();
 	agp_backend_cleanup(bridge);
-	list_del(&bridge->list);
-	if (list_empty(&agp_bridges))
-		agp_frontend_cleanup();
+	agp_count--;
 	module_put(bridge->driver->owner);
 }
 EXPORT_SYMBOL_GPL(agp_remove_bridge);
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/efficeon-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/efficeon-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/efficeon-agp.c	2005-02-14 17:29:20.599897112 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/efficeon-agp.c	2005-02-16 23:09:50.197302744 -0800
@@ -148,7 +148,7 @@
 	return 0;
 }
 
-static int efficeon_free_gatt_table(struct agp_bridge_data *bridge)
+static int efficeon_free_gatt_table(void)
 {
 	int index, freed = 0;
 
@@ -183,7 +183,7 @@
 #define GET_GATT(addr) (efficeon_private.gatt_pages[\
 	GET_PAGE_DIR_IDX(addr)]->remapped)
 
-static int efficeon_create_gatt_table(struct agp_bridge_data *bridge)
+static int efficeon_create_gatt_table(void)
 {
 	int index;
 	const int pati    = EFFICEON_PATI;
@@ -209,7 +209,7 @@
 
 		page = get_zeroed_page(GFP_KERNEL);
 		if (!page) {
-			efficeon_free_gatt_table(agp_bridge);
+			efficeon_free_gatt_table();
 			return -ENOMEM;
 		}
 		SetPageReserved(virt_to_page((char *)page));
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/frontend.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/frontend.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/frontend.c	2005-02-14 17:29:20.611895288 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/frontend.c	2005-02-16 23:10:19.257884864 -0800
@@ -1,6 +1,5 @@
 /*
  * AGPGART driver frontend
- * Copyright (C) 2004 Silicon Graphics, Inc.
  * Copyright (C) 2002-2003 Dave Jones
  * Copyright (C) 1999 Jeff Hartmann
  * Copyright (C) 1999 Precision Insight, Inc.
@@ -300,7 +299,7 @@
 {
 	struct agp_memory *memory;
 
-	memory = agp_allocate_memory(agp_bridge, pg_count, type);
+	memory = agp_allocate_memory(pg_count, type);
 	if (memory == NULL)
 		return NULL;
 
@@ -421,7 +420,7 @@
 	if (agp_fe.current_controller == controller) {
 		agp_fe.current_controller = NULL;
 		agp_fe.backend_acquired = FALSE;
-		agp_backend_release(agp_bridge);
+		agp_backend_release();
 	}
 	kfree(controller);
 	return 0;
@@ -469,7 +468,7 @@
 
 	agp_fe.current_controller = NULL;
 	agp_fe.used_by_controller = FALSE;
-	agp_backend_release(agp_bridge);
+	agp_backend_release();
 }
 
 /* 
@@ -606,7 +605,7 @@
 	if (!(test_bit(AGP_FF_IS_VALID, &priv->access_flags)))
 		goto out_eperm;
 
-	agp_copy_info(agp_bridge, &kerninfo);
+	agp_copy_info(&kerninfo);
 	size = vma->vm_end - vma->vm_start;
 	current_size = kerninfo.aper_size;
 	current_size = current_size * 0x100000;
@@ -758,7 +757,7 @@
 	struct agp_info userinfo;
 	struct agp_kern_info kerninfo;
 
-	agp_copy_info(agp_bridge, &kerninfo);
+	agp_copy_info(&kerninfo);
 
 	userinfo.version.major = kerninfo.version.major;
 	userinfo.version.minor = kerninfo.version.minor;
@@ -778,6 +777,7 @@
 
 static int agpioc_acquire_wrap(struct agp_file_private *priv)
 {
+	int ret;
 	struct agp_controller *controller;
 
 	DBG("");
@@ -788,15 +788,11 @@
 	if (agp_fe.current_controller != NULL)
 		return -EBUSY;
 
-	if(!agp_bridge)
-		return -ENODEV;
-
-        if (atomic_read(&agp_bridge->agp_in_use))
-                return -EBUSY;
-
-	atomic_inc(&agp_bridge->agp_in_use);
-
-	agp_fe.backend_acquired = TRUE;
+	ret = agp_backend_acquire();
+	if (ret == 0)
+		agp_fe.backend_acquired = TRUE;
+	else
+		return ret;
 
 	controller = agp_find_controller_by_pid(priv->my_pid);
 
@@ -807,7 +803,7 @@
 
 		if (controller == NULL) {
 			agp_fe.backend_acquired = FALSE;
-			agp_backend_release(agp_bridge);
+			agp_backend_release();
 			return -ENOMEM;
 		}
 		agp_insert_controller(controller);
@@ -834,7 +830,7 @@
 	if (copy_from_user(&mode, arg, sizeof(struct agp_setup)))
 		return -EFAULT;
 
-	agp_enable(agp_bridge, mode.agp_mode);
+	agp_enable(mode.agp_mode);
 	return 0;
 }
 
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/generic.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/generic.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/generic.c	2005-02-14 17:29:20.614894832 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/generic.c	2005-02-16 23:10:19.259884560 -0800
@@ -1,6 +1,5 @@
 /*
  * AGPGART driver.
- * Copyright (C) 2004 Silicon Graphics, Inc.
  * Copyright (C) 2002-2005 Dave Jones.
  * Copyright (C) 1999 Jeff Hartmann.
  * Copyright (C) 1999 Precision Insight, Inc.
@@ -140,19 +139,19 @@
 {
 	size_t i;
 
-	if (curr == NULL)
+	if ((agp_bridge->type == NOT_SUPPORTED) || (curr == NULL))
 		return;
 
 	if (curr->is_bound == TRUE)
 		agp_unbind_memory(curr);
 
 	if (curr->type != 0) {
-		curr->bridge->driver->free_by_type(curr);
+		agp_bridge->driver->free_by_type(curr);
 		return;
 	}
 	if (curr->page_count != 0) {
 		for (i = 0; i < curr->page_count; i++) {
-			curr->bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[i]));
+			agp_bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[i]));
 		}
 	}
 	agp_free_key(curr->key);
@@ -174,23 +173,20 @@
  *
  *	It returns NULL whenever memory is unavailable.
  */
-struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,
-					size_t page_count, u32 type)
+struct agp_memory *agp_allocate_memory(size_t page_count, u32 type)
 {
 	int scratch_pages;
 	struct agp_memory *new;
 	size_t i;
 
-	if (!bridge)
+	if (agp_bridge->type == NOT_SUPPORTED)
 		return NULL;
 
-	if ((atomic_read(&bridge->current_memory_agp) + page_count) > bridge->max_memory_agp)
+	if ((atomic_read(&agp_bridge->current_memory_agp) + page_count) > agp_bridge->max_memory_agp)
 		return NULL;
 
 	if (type != 0) {
-		new = bridge->driver->alloc_by_type(page_count, type);
-		if (new)
-			new->bridge = bridge;
+		new = agp_bridge->driver->alloc_by_type(page_count, type);
 		return new;
 	}
 
@@ -202,7 +198,7 @@
 		return NULL;
 
 	for (i = 0; i < page_count; i++) {
-		void *addr = bridge->driver->agp_alloc_page(bridge);
+		void *addr = agp_bridge->driver->agp_alloc_page();
 
 		if (addr == NULL) {
 			agp_free_memory(new);
@@ -211,7 +207,6 @@
 		new->memory[i] = virt_to_phys(addr);
 		new->page_count++;
 	}
-       new->bridge = bridge;
 
 	flush_agp_mappings();
 
@@ -315,36 +310,38 @@
  *	This function copies information about the agp bridge device and the state of
  *	the agp backend into an agp_kern_info pointer.
  */
-int agp_copy_info(struct agp_bridge_data *bridge, struct agp_kern_info *info)
+int agp_copy_info(struct agp_kern_info *info)
 {
 	memset(info, 0, sizeof(struct agp_kern_info));
-	if (!bridge) {
+	if (!agp_bridge || agp_bridge->type == NOT_SUPPORTED ||
+	    !agp_bridge->version) {
 		info->chipset = NOT_SUPPORTED;
 		return -EIO;
 	}
 
-	info->version.major = bridge->version->major;
-	info->version.minor = bridge->version->minor;
-	info->chipset = SUPPORTED;
-	info->device = bridge->dev;
-	if (check_bridge_mode(bridge->dev))
-		info->mode = bridge->mode & ~AGP3_RESERVED_MASK;
+	info->version.major = agp_bridge->version->major;
+	info->version.minor = agp_bridge->version->minor;
+	info->chipset = agp_bridge->type;
+	info->device = agp_bridge->dev;
+	if (check_bridge_mode(agp_bridge->dev))
+		info->mode = agp_bridge->mode & ~AGP3_RESERVED_MASK;
 	else
-		info->mode = bridge->mode & ~AGP2_RESERVED_MASK;
-	info->mode = bridge->mode;
-	info->aper_base = bridge->gart_bus_addr;
+		info->mode = agp_bridge->mode & ~AGP2_RESERVED_MASK;
+	info->aper_base = agp_bridge->gart_bus_addr;
 	info->aper_size = agp_return_size();
-	info->max_memory = bridge->max_memory_agp;
-	info->current_memory = atomic_read(&bridge->current_memory_agp);
-	info->cant_use_aperture = bridge->driver->cant_use_aperture;
-	info->vm_ops = bridge->vm_ops;
+	info->max_memory = agp_bridge->max_memory_agp;
+	info->current_memory = atomic_read(&agp_bridge->current_memory_agp);
+	info->cant_use_aperture = agp_bridge->driver->cant_use_aperture;
+	info->vm_ops = agp_bridge->vm_ops;
 	info->page_mask = ~0UL;
 	return 0;
 }
 EXPORT_SYMBOL(agp_copy_info);
 
+
 /* End - Routine to copy over information structure */
 
+
 /*
  * Routines for handling swapping of agp_memory into the GATT -
  * These routines take agp_memory and insert them into the GATT.
@@ -364,7 +361,7 @@
 {
 	int ret_val;
 
-	if (curr == NULL)
+	if ((agp_bridge->type == NOT_SUPPORTED) || (curr == NULL))
 		return -EINVAL;
 
 	if (curr->is_bound == TRUE) {
@@ -372,10 +369,10 @@
 		return -EINVAL;
 	}
 	if (curr->is_flushed == FALSE) {
-		curr->bridge->driver->cache_flush();
+		agp_bridge->driver->cache_flush();
 		curr->is_flushed = TRUE;
 	}
-	ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type);
+	ret_val = agp_bridge->driver->insert_memory(curr, pg_start, curr->type);
 
 	if (ret_val != 0)
 		return ret_val;
@@ -399,7 +396,7 @@
 {
 	int ret_val;
 
-	if (curr == NULL)
+	if ((agp_bridge->type == NOT_SUPPORTED) || (curr == NULL))
 		return -EINVAL;
 
 	if (curr->is_bound != TRUE) {
@@ -407,7 +404,7 @@
 		return -EINVAL;
 	}
 
-	ret_val = curr->bridge->driver->remove_memory(curr, curr->pg_start, curr->type);
+	ret_val = agp_bridge->driver->remove_memory(curr, curr->pg_start, curr->type);
 
 	if (ret_val != 0)
 		return ret_val;
@@ -703,17 +700,17 @@
 	u32 ncapid;
 
 	/* Exit early if already set by errata workarounds. */
-	if (bridge->major_version != 0)
+	if (agp_bridge->major_version != 0)
 		return;
 
-	pci_read_config_dword(bridge->dev, bridge->capndx, &ncapid);
-	bridge->major_version = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf;
-	bridge->minor_version = (ncapid >> AGP_MINOR_VERSION_SHIFT) & 0xf;
+	pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx, &ncapid);
+	agp_bridge->major_version = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf;
+	agp_bridge->minor_version = (ncapid >> AGP_MINOR_VERSION_SHIFT) & 0xf;
 }
 EXPORT_SYMBOL(get_agp_version);
 
 
-void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode)
+void agp_generic_enable(u32 requested_mode)
 {
 	u32 bridge_agpstat, temp;
 
@@ -735,21 +732,19 @@
 	bridge_agpstat |= AGPSTAT_AGP_ENABLE;
 
 	/* Do AGP version specific frobbing. */
-	if (bridge->major_version >= 3) {
-		if (check_bridge_mode(bridge->dev)) {
+	if(agp_bridge->major_version >= 3) {
+		if (check_bridge_mode(agp_bridge->dev)) {
 			/* If we have 3.5, we can do the isoch stuff. */
-			if (bridge->minor_version >= 5)
-				agp_3_5_enable(bridge);
+			if (agp_bridge->minor_version >= 5)
+				agp_3_5_enable(agp_bridge);
 			agp_device_command(bridge_agpstat, TRUE);
 			return;
 		} else {
 		    /* Disable calibration cycle in RX91<1> when not in AGP3.0 mode of operation.*/
 		    bridge_agpstat &= ~(7<<10) ;
-		    pci_read_config_dword(bridge->dev,
-					bridge->capndx+AGPCTRL, &temp);
+		    pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx+AGPCTRL, &temp);
 		    temp |= (1<<9);
-		    pci_write_config_dword(bridge->dev,
-					bridge->capndx+AGPCTRL, temp);
+		    pci_write_config_dword(agp_bridge->dev, agp_bridge->capndx+AGPCTRL, temp);
 
 		    printk (KERN_INFO PFX "Device is in legacy mode,"
 				" falling back to 2.x\n");
@@ -762,7 +757,7 @@
 EXPORT_SYMBOL(agp_generic_enable);
 
 
-int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
+int agp_generic_create_gatt_table(void)
 {
 	char *table;
 	char *table_end;
@@ -774,17 +769,17 @@
 	struct page *page;
 
 	/* The generic routines can't handle 2 level gatt's */
-	if (bridge->driver->size_type == LVL2_APER_SIZE)
+	if (agp_bridge->driver->size_type == LVL2_APER_SIZE)
 		return -EINVAL;
 
 	table = NULL;
-	i = bridge->aperture_size_idx;
-	temp = bridge->current_size;
+	i = agp_bridge->aperture_size_idx;
+	temp = agp_bridge->current_size;
 	size = page_order = num_entries = 0;
 
-	if (bridge->driver->size_type != FIXED_APER_SIZE) {
+	if (agp_bridge->driver->size_type != FIXED_APER_SIZE) {
 		do {
-			switch (bridge->driver->size_type) {
+			switch (agp_bridge->driver->size_type) {
 			case U8_APER_SIZE:
 				size = A_SIZE_8(temp)->size;
 				page_order =
@@ -815,29 +810,29 @@
 
 			if (table == NULL) {
 				i++;
-				switch (bridge->driver->size_type) {
+				switch (agp_bridge->driver->size_type) {
 				case U8_APER_SIZE:
-					bridge->current_size = A_IDX8(bridge);
+					agp_bridge->current_size = A_IDX8(agp_bridge);
 					break;
 				case U16_APER_SIZE:
-					bridge->current_size = A_IDX16(bridge);
+					agp_bridge->current_size = A_IDX16(agp_bridge);
 					break;
 				case U32_APER_SIZE:
-					bridge->current_size = A_IDX32(bridge);
+					agp_bridge->current_size = A_IDX32(agp_bridge);
 					break;
 					/* This case will never really happen. */
 				case FIXED_APER_SIZE:
 				case LVL2_APER_SIZE:
 				default:
-					bridge->current_size =
-					    bridge->current_size;
+					agp_bridge->current_size =
+					    agp_bridge->current_size;
 					break;
 				}
-				temp = bridge->current_size;
+				temp = agp_bridge->current_size;
 			} else {
-				bridge->aperture_size_idx = i;
+				agp_bridge->aperture_size_idx = i;
 			}
-		} while (!table && (i < bridge->driver->num_aperture_sizes));
+		} while (!table && (i < agp_bridge->driver->num_aperture_sizes));
 	} else {
 		size = ((struct aper_size_info_fixed *) temp)->size;
 		page_order = ((struct aper_size_info_fixed *) temp)->page_order;
@@ -853,15 +848,15 @@
 	for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)
 		SetPageReserved(page);
 
-	bridge->gatt_table_real = (u32 *) table;
+	agp_bridge->gatt_table_real = (u32 *) table;
 	agp_gatt_table = (void *)table;
 
-	bridge->driver->cache_flush();
-	bridge->gatt_table = ioremap_nocache(virt_to_phys(table),
+	agp_bridge->driver->cache_flush();
+	agp_bridge->gatt_table = ioremap_nocache(virt_to_phys(table),
 					(PAGE_SIZE * (1 << page_order)));
-	bridge->driver->cache_flush();
+	agp_bridge->driver->cache_flush();
 
-	if (bridge->gatt_table == NULL) {
+	if (agp_bridge->gatt_table == NULL) {
 		for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)
 			ClearPageReserved(page);
 
@@ -869,28 +864,28 @@
 
 		return -ENOMEM;
 	}
-	bridge->gatt_bus_addr = virt_to_phys(bridge->gatt_table_real);
+	agp_bridge->gatt_bus_addr = virt_to_phys(agp_bridge->gatt_table_real);
 
 	/* AK: bogus, should encode addresses > 4GB */
 	for (i = 0; i < num_entries; i++) {
-		writel(bridge->scratch_page, bridge->gatt_table+i);
-		readl(bridge->gatt_table+i);	/* PCI Posting. */
+		writel(agp_bridge->scratch_page, agp_bridge->gatt_table+i);
+		readl(agp_bridge->gatt_table+i);	/* PCI Posting. */
 	}
 
 	return 0;
 }
 EXPORT_SYMBOL(agp_generic_create_gatt_table);
 
-int agp_generic_free_gatt_table(struct agp_bridge_data *bridge)
+int agp_generic_free_gatt_table(void)
 {
 	int page_order;
 	char *table, *table_end;
 	void *temp;
 	struct page *page;
 
-	temp = bridge->current_size;
+	temp = agp_bridge->current_size;
 
-	switch (bridge->driver->size_type) {
+	switch (agp_bridge->driver->size_type) {
 	case U8_APER_SIZE:
 		page_order = A_SIZE_8(temp)->page_order;
 		break;
@@ -916,19 +911,19 @@
 	 * called, then all agp memory is deallocated and removed
 	 * from the table. */
 
-	iounmap(bridge->gatt_table);
-	table = (char *) bridge->gatt_table_real;
+	iounmap(agp_bridge->gatt_table);
+	table = (char *) agp_bridge->gatt_table_real;
 	table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1);
 
 	for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)
 		ClearPageReserved(page);
 
-	free_pages((unsigned long) bridge->gatt_table_real, page_order);
+	free_pages((unsigned long) agp_bridge->gatt_table_real, page_order);
 
 	agp_gatt_table = NULL;
-	bridge->gatt_table = NULL;
-	bridge->gatt_table_real = NULL;
-	bridge->gatt_bus_addr = 0;
+	agp_bridge->gatt_table = NULL;
+	agp_bridge->gatt_table_real = NULL;
+	agp_bridge->gatt_bus_addr = 0;
 
 	return 0;
 }
@@ -941,15 +936,10 @@
 	size_t i;
 	off_t j;
 	void *temp;
-	struct agp_bridge_data *bridge;
-
-	bridge = mem->bridge;
-	if (!bridge)
-		return -EINVAL;
 
-	temp = bridge->current_size;
+	temp = agp_bridge->current_size;
 
-	switch (bridge->driver->size_type) {
+	switch (agp_bridge->driver->size_type) {
 	case U8_APER_SIZE:
 		num_entries = A_SIZE_8(temp)->num_entries;
 		break;
@@ -986,22 +976,22 @@
 	j = pg_start;
 
 	while (j < (pg_start + mem->page_count)) {
-		if (!PGE_EMPTY(bridge, readl(bridge->gatt_table+j)))
+		if (!PGE_EMPTY(agp_bridge, readl(agp_bridge->gatt_table+j)))
 			return -EBUSY;
 		j++;
 	}
 
 	if (mem->is_flushed == FALSE) {
-		bridge->driver->cache_flush();
+		agp_bridge->driver->cache_flush();
 		mem->is_flushed = TRUE;
 	}
 
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
-		writel(bridge->driver->mask_memory(bridge, mem->memory[i], mem->type), bridge->gatt_table+j);
-		readl(bridge->gatt_table+j);	/* PCI Posting. */
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), agp_bridge->gatt_table+j);
+		readl(agp_bridge->gatt_table+j);	/* PCI Posting. */
 	}
 
-	bridge->driver->tlb_flush(mem);
+	agp_bridge->driver->tlb_flush(mem);
 	return 0;
 }
 EXPORT_SYMBOL(agp_generic_insert_memory);
@@ -1010,11 +1000,6 @@
 int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
 {
 	size_t i;
-	struct agp_bridge_data *bridge;
-
-	bridge = mem->bridge;
-	if (!bridge)
-		return -EINVAL;
 
 	if (type != 0 || mem->type != 0) {
 		/* The generic routines know nothing of memory types */
@@ -1023,12 +1008,12 @@
 
 	/* AK: bogus, should encode addresses > 4GB */
 	for (i = pg_start; i < (mem->page_count + pg_start); i++) {
-		writel(bridge->scratch_page, bridge->gatt_table+i);
-		readl(bridge->gatt_table+i);	/* PCI Posting. */
+		writel(agp_bridge->scratch_page, agp_bridge->gatt_table+i);
+		readl(agp_bridge->gatt_table+i);	/* PCI Posting. */
 	}
 
 	global_cache_flush();
-	bridge->driver->tlb_flush(mem);
+	agp_bridge->driver->tlb_flush(mem);
 	return 0;
 }
 EXPORT_SYMBOL(agp_generic_remove_memory);
@@ -1059,7 +1044,7 @@
  * against a maximum value.
  */
 
-void *agp_generic_alloc_page(struct agp_bridge_data *bridge)
+void *agp_generic_alloc_page(void)
 {
 	struct page * page;
 
@@ -1101,25 +1086,14 @@
  *
  * @mode:	agp mode register value to configure with.
  */
-void agp_enable(struct agp_bridge_data *bridge, u32 mode)
+void agp_enable(u32 mode)
 {
-	if (!bridge)
+	if (agp_bridge->type == NOT_SUPPORTED)
 		return;
-	bridge->driver->agp_enable(bridge, mode);
+	agp_bridge->driver->agp_enable(mode);
 }
 EXPORT_SYMBOL(agp_enable);
 
-/* When we remove the global variable agp_bridge from all drivers
- * then agp_alloc_bridge and agp_generic_find_bridge need to be updated
- */
-
-struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev)
-{
-	if (list_empty(&agp_bridges))
-		return NULL;
-
-	return agp_bridge;
-}
 
 static void ipi_handler(void *null)
 {
@@ -1133,12 +1107,11 @@
 }
 EXPORT_SYMBOL(global_cache_flush);
 
-unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge,
-	unsigned long addr, int type)
+unsigned long agp_generic_mask_memory(unsigned long addr, int type)
 {
 	/* memory type is ignored in the generic routine */
-	if (bridge->driver->masks)
-		return addr | bridge->driver->masks[0].mask;
+	if (agp_bridge->driver->masks)
+		return addr | agp_bridge->driver->masks[0].mask;
 	else
 		return addr;
 }
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/hp-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/hp-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/hp-agp.c	2005-02-14 17:29:20.616894528 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/hp-agp.c	2005-02-16 23:09:50.202301984 -0800
@@ -289,7 +289,7 @@
 }
 
 static int
-hp_zx1_create_gatt_table (struct agp_bridge_data *bridge)
+hp_zx1_create_gatt_table (void)
 {
 	struct _hp_private *hp = &hp_private;
 	int i;
@@ -317,7 +317,7 @@
 }
 
 static int
-hp_zx1_free_gatt_table (struct agp_bridge_data *bridge)
+hp_zx1_free_gatt_table (void)
 {
 	struct _hp_private *hp = &hp_private;
 
@@ -367,9 +367,7 @@
 		for (k = 0;
 		     k < hp->io_pages_per_kpage;
 		     k++, j++, paddr += hp->io_page_size) {
-			hp->gatt[j] =
-				agp_bridge->driver->mask_memory(agp_bridge,
-					paddr, type);
+			hp->gatt[j] = agp_bridge->driver->mask_memory(paddr, type);
 		}
 	}
 
@@ -398,20 +396,19 @@
 }
 
 static unsigned long
-hp_zx1_mask_memory (struct agp_bridge_data *bridge,
-	unsigned long addr, int type)
+hp_zx1_mask_memory (unsigned long addr, int type)
 {
 	return HP_ZX1_PDIR_VALID_BIT | addr;
 }
 
 static void
-hp_zx1_enable (struct agp_bridge_data *bridge, u32 mode)
+hp_zx1_enable (u32 mode)
 {
 	struct _hp_private *hp = &hp_private;
 	u32 command;
 
 	command = readl(hp->lba_regs+hp->lba_cap_offset+PCI_AGP_STATUS);
-	command = agp_collect_device_status(bridge, mode, command);
+	command = agp_collect_device_status(mode, command);
 	command |= 0x00000100;
 
 	writel(command, hp->lba_regs+hp->lba_cap_offset+PCI_AGP_COMMAND);
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/i460-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/i460-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/i460-agp.c	2005-02-14 17:29:20.618894224 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/i460-agp.c	2005-02-16 23:10:00.375755384 -0800
@@ -233,7 +233,7 @@
 	return 0;
 }
 
-static int i460_create_gatt_table (struct agp_bridge_data *bridge)
+static int i460_create_gatt_table (void)
 {
 	int page_order, num_entries, i;
 	void *temp;
@@ -258,7 +258,7 @@
 	return 0;
 }
 
-static int i460_free_gatt_table (struct agp_bridge_data *bridge)
+static int i460_free_gatt_table (void)
 {
 	int num_entries, i;
 	void *temp;
@@ -314,8 +314,7 @@
 	for (i = 0, j = io_pg_start; i < mem->page_count; i++) {
 		paddr = mem->memory[i];
 		for (k = 0; k < I460_IOPAGES_PER_KPAGE; k++, j++, paddr += io_page_size)
-			WR_GATT(j, agp_bridge->driver->mask_memory(agp_bridge,
-				paddr, mem->type));
+			WR_GATT(j, agp_bridge->driver->mask_memory(paddr, mem->type));
 	}
 	WR_FLUSH_GATT(j - 1);
 	return 0;
@@ -428,8 +427,7 @@
 			if (i460_alloc_large_page(lp) < 0)
 				return -ENOMEM;
 			pg = lp - i460.lp_desc;
-			WR_GATT(pg, agp_bridge->driver->mask_memory(agp_bridge,
-				lp->paddr, 0));
+			WR_GATT(pg, agp_bridge->driver->mask_memory(lp->paddr, 0));
 			WR_FLUSH_GATT(pg);
 		}
 
@@ -510,12 +508,12 @@
  * Let's just hope nobody counts on the allocated AGP memory being there before bind time
  * (I don't think current drivers do)...
  */
-static void *i460_alloc_page (struct agp_bridge_data *bridge)
+static void *i460_alloc_page (void)
 {
 	void *page;
 
 	if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT)
-		page = agp_generic_alloc_page(agp_bridge);
+		page = agp_generic_alloc_page();
 	else
 		/* Returning NULL would cause problems */
 		/* AK: really dubious code. */
@@ -531,11 +529,10 @@
 
 #endif /* I460_LARGE_IO_PAGES */
 
-static unsigned long i460_mask_memory (struct agp_bridge_data *bridge,
-	unsigned long addr, int type)
+static unsigned long i460_mask_memory (unsigned long addr, int type)
 {
 	/* Make sure the returned address is a valid GATT entry */
-	return bridge->driver->masks[0].mask
+	return agp_bridge->driver->masks[0].mask
 		| (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xffffff000) >> 12);
 }
 
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/intel-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/intel-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/intel-agp.c	2005-02-14 17:29:20.621893768 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/intel-agp.c	2005-02-16 23:10:00.377755080 -0800
@@ -150,7 +150,7 @@
 	return;
 }
 
-static void intel_i810_agp_enable(struct agp_bridge_data *bridge, u32 mode)
+static void intel_i810_agp_enable(u32 mode)
 {
 	return;
 }
@@ -229,9 +229,8 @@
 insert:
 	global_cache_flush();
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
-		writel(agp_bridge->driver->mask_memory(agp_bridge,
-			mem->memory[i], mem->type),
-			intel_i810_private.registers+I810_PTE_BASE+(j*4));
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type),
+				intel_i810_private.registers+I810_PTE_BASE+(j*4));
 		readl(intel_i810_private.registers+I810_PTE_BASE+(j*4));	/* PCI Posting. */
 	}
 	global_cache_flush();
@@ -269,7 +268,7 @@
 		return NULL;
 
 	switch (pg_count) {
-	case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge);
+	case 1: addr = agp_bridge->driver->agp_alloc_page();
 		break;
 	case 4:
 		/* kludge to get 4 physical pages for ARGB cursor */
@@ -338,11 +337,10 @@
 	kfree(curr);
 }
 
-static unsigned long intel_i810_mask_memory(struct agp_bridge_data *bridge,
-	unsigned long addr, int type)
+static unsigned long intel_i810_mask_memory(unsigned long addr, int type)
 {
 	/* Type checking must be done elsewhere */
-	return addr | bridge->driver->masks[type].mask;
+	return addr | agp_bridge->driver->masks[type].mask;
 }
 
 static struct aper_size_info_fixed intel_i830_sizes[] =
@@ -449,7 +447,7 @@
 /* The intel i830 automatically initializes the agp aperture during POST.
  * Use the memory already set aside for in the GTT.
  */
-static int intel_i830_create_gatt_table(struct agp_bridge_data *bridge)
+static int intel_i830_create_gatt_table(void)
 {
 	int page_order;
 	struct aper_size_info_fixed *size;
@@ -484,7 +482,7 @@
 /* Return the gatt table to a sane state. Use the top of stolen
  * memory for the GTT.
  */
-static int intel_i830_free_gatt_table(struct agp_bridge_data *bridge)
+static int intel_i830_free_gatt_table(void)
 {
 	return 0;
 }
@@ -584,9 +582,8 @@
 	global_cache_flush();	/* FIXME: Necessary ?*/
 
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
-		writel(agp_bridge->driver->mask_memory(agp_bridge,
-			mem->memory[i], mem->type),
-			intel_i830_private.registers+I810_PTE_BASE+(j*4));
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type),
+				intel_i830_private.registers+I810_PTE_BASE+(j*4));
 		readl(intel_i830_private.registers+I810_PTE_BASE+(j*4));	/* PCI Posting. */
 	}
 
@@ -694,8 +691,7 @@
 	global_cache_flush();
 
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
-		writel(agp_bridge->driver->mask_memory(agp_bridge,
-			mem->memory[i], mem->type), intel_i830_private.gtt+j);
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), intel_i830_private.gtt+j);
 		readl(intel_i830_private.gtt+j);	/* PCI Posting. */
 	}
 
@@ -747,7 +743,7 @@
 /* The intel i915 automatically initializes the agp aperture during POST.
  * Use the memory already set aside for in the GTT.
  */
-static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
+static int intel_i915_create_gatt_table(void)
 {
 	int page_order;
 	struct aper_size_info_fixed *size;
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/nvidia-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/nvidia-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/nvidia-agp.c	2005-02-14 17:29:20.640890880 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/nvidia-agp.c	2005-02-16 23:09:50.246295296 -0800
@@ -215,8 +215,7 @@
 		mem->is_flushed = TRUE;
 	}
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
-		writel(agp_bridge->driver->mask_memory(agp_bridge,
-			mem->memory[i], mem->type),
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type),
 			agp_bridge->gatt_table+nvidia_private.pg_offset+j);
 		readl(agp_bridge->gatt_table+nvidia_private.pg_offset+j);	/* PCI Posting. */
 	}
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/sis-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/sis-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/sis-agp.c	2005-02-14 17:29:20.641890728 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/sis-agp.c	2005-02-16 23:09:50.247295144 -0800
@@ -70,7 +70,7 @@
 			      (previous_size->size_value & ~(0x03)));
 }
 
-static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode)
+static void sis_delayed_enable(u32 mode)
 {
 	struct pci_dev *device = NULL;
 	u32 command;
@@ -82,7 +82,7 @@
 		agp_bridge->dev->slot_name);
 
 	pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + PCI_AGP_STATUS, &command);
-	command = agp_collect_device_status(bridge, mode, command);
+	command = agp_collect_device_status(mode, command);
 	command |= AGPSTAT_AGP_ENABLE;
 	rate = (command & 0x7) << 2;
 
@@ -101,7 +101,7 @@
 		 * command register triggers a 5ms screwup during which the master
 		 * cannot be configured		 
 		 */
-		if (device->device == bridge->dev->device) {
+		if (device->device == agp_bridge->dev->device) {
 			printk(KERN_INFO PFX "SiS delay workaround: giving bridge time to recover.\n");
 			msleep(10);
 		}
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/sworks-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/sworks-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/sworks-agp.c	2005-02-14 17:29:20.643890424 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/sworks-agp.c	2005-02-16 23:09:50.249294840 -0800
@@ -141,7 +141,7 @@
 #define GET_GATT_OFF(addr) ((addr & 0x003ff000) >> 12)
 #endif
 
-static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
+static int serverworks_create_gatt_table(void)
 {
 	struct aper_size_info_lvl2 *value;
 	struct serverworks_page_map page_dir;
@@ -192,7 +192,7 @@
 	return 0;
 }
 
-static int serverworks_free_gatt_table(struct agp_bridge_data *bridge)
+static int serverworks_free_gatt_table(void)
 {
 	struct serverworks_page_map page_dir;
    
@@ -341,7 +341,7 @@
 	for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
 		addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr;
 		cur_gatt = SVRWRKS_GET_GATT(addr);
-		writel(agp_bridge->driver->mask_memory(agp_bridge, mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr));
+		writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr));
 	}
 	serverworks_tlbflush(mem);
 	return 0;
@@ -387,15 +387,15 @@
 	{32, 8192, 0xfe000000}
 };
 
-static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode)
+static void serverworks_agp_enable(u32 mode)
 {
 	u32 command;
 
 	pci_read_config_dword(serverworks_private.svrwrks_dev,
-			      bridge->capndx + PCI_AGP_STATUS,
+			      agp_bridge->capndx + PCI_AGP_STATUS,
 			      &command);
 
-	command = agp_collect_device_status(bridge, mode, command);
+	command = agp_collect_device_status(mode, command);
 
 	command &= ~0x10;	/* disable FW */
 	command &= ~0x08;
@@ -403,7 +403,7 @@
 	command |= 0x100;
 
 	pci_write_config_dword(serverworks_private.svrwrks_dev,
-			       bridge->capndx + PCI_AGP_COMMAND,
+			       agp_bridge->capndx + PCI_AGP_COMMAND,
 			       command);
 
 	agp_device_command(command, 0);
diff -Naur linux-2.6.11-rc3-mm2/drivers/char/agp/uninorth-agp.c linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/uninorth-agp.c
--- linux-2.6.11-rc3-mm2/drivers/char/agp/uninorth-agp.c	2005-02-14 17:29:20.644890272 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/drivers/char/agp/uninorth-agp.c	2005-02-16 23:09:50.250294688 -0800
@@ -124,27 +124,27 @@
 	return 0;
 }
 
-static void uninorth_agp_enable(struct agp_bridge_data *bridge, u32 mode)
+static void uninorth_agp_enable(u32 mode)
 {
 	u32 command, scratch;
 	int timeout;
 
-	pci_read_config_dword(bridge->dev,
-			      bridge->capndx + PCI_AGP_STATUS,
+	pci_read_config_dword(agp_bridge->dev,
+			      agp_bridge->capndx + PCI_AGP_STATUS,
 			      &command);
 
-	command = agp_collect_device_status(bridge, mode, command);
+	command = agp_collect_device_status(mode, command);
 	command |= 0x100;
 
 	uninorth_tlbflush(NULL);
 
 	timeout = 0;
 	do {
-		pci_write_config_dword(bridge->dev,
-				       bridge->capndx + PCI_AGP_COMMAND,
+		pci_write_config_dword(agp_bridge->dev,
+				       agp_bridge->capndx + PCI_AGP_COMMAND,
 				       command);
-		pci_read_config_dword(bridge->dev,
-				      bridge->capndx + PCI_AGP_COMMAND,
+		pci_read_config_dword(agp_bridge->dev,
+				       agp_bridge->capndx + PCI_AGP_COMMAND,
 				       &scratch);
 	} while ((scratch & 0x100) == 0 && ++timeout < 1000);
 	if ((scratch & 0x100) == 0)
@@ -155,7 +155,7 @@
 	uninorth_tlbflush(NULL);
 }
 
-static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
+static int uninorth_create_gatt_table(void)
 {
 	char *table;
 	char *table_end;
@@ -212,7 +212,7 @@
 	return 0;
 }
 
-static int uninorth_free_gatt_table(struct agp_bridge_data *bridge)
+static int uninorth_free_gatt_table(void)
 {
 	int page_order;
 	char *table, *table_end;
diff -Naur linux-2.6.11-rc3-mm2/include/linux/agp_backend.h linux-2.6.11-rc3-mm2-nvidia/include/linux/agp_backend.h
--- linux-2.6.11-rc3-mm2/include/linux/agp_backend.h	2005-02-14 17:29:32.714055480 -0800
+++ linux-2.6.11-rc3-mm2-nvidia/include/linux/agp_backend.h	2005-02-16 23:10:19.260884408 -0800
@@ -1,7 +1,6 @@
 /*
  * AGPGART backend specific includes. Not for userspace consumption.
  *
- * Copyright (C) 2004 Silicon Graphics, Inc.
  * Copyright (C) 2002-2003 Dave Jones
  * Copyright (C) 1999 Jeff Hartmann
  * Copyright (C) 1999 Precision Insight, Inc.
@@ -72,16 +71,13 @@
  * the items to detrimine the status of this block of agp memory. 
  */
 
-struct agp_bridge_data;
-
 struct agp_memory {
+	int key;
 	struct agp_memory *next;
 	struct agp_memory *prev;
-	struct agp_bridge_data *bridge;
-	unsigned long *memory;
 	size_t page_count;
-	int key;
 	int num_scratch_pages;
+	unsigned long *memory;
 	off_t pg_start;
 	u32 type;
 	u32 physical;
@@ -91,19 +87,14 @@
 
 #define AGP_NORMAL_MEMORY 0
 
-extern struct agp_bridge_data *agp_bridge;
-extern struct list_head agp_bridges;
-
-extern struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *);
-
 extern void agp_free_memory(struct agp_memory *);
-extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t, u32);
-extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *);
+extern struct agp_memory *agp_allocate_memory(size_t, u32);
+extern int agp_copy_info(struct agp_kern_info *);
 extern int agp_bind_memory(struct agp_memory *, off_t);
 extern int agp_unbind_memory(struct agp_memory *);
-extern void agp_enable(struct agp_bridge_data *, u32);
-extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *);
-extern void agp_backend_release(struct agp_bridge_data *);
+extern void agp_enable(u32);
+extern int agp_backend_acquire(void);
+extern void agp_backend_release(void);
 
 #endif				/* __KERNEL__ */
 #endif				/* _AGP_BACKEND_H */
