ia64/xen-unstable

changeset 12667:fa0f2a90059f

[IA64] Fix failure when Xen is booted with "nomca"

Based on patch from Kazuhiro Suzuki <kaz@jp.fujitsu.com>

Signed-off-by: Alex williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Thu Nov 30 15:57:55 2006 -0700 (2006-11-30)
parents 9f56556f08cb
children 49ab12a04d16
files xen/arch/ia64/linux-xen/mca.c xen/arch/ia64/xen/fw_emul.c xen/include/asm-ia64/xenmca.h
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/mca.c	Thu Nov 30 15:57:51 2006 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/mca.c	Thu Nov 30 15:57:55 2006 -0700
     1.3 @@ -206,8 +206,8 @@ static ia64_state_log_t ia64_state_log[I
     1.4  #define IA64_LOG_COUNT(it)         ia64_state_log[it].isl_count
     1.5  
     1.6  #ifdef XEN
     1.7 -struct list_head sal_queue[IA64_MAX_LOG_TYPES];
     1.8 -sal_log_record_header_t *sal_record = NULL;
     1.9 +struct list_head *sal_queue, sal_log_queues[IA64_MAX_LOG_TYPES];
    1.10 +sal_log_record_header_t *sal_record;
    1.11  DEFINE_SPINLOCK(sal_queue_lock);
    1.12  #endif
    1.13  
    1.14 @@ -1606,7 +1606,7 @@ ia64_mca_cpu_init(void *cpu_data)
    1.15  		}
    1.16  	}
    1.17  #ifdef XEN
    1.18 -	else {
    1.19 +	else if (sal_queue) {
    1.20  		int i;
    1.21  		for (i = 0; i < IA64_MAX_LOG_TYPES; i++)
    1.22  			ia64_log_queue(i, 0);
    1.23 @@ -1811,10 +1811,13 @@ ia64_mca_init(void)
    1.24  	ia64_log_init(SAL_INFO_TYPE_CPE);
    1.25  
    1.26  #ifdef XEN
    1.27 -	INIT_LIST_HEAD(&sal_queue[SAL_INFO_TYPE_MCA]);
    1.28 -	INIT_LIST_HEAD(&sal_queue[SAL_INFO_TYPE_INIT]);
    1.29 -	INIT_LIST_HEAD(&sal_queue[SAL_INFO_TYPE_CMC]);
    1.30 -	INIT_LIST_HEAD(&sal_queue[SAL_INFO_TYPE_CPE]);
    1.31 +	INIT_LIST_HEAD(&sal_log_queues[SAL_INFO_TYPE_MCA]);
    1.32 +	INIT_LIST_HEAD(&sal_log_queues[SAL_INFO_TYPE_INIT]);
    1.33 +	INIT_LIST_HEAD(&sal_log_queues[SAL_INFO_TYPE_CMC]);
    1.34 +	INIT_LIST_HEAD(&sal_log_queues[SAL_INFO_TYPE_CPE]);
    1.35 +
    1.36 +	/* NULL sal_queue used elsewhere to determine MCA init state */
    1.37 +	sal_queue = sal_log_queues;
    1.38  
    1.39  	open_softirq(CMC_DISABLE_SOFTIRQ,
    1.40  	             (softirq_handler)ia64_mca_cmc_vector_disable);
     2.1 --- a/xen/arch/ia64/xen/fw_emul.c	Thu Nov 30 15:57:51 2006 -0700
     2.2 +++ b/xen/arch/ia64/xen/fw_emul.c	Thu Nov 30 15:57:55 2006 -0700
     2.3 @@ -214,7 +214,7 @@ sal_emulator (long index, unsigned long 
     2.4  			struct smp_call_args_t arg;
     2.5  
     2.6  			spin_lock_irqsave(&sal_queue_lock, flags);
     2.7 -			if (list_empty(&sal_queue[in1])) {
     2.8 +			if (!sal_queue || list_empty(&sal_queue[in1])) {
     2.9  				sal_log_record_header_t header;
    2.10  				XEN_GUEST_HANDLE(void) handle =
    2.11  					*(XEN_GUEST_HANDLE(void)*)&in3;
     3.1 --- a/xen/include/asm-ia64/xenmca.h	Thu Nov 30 15:57:51 2006 -0700
     3.2 +++ b/xen/include/asm-ia64/xenmca.h	Thu Nov 30 15:57:55 2006 -0700
     3.3 @@ -21,7 +21,7 @@ typedef struct sal_queue_entry_t {
     3.4  	struct list_head list;
     3.5  } sal_queue_entry_t;
     3.6  
     3.7 -extern struct list_head sal_queue[];
     3.8 +extern struct list_head *sal_queue;
     3.9  
    3.10  struct ia64_mca_tlb_info {
    3.11  	u64 cr_lid;