WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] [pushed][ppc] process all interrupts that may be in the PIC

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [XenPPC] [pushed][ppc] process all interrupts that may be in the PIC
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Wed, 29 Mar 2006 11:58:19 -0600
Cc: jimix@xxxxxxxxxxxxxx
Delivery-date: Wed, 29 Mar 2006 18:00:22 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E1FOeZF-0008Hm-6K@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <E1FOeZF-0008Hm-6K@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8.3
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

<Prev in Thread] Current Thread [Next in Thread>