Re: AMD 64 AGP Patch (Was Re: [Dri-devel] r200 in cvs broken?)

2003-11-19 Thread Ronny V. Vindenes
On Wed, 2003-11-19 at 20:46, Dave Jones wrote: On Wed, Nov 19, 2003 at 11:44:42AM -0800, James Jones wrote: hammers[i++] = loop_dev; nr_garts = i; #ifdef CONFIG_SMP if (i == MAX_HAMMER_GARTS) { printk(KERN_INFO PFX Too many northbridges for

Re: AMD 64 AGP Patch (Was Re: [Dri-devel] r200 in cvs broken?)

2003-11-19 Thread Dave Jones
On Wed, Nov 19, 2003 at 11:17:17AM -0800, James Jones wrote: 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.0 -0700 +++

AMD 64 AGP Patch (Was Re: [Dri-devel] r200 in cvs broken?)

2003-11-19 Thread James Jones
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,

Re: AMD 64 AGP Patch (Was Re: [Dri-devel] r200 in cvs broken?)

2003-11-19 Thread James Jones
hammers[i++] = loop_dev; nr_garts = i; #ifdef CONFIG_SMP if (i == MAX_HAMMER_GARTS) { printk(KERN_INFO PFX Too many northbridges for AGP\n); return -1; } Seems wrong to me... wouldn't this return -1 if say, MAX_HAMMER_GARTS == 1 and 1 gart was

Re: AMD 64 AGP Patch (Was Re: [Dri-devel] r200 in cvs broken?)

2003-11-19 Thread Dave Jones
On Wed, Nov 19, 2003 at 11:44:42AM -0800, James Jones wrote: hammers[i++] = loop_dev; nr_garts = i; #ifdef CONFIG_SMP if (i == MAX_HAMMER_GARTS) { printk(KERN_INFO PFX Too many northbridges for AGP\n); return -1; } Seems

Re: AMD 64 AGP Patch (Was Re: [Dri-devel] r200 in cvs broken?)

2003-11-19 Thread Dave Jones
On Wed, Nov 19, 2003 at 08:56:32PM +0100, Ronny V. Vindenes wrote: If we have an SMP system with an SMP kernel, we add however many GARTs to the table, up to a limit of MAX_HAMMER_GARTS. It looks like you'll add GARTS up to MAX_HAMMER_GARTS-1 then bomb if there is an

Re: AMD 64 AGP Patch (Was Re: [Dri-devel] r200 in cvs broken?)

2003-11-19 Thread Dave Jones
On Wed, Nov 19, 2003 at 12:13:37PM -0800, James Jones wrote: Ronny V. Vindenes wrote It looks like you'll add GARTS up to MAX_HAMMER_GARTS-1 then bomb if there is an MAX_HAMMER_GARTS'th GART. Yes, thanks for putting it more clearly Ronny. Dave, try walking through the

Re: AMD 64 AGP Patch (Was Re: [Dri-devel] r200 in cvs broken?)

2003-11-19 Thread James Jones
Ronny V. Vindenes wrote It looks like you'll add GARTS up to MAX_HAMMER_GARTS-1 then bomb if there is an MAX_HAMMER_GARTS'th GART. Yes, thanks for putting it more clearly Ronny. Dave, try walking through the code with MAX_HAMMER_GARTS=2 and SMP enabled. You should quickly see what we

Re: AMD 64 AGP Patch (Was Re: [Dri-devel] r200 in cvs broken?)

2003-11-19 Thread James Jones
The ( i MAX_HAMMER_GARTS) fix was just an example. The test really needs to be == and be moved before the hammers[i++] = loop_dev; assignment, or hammers will be overflowed, as I mentioned in my previous email. Also, it really seems like this test should be done before you go through all