direct-io.hg

changeset 12968:21ce7e75b815

[XEN][POWERPC] Generalized parallel IPI handlers
Our problem with x86 do_IRQ is that it does not respect IRQ_PER_CPU, so
make our logic reflect that generically. We remove the spin lock in
this case, since the programming convention is to update irq descs
atomically (if at all). This patch allows read_clocks to work properly.
Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Tue Nov 28 16:56:40 2006 -0500 (2006-11-28)
parents dbc7ea73f5b2
children 4a27df713c66
files xen/arch/powerpc/external.c xen/arch/powerpc/mpic_init.c xen/include/asm-powerpc/smp.h
line diff
     1.1 --- a/xen/arch/powerpc/external.c	Tue Nov 28 16:43:53 2006 -0500
     1.2 +++ b/xen/arch/powerpc/external.c	Tue Nov 28 16:56:40 2006 -0500
     1.3 @@ -82,15 +82,13 @@ void do_external(struct cpu_user_regs *r
     1.4  
     1.5      vec = xen_mpic_get_irq(regs);
     1.6  
     1.7 -    if (vector_is_ipi(vec)) {
     1.8 -        /* do_IRQ is fundamentally broken for reliable IPI delivery.  */
     1.9 +    if (irq_desc[vec].status & IRQ_PER_CPU) {
    1.10 +	/* x86 do_IRQ does not respect the per cpu flag.  */
    1.11          irq_desc_t *desc = &irq_desc[vec];
    1.12          regs->entry_vector = vec;
    1.13 -        spin_lock(&desc->lock);
    1.14          desc->handler->ack(vec);
    1.15          desc->action->handler(vector_to_irq(vec), desc->action->dev_id, regs);
    1.16          desc->handler->end(vec);
    1.17 -        spin_unlock(&desc->lock);
    1.18      } else if (vec != -1) {
    1.19          DBG("EE:0x%lx isrc: %d\n", regs->msr, vec);
    1.20          regs->entry_vector = vec;
     2.1 --- a/xen/arch/powerpc/mpic_init.c	Tue Nov 28 16:43:53 2006 -0500
     2.2 +++ b/xen/arch/powerpc/mpic_init.c	Tue Nov 28 16:56:40 2006 -0500
     2.3 @@ -448,9 +448,3 @@ int xen_mpic_get_irq(struct cpu_user_reg
     2.4  
     2.5  	return mpic_get_one_irq(mpic, regs);
     2.6  }
     2.7 -
     2.8 -int vector_is_ipi(int vector)
     2.9 -{
    2.10 -    BUG_ON(!mpic);
    2.11 -    return (mpic->ipi_offset <= vector) && (vector < mpic->ipi_offset + 4);
    2.12 -}
     3.1 --- a/xen/include/asm-powerpc/smp.h	Tue Nov 28 16:43:53 2006 -0500
     3.2 +++ b/xen/include/asm-powerpc/smp.h	Tue Nov 28 16:56:40 2006 -0500
     3.3 @@ -45,7 +45,6 @@ void smp_message_recv(int msg, struct cp
     3.4  void smp_call_function_interrupt(struct cpu_user_regs *regs);
     3.5  void smp_event_check_interrupt(void);
     3.6  void send_IPI_mask(cpumask_t mask, int vector);
     3.7 -int vector_is_ipi(int vector);
     3.8  
     3.9  #undef DEBUG_IPI
    3.10  #ifdef DEBUG_IPI