From: kaf24@firebug.cl.cam.ac.uk Date: Wed, 21 Jun 2006 09:56:20 +0000 (+0100) Subject: [IA64] stub to support dump_execution_state() on ia64 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15921^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0cbf97ac5c374403d2d1e9aa3d27dc4bea114898;p=xen.git [IA64] stub to support dump_execution_state() on ia64 Also implement on_selected_cpus() for ia64. Signed-off-by: Alex Williamson --- diff --git a/xen/arch/ia64/linux-xen/smp.c b/xen/arch/ia64/linux-xen/smp.c index 760349abf0..8801d28f64 100644 --- a/xen/arch/ia64/linux-xen/smp.c +++ b/xen/arch/ia64/linux-xen/smp.c @@ -421,6 +421,42 @@ smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wai } EXPORT_SYMBOL(smp_call_function); +#ifdef XEN +int +on_selected_cpus(cpumask_t selected, void (*func) (void *info), void *info, + int retry, int wait) +{ + struct call_data_struct data; + unsigned int cpu, nr_cpus = cpus_weight(selected); + + ASSERT(local_irq_is_enabled()); + + if (!nr_cpus) + return 0; + + data.func = func; + data.info = info; + data.wait = wait; + atomic_set(&data.started, 0); + atomic_set(&data.finished, 0); + + spin_lock(&call_lock); + + call_data = &data; + wmb(); + + for_each_cpu_mask(cpu, selected) + send_IPI_single(cpu, IPI_CALL_FUNC); + + while (atomic_read(wait ? &data.finished : &data.started) != nr_cpus) + cpu_relax(); + + spin_unlock(&call_lock); + + return 0; +} +#endif + /* * this function calls the 'stop' function on all other CPUs in the system. */ diff --git a/xen/include/asm-ia64/debugger.h b/xen/include/asm-ia64/debugger.h index d242f21b88..e320ff68cc 100644 --- a/xen/include/asm-ia64/debugger.h +++ b/xen/include/asm-ia64/debugger.h @@ -41,7 +41,14 @@ #include void show_registers(struct cpu_user_regs *regs); -#define show_execution_state show_registers +void dump_stack(void); + +static inline void +show_execution_state(struct cpu_user_regs *regs) +{ + show_registers(regs); + dump_stack(); +} // NOTE: on xen struct pt_regs = struct cpu_user_regs // see include/asm-ia64/linux-xen/asm/ptrace.h diff --git a/xen/include/asm-ia64/xenprocessor.h b/xen/include/asm-ia64/xenprocessor.h index 865124b965..7a38f1bc8c 100644 --- a/xen/include/asm-ia64/xenprocessor.h +++ b/xen/include/asm-ia64/xenprocessor.h @@ -237,4 +237,6 @@ typedef union { u64 itir; } ia64_itir_t; +#define dump_execution_state() printk("FIXME: implement ia64 dump_execution_state()\n"); + #endif // _ASM_IA64_XENPROCESSOR_H