printk(KERN_ERR "Processes interrupted by INIT -"); for_each_online_cpu(c) { struct ia64_sal_os_state *s; t = __va(__per_cpu_mca[c] + IA64_MCA_CPU_INIT_STACK_OFFSET); s = (struct ia64_sal_os_state *)((char *)t + MCA_SOS_OFFSET); g = s->prev_task; if (g) { if (g->pid) printk(" %d", g->pid); else printk(" %d (cpu %d task 0x%p)", g->pid, task_cpu(g), g); } } printk("\n\n"); if (read_trylock(&tasklist_lock)) { do_each_thread (g, t) { printk("\nBacktrace of pid %d (%s)\n", t->pid, t->comm); show_stack(t, NULL); } while_each_thread (g, t); read_unlock(&tasklist_lock); } 
/* If nobody intercepts DIE_INIT_MONARCH_PROCESS then we drop through * to default_monarch_init_process() above and just print all the * tasks. */ if (notify_die(DIE_INIT_MONARCH_PROCESS, "INIT", regs, 0, 0, 0) == NOTIFY_STOP) ia64_mca_spin(__FUNCTION__); if (notify_die(DIE_INIT_MONARCH_LEAVE, "INIT", regs, 0, 0, 0) == NOTIFY_STOP) ia64_mca_spin(__FUNCTION__); 
ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,		  struct ia64_sal_os_state *sos){	static atomic_t slaves;	static atomic_t monarchs;	task_t *previous_current;	int cpu = smp_processor_id(), c;	struct task_struct *g, *t;	oops_in_progress = 1;	/* FIXME: make printk NMI/MCA/INIT safe */	console_loglevel = 15;	/* make sure printks make it to console */	printk(KERN_INFO "Entered OS INIT handler. PSP=%lx cpu=%d monarch=%ld\n",		sos->proc_state_param, cpu, sos->monarch);	salinfo_log_wakeup(SAL_INFO_TYPE_INIT, NULL, 0, 0);	previous_current = ia64_mca_modify_original_stack(regs, sw, sos, "INIT");	sos->os_status = IA64_INIT_RESUME;	/* FIXME: Workaround for broken proms that drive all INIT events as	 * slaves.  The last slave that enters is promoted to be a monarch.	 * Remove this code in September 2006, that gives platforms a year to	 * fix their proms and get their customers updated.	 */	if (!sos->monarch && atomic_add_return(1, &slaves) == num_online_cpus()) {		printk(KERN_WARNING "%s: Promoting cpu %d to monarch.\n",		       __FUNCTION__, cpu);		atomic_dec(&slaves);		sos->monarch = 1;	}	/* FIXME: Workaround for broken proms that drive all INIT events as	 * monarchs.  Second and subsequent monarchs are demoted to slaves.	 * Remove this code in September 2006, that gives platforms a year to	 * fix their proms and get their customers updated.	 */	if (sos->monarch && atomic_add_return(1, &monarchs) > 1) {		printk(KERN_WARNING "%s: Demoting cpu %d to slave.\n",			       __FUNCTION__, cpu);		atomic_dec(&monarchs);		sos->monarch = 0;	}	if (!sos->monarch) {		ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_INIT;		while (monarch_cpu == -1)		       cpu_relax();	/* spin until monarch enters */		while (monarch_cpu != -1)		       cpu_relax();	/* spin until monarch leaves */		printk("Slave on cpu %d returning to normal service.\n", cpu);		set_curr_task(cpu, previous_current);		ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;		atomic_dec(&slaves);		return;	}	monarch_cpu = cpu;	/*	 * Wait for a bit.  On some machines (e.g., HP's zx2000 and zx6000, INIT can be	 * generated via the BMC's command-line interface, but since the console is on the	 * same serial line, the user will need some time to switch out of the BMC before	 * the dump begins.	 */	printk("Delaying for 5 seconds...\n");	udelay(5*1000000);	ia64_wait_for_slaves(cpu);	printk(KERN_ERR "Processes interrupted by INIT -");	for_each_online_cpu(c) {		struct ia64_sal_os_state *s;		t = __va(__per_cpu_mca[c] + IA64_MCA_CPU_INIT_STACK_OFFSET);		s = (struct ia64_sal_os_state *)((char *)t + MCA_SOS_OFFSET);		g = s->prev_task;		if (g) {			if (g->pid)				printk(" %d", g->pid);			else				printk(" %d (cpu %d task 0x%p)", g->pid, task_cpu(g), g);		}	}	printk("\n\n");	if (read_trylock(&tasklist_lock)) {		do_each_thread (g, t) {			printk("\nBacktrace of pid %d (%s)\n", t->pid, t->comm);			show_stack(t, NULL);		} while_each_thread (g, t);		read_unlock(&tasklist_lock);	}	printk("\nINIT dump complete.  Monarch on cpu %d returning to normal service.\n", cpu);	atomic_dec(&monarchs);	set_curr_task(cpu, previous_current);	monarch_cpu = -1;	return;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/9138d581b0ef855c0314c41c14852a7231b9941c/mca.c/buggy/arch/ia64/kernel/mca.c