From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH-4.5 3/4] xen/arm: do not request maintenance_interrupts Date: Mon, 10 Feb 2014 17:21:50 +0000 Message-ID: <52F90AAE.90306@linaro.org> References: <1391799378-31664-3-git-send-email-stefano.stabellini@eu.citrix.com> <52F56208.3090504@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: julien.grall@citrix.com, xen-devel@lists.xensource.com, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 02/10/2014 05:03 PM, Stefano Stabellini wrote: > >>> + inflight = 0; >>> + GICH[GICH_LR + i] = 0; >>> + clear_bit(i, &this_cpu(lr_mask)); >>> + >>> + spin_lock(&gic.lock); >>> + p = irq_to_pending(v, irq); >>> + if ( p->desc != NULL ) >>> + p->desc->status &= ~IRQ_INPROGRESS; >>> + clear_bit(GIC_IRQ_GUEST_VISIBLE, &p->status); >>> + if ( test_bit(GIC_IRQ_GUEST_PENDING, &p->status) && >>> + test_bit(GIC_IRQ_GUEST_ENABLED, &p->status)) >>> + { >> >> I would add a WARN_ON(p->desc != NULL) here. AFAIK, this code path shouldn't >> be used for physical IRQ. > > That's not true: an edge physical irq can come through while another one > of the same type is being handled. In fact pending and active bits exist > even on the physical GIC interface. > It won't be fired until the previous one is EOIed. The physical GIC interface will keep it internally. But ... after thinking the WARN is stupid here because we can have this following case: IRQ A fired -> inject IRQ A IRQ A eoied IRQ A fired -> set pending bits clear lrs -> re-inject IRQ A -- Julien Grall