aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/x86_64
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@citrix.com>2011-05-26 12:37:47 +0100
committerTim Deegan <Tim.Deegan@citrix.com>2011-05-26 12:37:47 +0100
commit093e1d2484fc46ec73e527c03af79664218045df (patch)
tree4ac0109f7f6d91c8c24a62bfdd20dc44e5370e9d /xen/include/asm-x86/x86_64
parentde4bf084c8dc232a629e436ccd0ce989da8c470e (diff)
downloadxen-093e1d2484fc46ec73e527c03af79664218045df.tar.gz
xen-093e1d2484fc46ec73e527c03af79664218045df.tar.bz2
xen-093e1d2484fc46ec73e527c03af79664218045df.zip
xen: remove extern function declarations from C files.
Move all extern declarations into appropriate header files. This also fixes up a few places where the caller and the definition had different signatures. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/include/asm-x86/x86_64')
-rw-r--r--xen/include/asm-x86/x86_64/uaccess.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/xen/include/asm-x86/x86_64/uaccess.h b/xen/include/asm-x86/x86_64/uaccess.h
index e35ce28e03..475bea216e 100644
--- a/xen/include/asm-x86/x86_64/uaccess.h
+++ b/xen/include/asm-x86/x86_64/uaccess.h
@@ -14,6 +14,19 @@ void free_compat_arg_xlat(struct vcpu *v);
((__off + (unsigned long)(size)) <= COMPAT_ARG_XLAT_SIZE); \
})
+#define xlat_page_start ((unsigned long)COMPAT_ARG_XLAT_VIRT_BASE)
+#define xlat_page_size COMPAT_ARG_XLAT_SIZE
+#define xlat_page_left_size(xlat_page_current) \
+ (xlat_page_start + xlat_page_size - xlat_page_current)
+
+#define xlat_malloc_init(xlat_page_current) do { \
+ xlat_page_current = xlat_page_start; \
+} while (0)
+
+extern void *xlat_malloc(unsigned long *xlat_page_current, size_t size);
+
+#define xlat_malloc_array(_p, _t, _c) ((_t *) xlat_malloc(&_p, sizeof(_t) * _c))
+
/*
* Valid if in +ve half of 48-bit address space, or above Xen-reserved area.
* This is also valid for range checks (addr, addr+size). As long as the