From patchwork Wed Jun 25 09:28:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 32466 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9CFF620C88 for ; Wed, 25 Jun 2014 09:30:54 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id a41sf3178363yho.5 for ; Wed, 25 Jun 2014 02:30:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=25M9QdOtU3e6gOkgtD/O9WMfeRKHzwwAX8H7p2oZLEY=; b=PzX0O1e5SpYBMBmCupM/BjdJ5Da2UskAEZTUuNqH5Omq0W0nVr6WkjbURBkESZEbjS giVbms9lYQkVPOM4OGTStqnxHKPuq9ONjhyZhSGqk3DGJi/gYU5guH/GRyLK5uLshB1p B/AQ8qERa4d8sWgKnSJkhIaIxHhC/xtm8XREiCPMorkdSvgOe9GFljA7TS+P5VwbMuB2 5YkQeXW8/R6Y9DrYym1jOHijRaEaYwlr+iQvm20Hk3L4v+EV7z2oGdK2COSUCiwAybCT sogJziEpTgji3iIkx7hLhy4aSYQBkd838PaaMVWUi1HBFfL+laCSvp9rP0BcDxtWTVMA JIqw== X-Gm-Message-State: ALoCoQmtNsmZPMuThF3BSANSO2Nr5wRb2C4Wa24SpCEIfYf01KNkdvPIItpMczXSLvU4UqyPOvb0 X-Received: by 10.58.151.238 with SMTP id ut14mr3565185veb.11.1403688654436; Wed, 25 Jun 2014 02:30:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.204 with SMTP id 70ls2366266qgv.21.gmail; Wed, 25 Jun 2014 02:30:54 -0700 (PDT) X-Received: by 10.58.141.168 with SMTP id rp8mr915108veb.40.1403688654356; Wed, 25 Jun 2014 02:30:54 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id m2si1892071vek.107.2014.06.25.02.30.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Jun 2014 02:30:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id oy12so1681416veb.13 for ; Wed, 25 Jun 2014 02:30:54 -0700 (PDT) X-Received: by 10.220.122.132 with SMTP id l4mr681941vcr.41.1403688654268; Wed, 25 Jun 2014 02:30:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp274479vcb; Wed, 25 Jun 2014 02:30:53 -0700 (PDT) X-Received: by 10.140.28.37 with SMTP id 34mr9400575qgy.28.1403688653827; Wed, 25 Jun 2014 02:30:53 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id a5si3753362qcl.14.2014.06.25.02.30.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jun 2014 02:30:53 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzjWI-0004PS-MD; Wed, 25 Jun 2014 09:29:34 +0000 Received: from fw-tnat.austin.arm.com ([217.140.110.23] helo=collaborate-mta1.arm.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzjW3-000499-6i for linux-arm-kernel@lists.infradead.org; Wed, 25 Jun 2014 09:29:21 +0000 Received: from e102391-lin.cambridge.arm.com (e102391-lin.cambridge.arm.com [10.1.209.143]) by collaborate-mta1.arm.com (Postfix) with ESMTP id 7CE4713FA3B; Wed, 25 Jun 2014 04:28:52 -0500 (CDT) From: Marc Zyngier To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/9] genirq: Add IRQD_IRQ_FORWARDED flag and accessors Date: Wed, 25 Jun 2014 10:28:42 +0100 Message-Id: <1403688530-23273-2-git-send-email-marc.zyngier@arm.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1403688530-23273-1-git-send-email-marc.zyngier@arm.com> References: <1403688530-23273-1-git-send-email-marc.zyngier@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140625_022919_287778_D36D9343 X-CRM114-Status: UNSURE ( 7.09 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: Catalin Marinas , Thomas Gleixner , Will Deacon , Christoffer Dall , eric.auger@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: marc.zyngier@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Some interrupt controllers support a split EOI behaviour, where an active interrupt can be forwarded to a VM, and directly EOIed from the guest. Allow the irq_data to carry a flag describing this setup. Signed-off-by: Marc Zyngier --- include/linux/irq.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/linux/irq.h b/include/linux/irq.h index 0d998d8..b4b3120 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -186,6 +186,7 @@ enum { IRQD_IRQ_DISABLED = (1 << 16), IRQD_IRQ_MASKED = (1 << 17), IRQD_IRQ_INPROGRESS = (1 << 18), + IRQD_IRQ_FORWARDED = (1 << 19), }; static inline bool irqd_is_setaffinity_pending(struct irq_data *d) @@ -272,6 +273,21 @@ static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d) d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; } +static inline void irqd_set_irq_forwarded(struct irq_data *d) +{ + d->state_use_accessors |= IRQD_IRQ_FORWARDED; +} + +static inline void irqd_clr_irq_forwarded(struct irq_data *d) +{ + d->state_use_accessors &= ~IRQD_IRQ_FORWARDED; +} + +static inline bool irqd_irq_forwarded(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_IRQ_FORWARDED; +} + static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) { return d->hwirq;