From f021c8b334cc00739b5d43b5be5f97a34b1ad16a Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Fri, 17 Oct 2008 11:17:54 +0900 Subject: ia64/xen: xencomm conversion functions for hypercalls On ia64/xen, pointer arguments for hypercall is passed by pseudo physical address(guest physical address.) So such hypercalls needs address conversion functions. This patch implements concrete conversion functions for such hypercalls. Signed-off-by: Akio Takebe Signed-off-by: Yaozu (Eddie) Dong Signed-off-by: Isaku Yamahata Signed-off-by: Tony Luck --- arch/ia64/xen/xencomm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/ia64/xen/xencomm.c') diff --git a/arch/ia64/xen/xencomm.c b/arch/ia64/xen/xencomm.c index 3dc307f0a40d..1f5d7ac82e97 100644 --- a/arch/ia64/xen/xencomm.c +++ b/arch/ia64/xen/xencomm.c @@ -19,11 +19,22 @@ #include static unsigned long kernel_virtual_offset; +static int is_xencomm_initialized; + +/* for xen early printk. It uses console io hypercall which uses xencomm. + * However early printk may use it before xencomm initialization. + */ +int +xencomm_is_initialized(void) +{ + return is_xencomm_initialized; +} void xencomm_initialize(void) { kernel_virtual_offset = KERNEL_START - ia64_tpa(KERNEL_START); + is_xencomm_initialized = 1; } /* Translate virtual address to physical address. */ -- cgit v1.2.3-55-g7522