ia64/xen-unstable

changeset 12461:cef0cc0a3236

[IA64] MCA support - fix timer issue, log size issue, and limit logs to dom0

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 Wed Nov 15 11:34:31 2006 -0700 (2006-11-15)
parents 22e58b2b0b45
children 344fc55eb52f
files linux-2.6-xen-sparse/include/asm-ia64/sal.h xen/arch/ia64/linux-xen/mca.c xen/arch/ia64/xen/fw_emul.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/sal.h	Sun Oct 29 09:27:26 2006 -0700
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/sal.h	Wed Nov 15 11:34:31 2006 -0700
     1.3 @@ -699,16 +699,16 @@ ia64_sal_get_state_info (u64 sal_info_ty
     1.4  	struct ia64_sal_retval isrv;
     1.5  #ifdef CONFIG_XEN
     1.6  	if (is_running_on_xen()) {
     1.7 -		struct xencomm_mini xc_area[2];
     1.8 -		int nbr_area = 2;
     1.9  		struct xencomm_handle *desc;
    1.10  
    1.11 -		if (xencomm_create_mini(xc_area, &nbr_area, sal_info,
    1.12 -		           ia64_sal_get_state_info_size(sal_info_type), &desc))
    1.13 +		if (xencomm_create(sal_info,
    1.14 +		                   ia64_sal_get_state_info_size(sal_info_type),
    1.15 +		                   &desc, GFP_KERNEL))
    1.16  			return 0;
    1.17  
    1.18  		SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
    1.19  		                   desc, 0, 0, 0, 0);
    1.20 +		xencomm_free(desc);
    1.21  	} else
    1.22  #endif
    1.23  	SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
     2.1 --- a/xen/arch/ia64/linux-xen/mca.c	Sun Oct 29 09:27:26 2006 -0700
     2.2 +++ b/xen/arch/ia64/linux-xen/mca.c	Wed Nov 15 11:34:31 2006 -0700
     2.3 @@ -118,6 +118,12 @@ extern void setup_vector (unsigned int v
     2.4  
     2.5  static ia64_mc_info_t		ia64_mc_info;
     2.6  
     2.7 +#ifdef XEN
     2.8 +#define jiffies			NOW()
     2.9 +#undef HZ
    2.10 +#define HZ			1000000000UL
    2.11 +#endif
    2.12 +
    2.13  #define MAX_CPE_POLL_INTERVAL (15*60*HZ) /* 15 minutes */
    2.14  #define MIN_CPE_POLL_INTERVAL (2*60*HZ)  /* 2 minutes */
    2.15  #define CMC_POLL_INTERVAL     (1*60*HZ)  /* 1 minute */
    2.16 @@ -1388,7 +1394,11 @@ static irqreturn_t
    2.17  ia64_mca_cpe_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs)
    2.18  {
    2.19  	static int start_count = -1;
    2.20 +#ifdef XEN
    2.21 +	static unsigned long poll_time = MIN_CPE_POLL_INTERVAL;
    2.22 +#else
    2.23  	static int poll_time = MIN_CPE_POLL_INTERVAL;
    2.24 +#endif
    2.25  	unsigned int cpuid;
    2.26  
    2.27  	cpuid = smp_processor_id();
     3.1 --- a/xen/arch/ia64/xen/fw_emul.c	Sun Oct 29 09:27:26 2006 -0700
     3.2 +++ b/xen/arch/ia64/xen/fw_emul.c	Wed Nov 15 11:34:31 2006 -0700
     3.3 @@ -205,7 +205,7 @@ sal_emulator (long index, unsigned long 
     3.4  		}
     3.5  		break;
     3.6  	    case SAL_GET_STATE_INFO:
     3.7 -		{
     3.8 +		if (current->domain == dom0) {
     3.9  			sal_queue_entry_t *e;
    3.10  			unsigned long flags;
    3.11  			struct smp_call_args_t arg;
    3.12 @@ -274,13 +274,16 @@ sal_emulator (long index, unsigned long 
    3.13  				spin_unlock_irqrestore(&sal_queue_lock, flags);
    3.14  				xfree(e);
    3.15  			}
    3.16 +		} else {
    3.17 +			status = IA64_SAL_NO_INFORMATION_AVAILABLE;
    3.18 +			r9 = 0;
    3.19  		}
    3.20  		break;
    3.21  	    case SAL_GET_STATE_INFO_SIZE:
    3.22  		r9 = ia64_sal_get_state_info_size(in1);
    3.23  		break;
    3.24  	    case SAL_CLEAR_STATE_INFO:
    3.25 -		{
    3.26 +		if (current->domain == dom0) {
    3.27  			sal_queue_entry_t *e;
    3.28  			unsigned long flags;
    3.29  			struct smp_call_args_t arg;