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

[Xen-changelog] [linux-2.6.18-xen] [PPC] Create Xen-specific interface for xlate_dev_mem_*



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1183726755 -3600
# Node ID 3af06a6f06c2797e164d351e837ba01eb9f1b853
# Parent  dabb3289da972f03b813e86d097e27034607ec67
[PPC] 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>
---
 drivers/xen/char/mem.c               |    8 ++++----
 include/asm-i386/mach-xen/asm/io.h   |    4 ++--
 include/asm-ia64/uaccess.h           |    4 ++--
 include/asm-x86_64/mach-xen/asm/io.h |    4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

diff -r dabb3289da97 -r 3af06a6f06c2 drivers/xen/char/mem.c
--- a/drivers/xen/char/mem.c    Fri Jul 06 13:57:36 2007 +0100
+++ b/drivers/xen/char/mem.c    Fri Jul 06 13:59:15 2007 +0100
@@ -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 dabb3289da97 -r 3af06a6f06c2 include/asm-i386/mach-xen/asm/io.h
--- a/include/asm-i386/mach-xen/asm/io.h        Fri Jul 06 13:57:36 2007 +0100
+++ b/include/asm-i386/mach-xen/asm/io.h        Fri Jul 06 13:59:15 2007 +0100
@@ -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 dabb3289da97 -r 3af06a6f06c2 include/asm-ia64/uaccess.h
--- a/include/asm-ia64/uaccess.h        Fri Jul 06 13:57:36 2007 +0100
+++ b/include/asm-ia64/uaccess.h        Fri Jul 06 13:59:15 2007 +0100
@@ -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);
diff -r dabb3289da97 -r 3af06a6f06c2 include/asm-x86_64/mach-xen/asm/io.h
--- a/include/asm-x86_64/mach-xen/asm/io.h      Fri Jul 06 13:57:36 2007 +0100
+++ b/include/asm-x86_64/mach-xen/asm/io.h      Fri Jul 06 13:59:15 2007 +0100
@@ -315,8 +315,8 @@ extern int iommu_bio_merge;
  * 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

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.