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

[XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] Use PowerPC specific util

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] Use PowerPC specific util.c routines
From: Xen patchbot-linux-ppc-2.6 <patchbot-linux-ppc-2.6@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 08 Oct 2006 18:03:31 +0000
Delivery-date: Sun, 08 Oct 2006 11:32:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID fe1a31c06cbe548d3eb59b4e0fc16fc102a16344
# Parent  28adc79fe774f9811e7f98f225327d777664be6a
[LINUX][XEN][POWERPC] Use PowerPC specific util.c routines

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 arch/powerpc/platforms/xen/util.c |   49 ++++++++++++++++++++++++++++++++++++++
 drivers/xen/Kconfig               |    1 
 2 files changed, 50 insertions(+)

diff -r 28adc79fe774 -r fe1a31c06cbe drivers/xen/Kconfig
--- a/drivers/xen/Kconfig       Sun Oct 08 12:21:35 2006 -0400
+++ b/drivers/xen/Kconfig       Sun Oct 08 12:23:50 2006 -0400
@@ -221,6 +221,7 @@ config NO_IDLE_HZ
 
 config XEN_UTIL
        bool
+       depends on !PPC_XEN
        default y
 
 config XEN_BALLOON
diff -r 28adc79fe774 -r fe1a31c06cbe arch/powerpc/platforms/xen/util.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/arch/powerpc/platforms/xen/util.c Sun Oct 08 12:23:50 2006 -0400
@@ -0,0 +1,49 @@
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <asm/uaccess.h>
+#include <xen/driver_util.h>
+
+
+struct vm_struct *alloc_vm_area(unsigned long size)
+{
+       struct vm_struct *area;
+
+       area = kmalloc(sizeof(*area), GFP_KERNEL);
+       if (area != NULL) {
+               area->flags = VM_MAP;//XXX
+               area->addr = (void *)0xdeadcab4beeff00dULL;
+               area->size = size;
+               area->pages = NULL; //XXX
+               area->nr_pages = size >> PAGE_SHIFT;
+               area->phys_addr = 0;
+       }
+       return area;
+}
+EXPORT_SYMBOL_GPL(alloc_vm_area);
+
+void free_vm_area(struct vm_struct *area)
+{
+       kfree(area);
+}
+EXPORT_SYMBOL_GPL(free_vm_area);
+
+void lock_vm_area(struct vm_struct *area)
+{
+       preempt_disable();
+}
+
+void unlock_vm_area(struct vm_struct *area)
+{
+       preempt_enable();
+}
+EXPORT_SYMBOL_GPL(unlock_vm_area);
+
+void update_vm_area(struct vm_struct *area, struct gnttab_map_grant_ref *op)
+{
+       area->phys_addr = op->dev_bus_addr;
+       area->addr = __va(op->dev_bus_addr);
+}
+EXPORT_SYMBOL_GPL(update_vm_area);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] Use PowerPC specific util.c routines, Xen patchbot-linux-ppc-2 . 6 <=