From: Alex Williamson Subject: [PATCH] ia64 dump_execution_state() stub, build fix Date: Mon, 19 Jun 2006 12:00:01 -0600 Message-ID: <1150740001.5343.18.camel@lappy> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-xw/ZTPH3/HkGIpm+dH+k" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel , xen-ia64-devel List-Id: xen-devel@lists.xenproject.org --=-xw/ZTPH3/HkGIpm+dH+k Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Keir, The patch below implements on_selected_cpu() for ia64 and adds a stub for dump_execution_state(). This allows ia64 to build on xen-unstable.hg after cset 10447. Thanks, Alex --=-xw/ZTPH3/HkGIpm+dH+k Content-Disposition: attachment; filename=dump_execution_state_ia64_stub.patch Content-Type: text/x-patch; name=dump_execution_state_ia64_stub.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit # HG changeset patch # User awilliam@xenbuild.aw # Node ID 321d4b8d1f13e619226cf0d95d67c98e8db4228b # Parent 2a99292b1a8aa74ca1abb90e2915f4adcb640eb8 [IA64] stub to support dump_execution_state() on ia64 Also implement on_selected_cpus() for ia64. Signed-off-by: Alex Williamson diff -r 2a99292b1a8a -r 321d4b8d1f13 xen/arch/ia64/linux-xen/smp.c --- a/xen/arch/ia64/linux-xen/smp.c Mon Jun 19 14:44:34 2006 +0100 +++ b/xen/arch/ia64/linux-xen/smp.c Mon Jun 19 11:44:07 2006 -0600 @@ -421,6 +421,42 @@ smp_call_function (void (*func) (void *i } 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 -r 2a99292b1a8a -r 321d4b8d1f13 xen/include/asm-ia64/debugger.h --- a/xen/include/asm-ia64/debugger.h Mon Jun 19 14:44:34 2006 +0100 +++ b/xen/include/asm-ia64/debugger.h Mon Jun 19 11:44:07 2006 -0600 @@ -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 -r 2a99292b1a8a -r 321d4b8d1f13 xen/include/asm-ia64/xenprocessor.h --- a/xen/include/asm-ia64/xenprocessor.h Mon Jun 19 14:44:34 2006 +0100 +++ b/xen/include/asm-ia64/xenprocessor.h Mon Jun 19 11:44:07 2006 -0600 @@ -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 --=-xw/ZTPH3/HkGIpm+dH+k Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-xw/ZTPH3/HkGIpm+dH+k--