|
|
|
|
|
|
|
|
|
|
xen-ppc-devel
Re: [XenPPC] [pushed][ppc] process all interrupts that may be in the PIC
On Wednesday 29 March 2006 11:34, jimix@xxxxxxxxxxxxxx wrote:
> changeset: 9665:adf9242cac67
> user: jimix@xxxxxxxxxxxxxxxxxxxxx
> date: Wed Mar 29 12:31:15 2006 -0500
> summary: [ppc] process all interrupts that may be in the PIC
>
> diff -r 7c52c6507ea3 -r adf9242cac67 xen/arch/ppc/external.c
> --- a/xen/arch/ppc/external.c Wed Mar 29 12:28:58 2006 -0500
> +++ b/xen/arch/ppc/external.c Wed Mar 29 12:31:15 2006 -0500
> @@ -75,13 +75,22 @@ void do_external(struct cpu_user_regs *r
> {
> int vec;
>
> - local_irq_disable();
> - vec = mpic_get_one_irq(mpic, regs);
> -
> - DBG("EE:0x%lx isrc: %d\n", regs->msr, vec);
> - if (vec != -1) {
> - regs->entry_vector = vec;
> - do_IRQ(regs);
> + BUG_ON(!(regs->msr & MSR_EE));
> + BUG_ON(mfmsr() & MSR_EE);
> +
> + for (;;) {
> + vec = mpic_get_one_irq(mpic, regs);
> +
> + if (vec != -1) {
> + DBG("EE:0x%lx isrc: %d\n", regs->msr, vec);
> + regs->entry_vector = vec;
> + do_IRQ(regs);
> +
> + BUG_ON(mfmsr() & MSR_EE);
> +
> + continue;
> + }
> + break;
> }
> }
Linux used to loop until there were no more interrupts pending, but it moved
away from that behavior. Anton explained there were two reasons for that:
1) statistically speaking, there is almost never more than one interrupt
pendings, and
2) the cost of an MMIO to find out if there is another interrupt exceeds the
cost of taking another EE exception
Accordingly, I don't like this patch.
--
Hollis Blanchard
IBM Linux Technology Center
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
|
|
|
|
|