ia64/xen-unstable

changeset 13084:105ac9be9b3d

[IA64] don't dereference xen_start_info when running on raw hardware

Check we are running under Xen before trying to dereference
xen_start_info! xen_start_info is NULL on ia64 if running raw
hardware. Based on patch by Jes Sorensen <jes@sgi.com>

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild2.aw
date Tue Dec 19 12:40:06 2006 -0700 (2006-12-19)
parents 6e68e8a8cc99
children 1f811fe10d0a
files linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h	Mon Dec 18 10:56:34 2006 -0700
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h	Tue Dec 19 12:40:06 2006 -0700
     1.3 @@ -215,7 +215,8 @@ asmlinkage int xprintk(const char *fmt, 
     1.4  #endif /* CONFIG_XEN || CONFIG_VMX_GUEST */
     1.5  
     1.6  #ifdef CONFIG_XEN_PRIVILEGED_GUEST
     1.7 -#define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN)
     1.8 +#define is_initial_xendomain()						\
     1.9 +	(is_running_on_xen() ? xen_start_info->flags & SIF_INITDOMAIN : 0)
    1.10  #else
    1.11  #define is_initial_xendomain() 0
    1.12  #endif