WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] ARCH_HAS_DEV_MEM_MMAP_MEM fix

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] ARCH_HAS_DEV_MEM_MMAP_MEM fix
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Thu, 30 Nov 2006 15:36:27 -0700
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 30 Nov 2006 14:36:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
   We can't really define our own mmap_mem external from
driver/xen/char/mem.c as long as drivers/char/mem.c is defining a static
version.  Patch below solves the problem.  Thanks,

        Alex

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---

diff -r 9a410cc14944 linux-2.6-xen-sparse/drivers/char/mem.c
--- a/linux-2.6-xen-sparse/drivers/char/mem.c   Thu Nov 30 13:20:53 2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/char/mem.c   Thu Nov 30 15:28:14 2006 -0700
@@ -249,6 +249,7 @@ static pgprot_t phys_mem_access_prot(str
 }
 #endif
 
+#ifndef ARCH_HAS_DEV_MEM_MMAP_MEM
 static int mmap_mem(struct file * file, struct vm_area_struct * vma)
 {
        size_t size = vma->vm_end - vma->vm_start;
@@ -269,6 +270,7 @@ static int mmap_mem(struct file * file, 
                return -EAGAIN;
        return 0;
 }
+#endif
 
 static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
 {



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ARCH_HAS_DEV_MEM_MMAP_MEM fix, Alex Williamson <=