Re: 2.4.x oops with X

From: Dave Jones
Date: Fri Jan 07 2005 - 15:01:28 EST


On Fri, Jan 07, 2005 at 03:01:52PM -0200, Marcelo Tosatti wrote:

> > Well, what do you mean with "disable AGP"? I can't disable it in the BIOS.
> > I disabled DRI in the XF86Config-file. agpgart and r128 haven't been
> > loaded (they are built as modules). The behaviour of the X-starting
> > doesn't change and it's always the same:
>
> I meant not loading the agpgart/r128 modules, but it seems they are loaded
> on demand and X actually can't work without them.

If he disabled DRI in the X config file, they shouldn't be getting
loaded, so I'm curious why agp is in the picture..

> Well the problem is the core dumping code (elf_core_dump function) is trying to write
> your ATI card memory to disk, which is wrong.
>
> agp's mmap() method does not mark the memory region it creates as VM_IO to
> indicate its a device memory mapped region, and it should AFAICS.
>
> The following corrects the situation and should stop the BUG() from happening,
> however the SIGSEGV which X is receiving seems to be a different thing.
>
> Please try the following patch
>
> Davej?
>
>
> --- linux-2.4.28/drivers/char/agp/agpgart_fe.c.orig 2005-01-07 16:42:24.732957320 -0200
> +++ linux-2.4.28/drivers/char/agp/agpgart_fe.c 2005-01-07 16:42:30.329106576 -0200
> @@ -651,6 +651,7 @@
> unlock_kernel();
> return -EAGAIN;
> }
> + vma->vm_flags |= VM_IO;
> AGP_UNLOCK();
> unlock_kernel();
> return 0;
> @@ -667,6 +668,7 @@
> unlock_kernel();
> return -EAGAIN;
> }
> + vma->vm_flags |= VM_IO;
> AGP_UNLOCK();
> unlock_kernel();
> return 0;

Looks ok on a first glance.

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/