ia64/xen-unstable

changeset 10503:59e05ddfd0ad

[IA64] stub to support dump_execution_state() on ia64
Also implement on_selected_cpus() for ia64.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Jun 21 10:56:20 2006 +0100 (2006-06-21)
parents 411a3c01bb40
children fc1c6dfd1807
files xen/arch/ia64/linux-xen/smp.c xen/include/asm-ia64/debugger.h xen/include/asm-ia64/xenprocessor.h
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/smp.c	Tue Jun 20 18:51:46 2006 +0100
     1.2 +++ b/xen/arch/ia64/linux-xen/smp.c	Wed Jun 21 10:56:20 2006 +0100
     1.3 @@ -421,6 +421,42 @@ smp_call_function (void (*func) (void *i
     1.4  }
     1.5  EXPORT_SYMBOL(smp_call_function);
     1.6  
     1.7 +#ifdef XEN
     1.8 +int
     1.9 +on_selected_cpus(cpumask_t selected, void (*func) (void *info), void *info,
    1.10 +                 int retry, int wait)
    1.11 +{
    1.12 +	struct call_data_struct data;
    1.13 +	unsigned int cpu, nr_cpus = cpus_weight(selected);
    1.14 +
    1.15 +	ASSERT(local_irq_is_enabled());
    1.16 +
    1.17 +	if (!nr_cpus)
    1.18 +		return 0;
    1.19 +
    1.20 +	data.func = func;
    1.21 +	data.info = info;
    1.22 +	data.wait = wait;
    1.23 +	atomic_set(&data.started, 0);
    1.24 +	atomic_set(&data.finished, 0);
    1.25 +
    1.26 +	spin_lock(&call_lock);
    1.27 +
    1.28 +	call_data = &data;
    1.29 +	wmb();
    1.30 +
    1.31 +	for_each_cpu_mask(cpu, selected)
    1.32 +		send_IPI_single(cpu, IPI_CALL_FUNC);
    1.33 +
    1.34 +	while (atomic_read(wait ? &data.finished : &data.started) != nr_cpus)
    1.35 +		cpu_relax();
    1.36 +
    1.37 +	spin_unlock(&call_lock);
    1.38 +
    1.39 +	return 0;
    1.40 +}
    1.41 +#endif
    1.42 +
    1.43  /*
    1.44   * this function calls the 'stop' function on all other CPUs in the system.
    1.45   */
     2.1 --- a/xen/include/asm-ia64/debugger.h	Tue Jun 20 18:51:46 2006 +0100
     2.2 +++ b/xen/include/asm-ia64/debugger.h	Wed Jun 21 10:56:20 2006 +0100
     2.3 @@ -41,7 +41,14 @@
     2.4  #include <xen/gdbstub.h>
     2.5  
     2.6  void show_registers(struct cpu_user_regs *regs);
     2.7 -#define show_execution_state show_registers
     2.8 +void dump_stack(void);
     2.9 +
    2.10 +static inline void
    2.11 +show_execution_state(struct cpu_user_regs *regs)
    2.12 +{
    2.13 +    show_registers(regs);
    2.14 +    dump_stack();
    2.15 +}
    2.16  
    2.17  // NOTE: on xen struct pt_regs = struct cpu_user_regs
    2.18  //       see include/asm-ia64/linux-xen/asm/ptrace.h
     3.1 --- a/xen/include/asm-ia64/xenprocessor.h	Tue Jun 20 18:51:46 2006 +0100
     3.2 +++ b/xen/include/asm-ia64/xenprocessor.h	Wed Jun 21 10:56:20 2006 +0100
     3.3 @@ -237,4 +237,6 @@ typedef union {
     3.4      u64 itir;
     3.5  } ia64_itir_t;
     3.6  
     3.7 +#define dump_execution_state() printk("FIXME: implement ia64 dump_execution_state()\n");
     3.8 +
     3.9  #endif // _ASM_IA64_XENPROCESSOR_H