if (register_die_notifier(&default_init_monarch_nb)) { printk(KERN_ERR "Failed to register default monarch INIT process\n"); return; } 
ia64_mca_init(void){	ia64_fptr_t *init_hldlr_ptr_monarch = (ia64_fptr_t *)ia64_os_init_dispatch_monarch;	ia64_fptr_t *init_hldlr_ptr_slave = (ia64_fptr_t *)ia64_os_init_dispatch_slave;	ia64_fptr_t *mca_hldlr_ptr = (ia64_fptr_t *)ia64_os_mca_dispatch;	int i;	s64 rc;	struct ia64_sal_retval isrv;	u64 timeout = IA64_MCA_RENDEZ_TIMEOUT;	/* platform specific */	IA64_MCA_DEBUG("%s: begin\n", __FUNCTION__);	/* Clear the Rendez checkin flag for all cpus */	for(i = 0 ; i < NR_CPUS; i++)		ia64_mc_info.imi_rendez_checkin[i] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;	/*	 * Register the rendezvous spinloop and wakeup mechanism with SAL	 */	/* Register the rendezvous interrupt vector with SAL */	while (1) {		isrv = ia64_sal_mc_set_params(SAL_MC_PARAM_RENDEZ_INT,					      SAL_MC_PARAM_MECHANISM_INT,					      IA64_MCA_RENDEZ_VECTOR,					      timeout,					      SAL_MC_PARAM_RZ_ALWAYS);		rc = isrv.status;		if (rc == 0)			break;		if (rc == -2) {			printk(KERN_INFO "Increasing MCA rendezvous timeout from "				"%ld to %ld milliseconds\n", timeout, isrv.v0);			timeout = isrv.v0;			continue;		}		printk(KERN_ERR "Failed to register rendezvous interrupt "		       "with SAL (status %ld)\n", rc);		return;	}	/* Register the wakeup interrupt vector with SAL */	isrv = ia64_sal_mc_set_params(SAL_MC_PARAM_RENDEZ_WAKEUP,				      SAL_MC_PARAM_MECHANISM_INT,				      IA64_MCA_WAKEUP_VECTOR,				      0, 0);	rc = isrv.status;	if (rc) {		printk(KERN_ERR "Failed to register wakeup interrupt with SAL "		       "(status %ld)\n", rc);		return;	}	IA64_MCA_DEBUG("%s: registered MCA rendezvous spinloop and wakeup mech.\n", __FUNCTION__);	ia64_mc_info.imi_mca_handler        = ia64_tpa(mca_hldlr_ptr->fp);	/*	 * XXX - disable SAL checksum by setting size to 0; should be	 *	ia64_tpa(ia64_os_mca_dispatch_end) - ia64_tpa(ia64_os_mca_dispatch);	 */	ia64_mc_info.imi_mca_handler_size	= 0;	/* Register the os mca handler with SAL */	if ((rc = ia64_sal_set_vectors(SAL_VECTOR_OS_MCA,				       ia64_mc_info.imi_mca_handler,				       ia64_tpa(mca_hldlr_ptr->gp),				       ia64_mc_info.imi_mca_handler_size,				       0, 0, 0)))	{		printk(KERN_ERR "Failed to register OS MCA handler with SAL "		       "(status %ld)\n", rc);		return;	}	IA64_MCA_DEBUG("%s: registered OS MCA handler with SAL at 0x%lx, gp = 0x%lx\n", __FUNCTION__,		       ia64_mc_info.imi_mca_handler, ia64_tpa(mca_hldlr_ptr->gp));	/*	 * XXX - disable SAL checksum by setting size to 0, should be	 * size of the actual init handler in mca_asm.S.	 */	ia64_mc_info.imi_monarch_init_handler		= ia64_tpa(init_hldlr_ptr_monarch->fp);	ia64_mc_info.imi_monarch_init_handler_size	= 0;	ia64_mc_info.imi_slave_init_handler		= ia64_tpa(init_hldlr_ptr_slave->fp);	ia64_mc_info.imi_slave_init_handler_size	= 0;	IA64_MCA_DEBUG("%s: OS INIT handler at %lx\n", __FUNCTION__,		       ia64_mc_info.imi_monarch_init_handler);	/* Register the os init handler with SAL */	if ((rc = ia64_sal_set_vectors(SAL_VECTOR_OS_INIT,				       ia64_mc_info.imi_monarch_init_handler,				       ia64_tpa(ia64_getreg(_IA64_REG_GP)),				       ia64_mc_info.imi_monarch_init_handler_size,				       ia64_mc_info.imi_slave_init_handler,				       ia64_tpa(ia64_getreg(_IA64_REG_GP)),				       ia64_mc_info.imi_slave_init_handler_size)))	{		printk(KERN_ERR "Failed to register m/s INIT handlers with SAL "		       "(status %ld)\n", rc);		return;	}	IA64_MCA_DEBUG("%s: registered OS INIT handler with SAL\n", __FUNCTION__);	/*	 *  Configure the CMCI/P vector and handler. Interrupts for CMC are	 *  per-processor, so AP CMC interrupts are setup in smp_callin() (smpboot.c).	 */	register_percpu_irq(IA64_CMC_VECTOR, &cmci_irqaction);	register_percpu_irq(IA64_CMCP_VECTOR, &cmcp_irqaction);	ia64_mca_cmc_vector_setup();       /* Setup vector on BSP */	/* Setup the MCA rendezvous interrupt vector */	register_percpu_irq(IA64_MCA_RENDEZ_VECTOR, &mca_rdzv_irqaction);	/* Setup the MCA wakeup interrupt vector */	register_percpu_irq(IA64_MCA_WAKEUP_VECTOR, &mca_wkup_irqaction);#ifdef CONFIG_ACPI	/* Setup the CPEI/P handler */	register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction);#endif	/* Initialize the areas set aside by the OS to buffer the	 * platform/processor error states for MCA/INIT/CMC	 * handling.	 */	ia64_log_init(SAL_INFO_TYPE_MCA);	ia64_log_init(SAL_INFO_TYPE_INIT);	ia64_log_init(SAL_INFO_TYPE_CMC);	ia64_log_init(SAL_INFO_TYPE_CPE);	mca_init = 1;	printk(KERN_INFO "MCA related initialization done\n");}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/9138d581b0ef855c0314c41c14852a7231b9941c/mca.c/buggy/arch/ia64/kernel/mca.c