Dave,

Similar patch to Ronny's, but also changes a config check on x86_64 arch. It struck me that this patch is still slightly wrong. It should check the number of bridges already found before going through the entire detection routine again shouldn't it?

-James

Dave Jones wrote:

On Fri, Oct 31, 2003 at 11:46:54AM -0800, James Jones wrote:
> test8 had broken detection for this agp chipset. You have to edit a
> file in the x86_64 arch directory to get it to allow more than 0
> (assuming you configed for uniprocessor) bridges to be used, as it
> checks a variable after incrementing rather than before. I also found
> the check wasn't even getting compiled in as the CONFIG_ define had a
> different name in the arch file than in amd64-agp.c, and only one of
> these matched the actual config define name.
> > Haven't tried test9 yet, I sent a patch to dave jones after I noticed
> this in test7, but I received no response.


I don't recall seeing this mail. Bounce me another copy?

Dave




diff -ruN linux-2.6.0-test7/arch/x86_64/kernel/pci-gart.c 
linux-2.6.0-test7-fixed/arch/x86_64/kernel/pci-gart.c
--- linux-2.6.0-test7/arch/x86_64/kernel/pci-gart.c     2003-10-08 12:24:04.000000000 
-0700
+++ linux-2.6.0-test7-fixed/arch/x86_64/kernel/pci-gart.c       2003-10-09 
04:40:44.179994208 -0700
@@ -681,7 +681,7 @@
        unsigned long iommu_start;
        struct pci_dev *dev;
                
-#ifndef CONFIG_AGP_AMD_8151
+#ifndef CONFIG_AGP_AMD64
        no_agp = 1; 
 #else
        /* Makefile puts PCI initialization via subsys_initcall first. */
diff -ruN linux-2.6.0-test7/drivers/char/agp/amd64-agp.c 
linux-2.6.0-test7-fixed/drivers/char/agp/amd64-agp.c
--- linux-2.6.0-test7/drivers/char/agp/amd64-agp.c      2003-10-08 12:24:17.000000000 
-0700
+++ linux-2.6.0-test7-fixed/drivers/char/agp/amd64-agp.c        2003-10-09 
04:41:44.563814472 -0700
@@ -355,12 +355,14 @@
 #endif 
                        return -1;  
                }
-               hammers[i++] = loop_dev;
-               nr_garts = i;
+
                if (i == MAX_HAMMER_GARTS) { 
                        printk(KERN_INFO PFX "Too many northbridges for AGP\n");
                        return -1;
                }
+
+               hammers[i++] = loop_dev;
+               nr_garts = i;
        }
        return i == 0 ? -1 : 0;
 }

Reply via email to