|
|
|
|
|
|
|
|
|
|
xen-ppc-devel
[XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] Use PowerPC specific util
# 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 <=
|
|
|
|
|