ia64/xen-unstable

changeset 13471:b59b6173455d

[IA64] Improve INIT call trace

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
author awilliam@xenbuild2.aw
date Tue Jan 23 12:01:38 2007 -0700 (2007-01-23)
parents b194a9f3eba2
children 10dd3c907ca7
files xen/arch/ia64/linux-xen/mca.c
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/mca.c	Tue Jan 23 11:48:29 2007 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/mca.c	Tue Jan 23 12:01:38 2007 -0700
     1.3 @@ -84,6 +84,7 @@
     1.4  #include <xen/event.h>
     1.5  #include <xen/softirq.h>
     1.6  #include <asm/xenmca.h>
     1.7 +#include <linux/shutdown.h>
     1.8  #endif
     1.9  
    1.10  #if defined(IA64_MCA_DEBUG_INFO)
    1.11 @@ -685,6 +686,7 @@ fetch_min_state (pal_min_state_area_t *m
    1.12  static spinlock_t init_dump_lock = SPIN_LOCK_UNLOCKED;
    1.13  static spinlock_t show_stack_lock = SPIN_LOCK_UNLOCKED;
    1.14  static atomic_t num_stopped_cpus = ATOMIC_INIT(0);
    1.15 +extern void show_stack (struct task_struct *, unsigned long *);
    1.16  
    1.17  #define CPU_FLUSH_RETRY_MAX 5
    1.18  static void
    1.19 @@ -773,6 +775,8 @@ init_handler_platform (pal_min_state_are
    1.20  	spin_unlock(&show_stack_lock);
    1.21  
    1.22  	if (spin_trylock(&init_dump_lock)) {
    1.23 +		struct domain *d;
    1.24 +		struct vcpu *v;
    1.25  #ifdef CONFIG_SMP
    1.26  		int other_cpus = num_online_cpus() - 1;
    1.27  		int wait = 1000 * other_cpus;
    1.28 @@ -782,7 +786,19 @@ init_handler_platform (pal_min_state_are
    1.29  		if (other_cpus && wait < 0)
    1.30  			printk("timeout %d\n", atomic_read(&num_stopped_cpus));
    1.31  #endif
    1.32 -		unw_init_running(try_crashdump, pt);
    1.33 +		if (opt_noreboot) {
    1.34 +			/* this route is for dump routine */
    1.35 +			unw_init_running(try_crashdump, pt);
    1.36 +		} else {
    1.37 +			for_each_domain(d) {
    1.38 +				for_each_vcpu(d, v) {
    1.39 +					printk("Backtrace of current vcpu "
    1.40 +					       "(vcpu_id %d of domid %d)\n",
    1.41 +					       v->vcpu_id, d->domain_id);
    1.42 +					show_stack(v, NULL);
    1.43 +				}
    1.44 +			}
    1.45 +		}
    1.46  	}
    1.47  	unw_init_running(freeze_cpu_osinit, NULL);
    1.48  #else /* XEN */