direct-io.hg

changeset 12824:44119a4b46bd

[IA64] MCA support - use xencomm to copy SAL error log

Signed-off-by: Yutaka Ezaki <yutaka.ezaki@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Sun Oct 29 09:27:18 2006 -0700 (2006-10-29)
parents 5dd8306e9032
children e4213aa1b98d
files linux-2.6-xen-sparse/include/asm-ia64/sal.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/sal.h	Sun Oct 29 09:27:17 2006 -0700
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/sal.h	Sun Oct 29 09:27:18 2006 -0700
     1.3 @@ -42,6 +42,9 @@
     1.4  #include <asm/pal.h>
     1.5  #include <asm/system.h>
     1.6  #include <asm/fpu.h>
     1.7 +#ifdef CONFIG_XEN
     1.8 +#include <asm/xen/xencomm.h>
     1.9 +#endif
    1.10  
    1.11  extern spinlock_t sal_lock;
    1.12  
    1.13 @@ -686,10 +689,28 @@ ia64_sal_clear_state_info (u64 sal_info_
    1.14  /* Get the processor and platform information logged by SAL with respect to the machine
    1.15   * state at the time of the MCAs, INITs, CMCs, or CPEs.
    1.16   */
    1.17 +#ifdef CONFIG_XEN
    1.18 +static inline u64 ia64_sal_get_state_info_size (u64 sal_info_type);
    1.19 +#endif
    1.20 +
    1.21  static inline u64
    1.22  ia64_sal_get_state_info (u64 sal_info_type, u64 *sal_info)
    1.23  {
    1.24  	struct ia64_sal_retval isrv;
    1.25 +#ifdef CONFIG_XEN
    1.26 +	if (is_running_on_xen()) {
    1.27 +		struct xencomm_mini xc_area[2];
    1.28 +		int nbr_area = 2;
    1.29 +		struct xencomm_handle *desc;
    1.30 +
    1.31 +		if (xencomm_create_mini(xc_area, &nbr_area, sal_info,
    1.32 +		           ia64_sal_get_state_info_size(sal_info_type), &desc))
    1.33 +			return 0;
    1.34 +
    1.35 +		SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
    1.36 +		                   desc, 0, 0, 0, 0);
    1.37 +	} else
    1.38 +#endif
    1.39  	SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
    1.40  	              sal_info, 0, 0, 0, 0);
    1.41  	if (isrv.status)