diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index 150ff18161a873fc08701360f777a1547fd6b2af..c51259a5dbf48ccae068bccec6ef5704e7ea5009 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/defconfig
@@ -718,7 +718,7 @@ CONFIG_AGP=y
 # CONFIG_AGP_ALI is not set
 # CONFIG_AGP_ATI is not set
 # CONFIG_AGP_AMD is not set
-# CONFIG_AGP_AMD_8151 is not set
+# CONFIG_AGP_AMD64 is not set
 CONFIG_AGP_INTEL=y
 # CONFIG_AGP_NVIDIA is not set
 # CONFIG_AGP_SIS is not set
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
index c0474ff8674b9e5b8a57c624e5351cb58e3074a0..d9870aaa4833183bc6e5257117470d5ff0af1c3a 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/defconfig
@@ -561,7 +561,7 @@ CONFIG_RTC=y
 #
 # CONFIG_FTAPE is not set
 CONFIG_AGP=y
-CONFIG_AGP_AMD_8151=y
+CONFIG_AGP_AMD64=y
 # CONFIG_DRM is not set
 # CONFIG_MWAVE is not set
 CONFIG_RAW_DRIVER=y
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 6842d58234654186f20792a06690276eae32f3d4..3510604677d894e6d27c7d88a36ebf59f2f4ee8d 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -675,7 +675,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
 	return -1; 
 } 
 
-extern int agp_amdk8_init(void);
+extern int agp_amd64_init(void);
 
 static int __init pci_iommu_init(void)
 { 
@@ -690,7 +690,7 @@ static int __init pci_iommu_init(void)
 	/* Makefile puts PCI initialization via subsys_initcall first. */
 	/* Add other K8 AGP bridge drivers here */
 	no_agp = no_agp || 
-		(agp_amdk8_init() < 0) || 
+		(agp_amd64_init() < 0) || 
 		(agp_copy_info(&info) < 0); 
 #endif	
 
diff --git a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig
index 7358eed7a3484a10886ef717c1dac6b1ff641756..3e30720a167ca70b62629e7654e540a0d5787d18 100644
--- a/drivers/char/agp/Kconfig
+++ b/drivers/char/agp/Kconfig
@@ -63,8 +63,7 @@ config AGP_AMD
 	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
 	  use GLX or DRI.  If unsure, say N.
 
-# RED-PEN this option is misnamed, it's not 8151 specific
-config AGP_AMD_8151
+config AGP_AMD64
 	tristate "AMD Opteron/Athlon64 on-CPU GART support" if !GART_IOMMU
 	depends on AGP && X86
 	default y if GART_IOMMU
diff --git a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile
index b537a8394cf1b2f1853bc3837f87545f0f692c6d..16194948cc54d77e1cc2f97a6f61732776404393 100644
--- a/drivers/char/agp/Makefile
+++ b/drivers/char/agp/Makefile
@@ -4,7 +4,7 @@ obj-$(CONFIG_AGP)		+= agpgart.o
 obj-$(CONFIG_AGP_ALI)		+= ali-agp.o
 obj-$(CONFIG_AGP_ATI)		+= ati-agp.o
 obj-$(CONFIG_AGP_AMD)		+= amd-k7-agp.o
-obj-$(CONFIG_AGP_AMD_8151)	+= amd-k8-agp.o
+obj-$(CONFIG_AGP_AMD64)		+= amd64-agp.o
 obj-$(CONFIG_AGP_ALPHA_CORE)	+= alpha-agp.o
 obj-$(CONFIG_AGP_HP_ZX1)	+= hp-agp.o
 obj-$(CONFIG_AGP_I460)		+= i460-agp.o
diff --git a/drivers/char/agp/amd-k8-agp.c b/drivers/char/agp/amd64-agp.c
similarity index 88%
rename from drivers/char/agp/amd-k8-agp.c
rename to drivers/char/agp/amd64-agp.c
index d147b09056bcad40b5db42f23997084d2514600b..8ae550973d4e1c7a67e7d526e29666a05120d6ee 100644
--- a/drivers/char/agp/amd-k8-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -14,7 +14,7 @@
 #include <linux/agp_backend.h>
 #include "agp.h"
 
-/* Will need to be increased if hammer ever goes >8-way. */
+/* Will need to be increased if AMD64 ever goes >8-way. */
 #ifdef CONFIG_SMP
 #define MAX_HAMMER_GARTS   8
 #else
@@ -42,7 +42,7 @@ static int __initdata agp_try_unsupported;
 static int gart_iterator;
 #define for_each_nb() for(gart_iterator=0;gart_iterator<nr_garts;gart_iterator++)
 
-static void flush_x86_64_tlb(struct pci_dev *dev)
+static void flush_amd64_tlb(struct pci_dev *dev)
 {
 	u32 tmp;
 
@@ -51,13 +51,13 @@ static void flush_x86_64_tlb(struct pci_dev *dev)
 	pci_write_config_dword (dev, AMD64_GARTCACHECTL, tmp);
 }
 
-static void amd_x86_64_tlbflush(struct agp_memory *temp)
+static void amd64_tlbflush(struct agp_memory *temp)
 {
 	for_each_nb()
-		flush_x86_64_tlb(hammers[gart_iterator]);
+		flush_amd64_tlb(hammers[gart_iterator]);
 }
 
-static int x86_64_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
+static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
 {
 	int i, j, num_entries;
 	long tmp;
@@ -97,7 +97,7 @@ static int x86_64_insert_memory(struct agp_memory *mem, off_t pg_start, int type
 
 		agp_bridge->gatt_table[j] = pte;
 	}
-	amd_x86_64_tlbflush(mem);
+	amd64_tlbflush(mem);
 	return 0;
 }
 
@@ -106,7 +106,7 @@ static int x86_64_insert_memory(struct agp_memory *mem, off_t pg_start, int type
  * to the size of a long. It sucks. I totally disown this, even
  * though it does appear to work for the most part.
  */
-static struct aper_size_info_32 x86_64_aperture_sizes[7] =
+static struct aper_size_info_32 amd64_aperture_sizes[7] =
 {
 	{32,   8192,   3+(sizeof(long)/8), 0 },
 	{64,   16384,  4+(sizeof(long)/8), 1<<1 },
@@ -124,7 +124,7 @@ static struct aper_size_info_32 x86_64_aperture_sizes[7] =
  * the value from the first one we find. The set_size functions
  * keep the rest coherent anyway. Or at least should do.
  */
-static int amd_x86_64_fetch_size(void)
+static int amd64_fetch_size(void)
 {
 	struct pci_dev *dev;
 	int i;
@@ -137,7 +137,7 @@ static int amd_x86_64_fetch_size(void)
 
 	pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &temp);
 	temp = (temp & 0xe);
-	values = A_SIZE_32(x86_64_aperture_sizes);
+	values = A_SIZE_32(amd64_aperture_sizes);
 
 	for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) {
 		if (temp == values[i].size_value) {
@@ -155,7 +155,7 @@ static int amd_x86_64_fetch_size(void)
  * In a multiprocessor x86-64 system, this function gets
  * called once for each CPU.
  */
-static u64 amd_x86_64_configure (struct pci_dev *hammer, u64 gatt_table)
+static u64 amd64_configure (struct pci_dev *hammer, u64 gatt_table)
 {
 	u64 aperturebase;
 	u32 tmp;
@@ -180,7 +180,7 @@ static u64 amd_x86_64_configure (struct pci_dev *hammer, u64 gatt_table)
 	pci_write_config_dword(hammer, AMD64_GARTAPERTURECTL, tmp);
 
 	/* keep CPU's coherent. */
-	flush_x86_64_tlb (hammer);
+	flush_amd64_tlb (hammer);
 	
 	return aper_base;
 }
@@ -204,13 +204,13 @@ static int amd_8151_configure(void)
 	/* Configure AGP regs in each x86-64 host bridge. */
 	for_each_nb() {
 		agp_bridge->gart_bus_addr =
-				amd_x86_64_configure(hammers[gart_iterator],gatt_bus);
+				amd64_configure(hammers[gart_iterator],gatt_bus);
 	}
 	return 0;
 }
 
 
-static void amd_8151_cleanup(void)
+static void amd64_cleanup(void)
 {
 	u32 tmp;
 
@@ -229,16 +229,16 @@ struct agp_bridge_driver amd_8151_driver = {
 	.size_type		= U32_APER_SIZE,
 	.num_aperture_sizes	= 7,
 	.configure		= amd_8151_configure,
-	.fetch_size		= amd_x86_64_fetch_size,
-	.cleanup		= amd_8151_cleanup,
-	.tlb_flush		= amd_x86_64_tlbflush,
+	.fetch_size		= amd64_fetch_size,
+	.cleanup		= amd64_cleanup,
+	.tlb_flush		= amd64_tlbflush,
 	.mask_memory		= agp_generic_mask_memory,
 	.masks			= NULL,
 	.agp_enable		= agp_generic_enable,
 	.cache_flush		= global_cache_flush,
 	.create_gatt_table	= agp_generic_create_gatt_table,
 	.free_gatt_table	= agp_generic_free_gatt_table,
-	.insert_memory		= x86_64_insert_memory,
+	.insert_memory		= amd64_insert_memory,
 	.remove_memory		= agp_generic_remove_memory,
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
@@ -364,13 +364,13 @@ static __init int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
 	return i == 0 ? -1 : 0;
 }
 
-static int __init agp_amdk8_probe(struct pci_dev *pdev,
+static int __init agp_amd64_probe(struct pci_dev *pdev,
 				  const struct pci_device_id *ent)
 {
 	struct agp_bridge_data *bridge;
 	u8 rev_id;
 	u8 cap_ptr;
-	char *revstring="  ";
+	char *revstring=NULL;
 
 	cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
 	if (!cap_ptr)
@@ -431,17 +431,17 @@ static int __init agp_amdk8_probe(struct pci_dev *pdev,
 	return agp_add_bridge(bridge);
 }
 
-static void __devexit agp_amdk8_remove(struct pci_dev *pdev)
+static void __devexit agp_amd64_remove(struct pci_dev *pdev)
 {
 	struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
 
 	release_mem_region(virt_to_phys(bridge->gatt_table_real), 
-			   x86_64_aperture_sizes[bridge->aperture_size_idx].size); 
+			   amd64_aperture_sizes[bridge->aperture_size_idx].size); 
 	agp_remove_bridge(bridge);
 	agp_put_bridge(bridge);
 }
 
-static struct pci_device_id agp_amdk8_pci_table[] = {
+static struct pci_device_id agp_amd64_pci_table[] = {
 	{
 	.class		= (PCI_CLASS_BRIDGE_HOST << 8),
 	.class_mask	= ~0,
@@ -479,23 +479,23 @@ static struct pci_device_id agp_amdk8_pci_table[] = {
 	{ }
 };
 
-MODULE_DEVICE_TABLE(pci, agp_amdk8_pci_table);
+MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table);
 
-static struct pci_driver agp_amdk8_pci_driver = {
-	.name		= "agpgart-amd-k8",
-	.id_table	= agp_amdk8_pci_table,
-	.probe		= agp_amdk8_probe,
-	.remove		= agp_amdk8_remove,
+static struct pci_driver agp_amd64_pci_driver = {
+	.name		= "agpgart-amd64",
+	.id_table	= agp_amd64_pci_table,
+	.probe		= agp_amd64_probe,
+	.remove		= agp_amd64_remove,
 };
 
 
 /* Not static due to IOMMU code calling it early. */
-int __init agp_amdk8_init(void)
+int __init agp_amd64_init(void)
 {
 	int err = 0;
 	if (agp_off)
 		return -EINVAL;
-	if (pci_module_init(&agp_amdk8_pci_driver) == 0) { 
+	if (pci_module_init(&agp_amd64_pci_driver) == 0) { 
 		struct pci_dev *dev;
 		if (!agp_try_unsupported && !agp_try_unsupported_boot) { 
 			printk(KERN_INFO "No supported AGP bridge found.\n");
@@ -507,7 +507,7 @@ int __init agp_amdk8_init(void)
 			return -ENODEV;
 		}
 
-		/* First check that we have at least one K8 NB */
+		/* First check that we have at least one AMD64 NB */
 		if (!pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, NULL))
 			return -ENODEV;
 
@@ -518,7 +518,7 @@ int __init agp_amdk8_init(void)
 			if (!pci_find_capability(dev, PCI_CAP_ID_AGP))
 				continue;
 			/* Only one bridge supported right now */	
-			if (agp_amdk8_probe(dev, NULL) == 0) {
+			if (agp_amd64_probe(dev, NULL) == 0) {
 				err = 0;
 				break;
 			}	
@@ -527,16 +527,16 @@ int __init agp_amdk8_init(void)
 	return err;
 }
 
-static void __exit agp_amdk8_cleanup(void)
+static void __exit agp_amd64_cleanup(void)
 {
-	pci_unregister_driver(&agp_amdk8_pci_driver);
+	pci_unregister_driver(&agp_amd64_pci_driver);
 }
 
-/* On x86-64 the PCI driver needs to initialize this driver early
+/* On AMD64 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);
+module_init(agp_amd64_init);
+module_exit(agp_amd64_cleanup);
 #endif
 
 MODULE_AUTHOR("Dave Jones <davej@codemonkey.org.uk>, Andi Kleen");
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index 336fdda5fe916bfd5d3bdd4bc37ae0f3056936d6..2f70f417f2213714b53ae83203b607a43b647ed1 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -128,7 +128,7 @@ static int i460_fetch_size (void)
 	if (temp & I460_BAPBASE_ENABLE)
 		i460.dynamic_apbase = INTEL_I460_BAPBASE;
 	else
-		i460.dynamic_apbase = INTEL_I460_APBASE;
+		i460.dynamic_apbase = AGP_APBASE;
 
 	for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) {
 		/*