[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: E250, Raptor gfx, kernel 2.6: questions...



On Tue, 23 Nov 2004 15:24:51 -0500
Ron Murray <rjmx@rjmx.net> wrote:

>    When I try to run X under a 2.6 kernel (currently 2.6.9) it fails
> (segfaults) at the point where it should be scanning the PCI
> bus. We're beginning to think that this isn't a framebuffer problem,
> but rather a problem in X itself. Anyone know of any problems with X
> under sparc64 with 2.6 kernels? I'm using the current sarge X
> packages.

There was a bug with mmap'ing frame buffers in 2.6.x kernels
which was only fixed within the past few days.  This may be
what you're seeing.  Try this patch:

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/11/16 22:11:16-08:00 davem@nuts.davemloft.net 
#   [SPARC64]: Do not set VM_LOCKED on I/O mapped areas.
#   
#   Use VM_RESERVED instead.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# drivers/video/sbuslib.c
#   2004/11/16 22:10:39-08:00 davem@nuts.davemloft.net +1 -1
#   [SPARC64]: Do not set VM_LOCKED on I/O mapped areas.
# 
# drivers/video/fbmem.c
#   2004/11/16 22:10:39-08:00 davem@nuts.davemloft.net +1 -2
#   [SPARC64]: Do not set VM_LOCKED on I/O mapped areas.
# 
# drivers/video/aty/atyfb_base.c
#   2004/11/16 22:10:39-08:00 davem@nuts.davemloft.net +1 -3
#   [SPARC64]: Do not set VM_LOCKED on I/O mapped areas.
# 
# arch/sparc64/kernel/pci.c
#   2004/11/16 22:10:38-08:00 davem@nuts.davemloft.net +1 -1
#   [SPARC64]: Do not set VM_LOCKED on I/O mapped areas.
# 
diff -Nru a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
--- a/arch/sparc64/kernel/pci.c	2004-11-23 12:17:00 -08:00
+++ b/arch/sparc64/kernel/pci.c	2004-11-23 12:17:00 -08:00
@@ -725,7 +725,7 @@
 static void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma,
 					    enum pci_mmap_state mmap_state)
 {
-	vma->vm_flags |= (VM_SHM | VM_LOCKED);
+	vma->vm_flags |= (VM_IO | VM_RESERVED);
 }
 
 /* Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
diff -Nru a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
--- a/drivers/video/aty/atyfb_base.c	2004-11-23 12:17:01 -08:00
+++ b/drivers/video/aty/atyfb_base.c	2004-11-23 12:17:01 -08:00
@@ -1844,7 +1844,7 @@
 	size = vma->vm_end - vma->vm_start;
 
 	/* To stop the swapper from even considering these pages. */
-	vma->vm_flags |= (VM_SHM | VM_LOCKED);
+	vma->vm_flags |= (VM_IO | VM_RESERVED);
 
 	if (((vma->vm_pgoff == 0) && (size == info->fix.smem_len)) ||
 	    ((off == info->fix.smem_len) && (size == PAGE_SIZE)))
@@ -1890,8 +1890,6 @@
 
 	if (!map_size)
 		return -EINVAL;
-
-	vma->vm_flags |= VM_IO;
 
 	if (!par->mmaped)
 		par->mmaped = 1;
diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c
--- a/drivers/video/fbmem.c	2004-11-23 12:17:00 -08:00
+++ b/drivers/video/fbmem.c	2004-11-23 12:17:00 -08:00
@@ -906,9 +906,8 @@
 	off += start;
 	vma->vm_pgoff = off >> PAGE_SHIFT;
 	/* This is an IO map - tell maydump to skip this VMA */
-	vma->vm_flags |= VM_IO;
+	vma->vm_flags |= VM_IO | VM_RESERVED;
 #if defined(__sparc_v9__)
-	vma->vm_flags |= (VM_SHM | VM_LOCKED);
 	if (io_remap_page_range(vma, vma->vm_start, off,
 				vma->vm_end - vma->vm_start, vma->vm_page_prot, 0))
 		return -EAGAIN;
diff -Nru a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c
--- a/drivers/video/sbuslib.c	2004-11-23 12:17:01 -08:00
+++ b/drivers/video/sbuslib.c	2004-11-23 12:17:01 -08:00
@@ -52,7 +52,7 @@
 	off = vma->vm_pgoff << PAGE_SHIFT;
 
 	/* To stop the swapper from even considering these pages */
-	vma->vm_flags |= (VM_SHM | VM_IO | VM_LOCKED);
+	vma->vm_flags |= (VM_IO | VM_RESERVED);
 	
 	/* Each page, see which map applies */
 	for (page = 0; page < size; ){



Reply to: