Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755940AbbGFNZ2 (ORCPT ); Mon, 6 Jul 2015 09:25:28 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:33700 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755198AbbGFNZV (ORCPT ); Mon, 6 Jul 2015 09:25:21 -0400 From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, avi.kivity@gmail.com, mtosatti@redhat.com, feng.wu@intel.com, joro@8bytes.org, b.reynal@virtualopensystems.com Cc: linux-kernel@vger.kernel.org, patches@linaro.org, alex.williamson@redhat.com, pbonzini@redhat.com Subject: [RFC v2 6/9] irq: bypass: add active field on producer side Date: Mon, 6 Jul 2015 15:24:40 +0200 Message-Id: <1436189083-32527-7-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436189083-32527-1-git-send-email-eric.auger@linaro.org> References: <1436189083-32527-1-git-send-email-eric.auger@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1350 Lines: 36 An active boolean is introduced on producer side: it reflects whether the source is active (at interrupt controller level or at VFIO level - automasked -). This is a temporary hack for ARM IRQ forwarding with vfio platform. I think the connect and disconnect should become callbacks too. This would make possible to handle error in the process. Typically active could be returned by producer->stop and analyzed before going further. in that case the list_add only if connect returns 0. Signed-off-by: Eric Auger --- include/linux/irqbypass.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/irqbypass.h b/include/linux/irqbypass.h index 8f62235..c89c3a8 100644 --- a/include/linux/irqbypass.h +++ b/include/linux/irqbypass.h @@ -9,6 +9,8 @@ struct irq_bypass_producer { struct list_head node; void *token; int irq; /* linux irq */ + /* is irq active at irqchip or VFIO masked? */ + bool active; void (*stop)(struct irq_bypass_producer *); void (*resume)(struct irq_bypass_producer *); void (*add_consumer)(struct irq_bypass_producer *, -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/