# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Node ID 7de0dc82cc65d7a0e047e3826395edd15f31a339
# Parent 22563db8938def924303f869cd150173b1cc62a4
[LINUX][POWERPC] move xencomm_create_inline out of arch/powerpc
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
drivers/xen/core/xencomm.c | 11 +++++++++++
include/xen/xencomm.h | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff -r 22563db8938d -r 7de0dc82cc65 drivers/xen/core/xencomm.c
--- a/drivers/xen/core/xencomm.c Tue Sep 12 13:14:59 2006 -0500
+++ b/drivers/xen/core/xencomm.c Tue Sep 12 13:27:47 2006 -0500
@@ -22,6 +22,7 @@
#include <linux/mm.h>
#include <asm/page.h>
#include <xen/xencomm.h>
+#include <xen/interface/xen.h>
static int xencomm_init(struct xencomm_desc *desc,
void *buffer, unsigned long bytes)
@@ -118,3 +119,13 @@ int xencomm_create(void *buffer, unsigne
return 0;
}
+void *xencomm_create_inline(void *ptr)
+{
+ unsigned long paddr;
+
+ BUG_ON(!is_kernel_addr((unsigned long)ptr));
+
+ paddr = (unsigned long)xencomm_pa(ptr);
+ BUG_ON(paddr & XENCOMM_INLINE_FLAG);
+ return (void *)(paddr | XENCOMM_INLINE_FLAG);
+}
diff -r 22563db8938d -r 7de0dc82cc65 include/xen/xencomm.h
--- a/include/xen/xencomm.h Tue Sep 12 13:14:59 2006 -0500
+++ b/include/xen/xencomm.h Tue Sep 12 13:27:47 2006 -0500
@@ -26,9 +26,9 @@ extern int xencomm_create(void *buffer,
extern int xencomm_create(void *buffer, unsigned long bytes,
struct xencomm_desc **desc, gfp_t type);
extern void xencomm_free(struct xencomm_desc *desc);
+extern void *xencomm_create_inline(void *ptr);
/* provided by architecture code: */
-extern void *xencomm_create_inline(void *ptr);
extern unsigned long xencomm_vtop(unsigned long vaddr);
static inline void *xencomm_pa(void *ptr)
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
|