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-ppc-devel

[Xen-devel] [PATCH 2 of 6] [XEN][LINUX] Create Xen-specific interface fo

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2 of 6] [XEN][LINUX] Create Xen-specific interface for xlate_dev_mem_*
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Thu, 05 Jul 2007 16:08:41 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 05 Jul 2007 14:08:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1183669719@localhost>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
3 files changed, 8 insertions(+), 8 deletions(-)
drivers/xen/char/mem.c             |    8 ++++----
include/asm-i386/mach-xen/asm/io.h |    4 ++--
include/asm-ia64/uaccess.h         |    4 ++--


# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1183669278 18000
# Node ID 001c42f8079ec50c0b213049a86db173a928652b
# Parent  c6a37d0c2d4789866bc20c335ccd36c5dfc2481b
[XEN][LINUX] Create Xen-specific interface for xlate_dev_mem_*
PowerPC builds both drivers/char/mem.c and drivers/xen/char/mem.c at once, so
we cannot hijack the xlate_dev_mem_ptr() interface.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r c6a37d0c2d47 -r 001c42f8079e drivers/xen/char/mem.c
--- a/drivers/xen/char/mem.c    Thu Jul 05 16:01:18 2007 -0500
+++ b/drivers/xen/char/mem.c    Thu Jul 05 16:01:18 2007 -0500
@@ -58,7 +58,7 @@ static ssize_t read_mem(struct file * fi
 
                sz = min_t(unsigned long, sz, count);
 
-               v = xlate_dev_mem_ptr(p, sz);
+               v = xen_xlate_dev_mem_ptr(p, sz);
                if (IS_ERR(v) || v == NULL) {
                        /*
                         * Some programs (e.g., dmidecode) groove off into
@@ -75,7 +75,7 @@ static ssize_t read_mem(struct file * fi
                }
 
                ignored = copy_to_user(buf, v, sz);
-               xlate_dev_mem_ptr_unmap(v);
+               xen_xlate_dev_mem_ptr_unmap(v);
                if (ignored)
                        return -EFAULT;
                buf += sz;
@@ -109,7 +109,7 @@ static ssize_t write_mem(struct file * f
 
                sz = min_t(unsigned long, sz, count);
 
-               v = xlate_dev_mem_ptr(p, sz);
+               v = xen_xlate_dev_mem_ptr(p, sz);
                if (v == NULL)
                        break;
                if (IS_ERR(v)) {
@@ -119,7 +119,7 @@ static ssize_t write_mem(struct file * f
                }
 
                ignored = copy_from_user(v, buf, sz);
-               xlate_dev_mem_ptr_unmap(v);
+               xen_xlate_dev_mem_ptr_unmap(v);
                if (ignored) {
                        written += sz - ignored;
                        if (written)
diff -r c6a37d0c2d47 -r 001c42f8079e include/asm-i386/mach-xen/asm/io.h
--- a/include/asm-i386/mach-xen/asm/io.h        Thu Jul 05 16:01:18 2007 -0500
+++ b/include/asm-i386/mach-xen/asm/io.h        Thu Jul 05 16:01:18 2007 -0500
@@ -53,8 +53,8 @@
  * Convert a physical pointer to a virtual kernel pointer for /dev/mem
  * access
  */
-#define xlate_dev_mem_ptr(p, sz)       ioremap(p, sz)
-#define xlate_dev_mem_ptr_unmap(p)     iounmap(p)
+#define xen_xlate_dev_mem_ptr(p, sz)   ioremap(p, sz)
+#define xen_xlate_dev_mem_ptr_unmap(p) iounmap(p)
 
 /*
  * Convert a virtual cached pointer to an uncached pointer
diff -r c6a37d0c2d47 -r 001c42f8079e include/asm-ia64/uaccess.h
--- a/include/asm-ia64/uaccess.h        Thu Jul 05 16:01:18 2007 -0500
+++ b/include/asm-ia64/uaccess.h        Thu Jul 05 16:01:18 2007 -0500
@@ -382,7 +382,7 @@ xlate_dev_mem_ptr (unsigned long p)
 }
 #else
 static __inline__ char *
-xlate_dev_mem_ptr (unsigned long p, ssize_t sz)
+xen_xlate_dev_mem_ptr (unsigned long p, ssize_t sz)
 {
        unsigned long pfn = p >> PAGE_SHIFT;
 
@@ -393,7 +393,7 @@ xlate_dev_mem_ptr (unsigned long p, ssiz
 }
 
 static __inline__ void
-xlate_dev_mem_ptr_unmap (char* v)
+xen_xlate_dev_mem_ptr_unmap (char* v)
 {
        if (REGION_NUMBER(v) == RGN_UNCACHED)
                iounmap(v);

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