From: Manish Jaggi <manish.ja...@linaro.org> Add kalloc kfree functions from linux kernel.
Signed-off-by: Manish Jaggi <manish.ja...@linaro.org> --- xen/include/xen/kernel.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xen/include/xen/kernel.h b/xen/include/xen/kernel.h index 548b64da9f..78517f6caa 100644 --- a/xen/include/xen/kernel.h +++ b/xen/include/xen/kernel.h @@ -7,6 +7,16 @@ #include <xen/types.h> +/* Xen: Define compatibility functions */ +#define FW_BUG "[Firmware Bug]: " +#define pr_err(fmt, ...) printk(XENLOG_ERR fmt, ## __VA_ARGS__) +#define pr_warn(fmt, ...) printk(XENLOG_WARNING fmt, ## __VA_ARGS__) + +/* Alias to Xen allocation helpers */ +#define kfree xfree +#define kmalloc(size, flags) _xmalloc(size, sizeof(void *)) +#define kzalloc(size, flags) _xzalloc(size, sizeof(void *)) + /* * min()/max() macros that also do * strict type-checking.. See the -- 2.14.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel