From patchwork Thu Feb 11 14:34:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 8281261 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B66899F6DA for ; Thu, 11 Feb 2016 14:43:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1ED520222 for ; Thu, 11 Feb 2016 14:43:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75951203AC for ; Thu, 11 Feb 2016 14:43:42 +0000 (UTC) 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 1aTsRX-0003OT-M9; Thu, 11 Feb 2016 14:42:03 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aTsLf-0004pD-D7 for linux-arm-kernel@lists.infradead.org; Thu, 11 Feb 2016 14:36:02 +0000 Received: by mail-wm0-x236.google.com with SMTP id g62so71558752wme.0 for ; Thu, 11 Feb 2016 06:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GOy6p6AMqxTbtMylRFjdujdGH6+8Jp1JFzAix0PjVts=; b=R7fDIN3Bru/7QacEjkeRjCiNW2Z8mwuzwr2eOsjcD6GS67mH1cNJSlx7nrJ/+1dgJq 8h39on4A+XB6V3YmXNj0q1H0UGwiecKE5bhh7FFLSYpZTomks3c+nb3tLPAj9J8fX/sx Tw5DHC0d4cUtK0SZUKuSjSTOpxjVwSgsLUyVk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GOy6p6AMqxTbtMylRFjdujdGH6+8Jp1JFzAix0PjVts=; b=gGEvVv4fkD6WqyRIK3M9xcTe709v8UgGJOGQNYyW8ljYGwMpCUfQJly3Vo9YSZsJI1 BCecpWBcRmNQa1aUKGJ5yLG8ULq60m6iDWygdYJssqoIIsg9nRZjT7mWp/REZgBVuFA1 MnzlyYMkNyJ+WRr2LkP7JODBizl3ZIjgs5rLTUl2l5eWevT8eUvJ4zbwq3bYPVGf7ceM THuG9jrVSl76WmUbMa4l7iFgFamWRSy0pbeCnITgrYtse+NQlQugkeUvTd36774nJzOJ aNM7+U8xN8N7pt9a3L6HJ+/cS1vt97FAtKUq+r42qsHNLy58VKFrFzhLNLlA85RhUksZ bz0Q== X-Gm-Message-State: AG10YOR+aoh/X/fVfCc8uEQHwFV8oEMTlIrpgxgSQyjrjrGxc1+/zm/RUBZ0WFURuSNPEzjX X-Received: by 10.28.54.197 with SMTP id y66mr17418985wmh.16.1455201337686; Thu, 11 Feb 2016 06:35:37 -0800 (PST) Received: from new-host-12.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id t205sm8290751wmt.23.2016.02.11.06.35.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Feb 2016 06:35:36 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, alex.williamson@redhat.com, will.deacon@arm.com, joro@8bytes.org, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, christoffer.dall@linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [RFC v2 11/15] msi: Add a new MSI_FLAG_IRQ_REMAPPING flag Date: Thu, 11 Feb 2016 14:34:18 +0000 Message-Id: <1455201262-5259-12-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455201262-5259-1-git-send-email-eric.auger@linaro.org> References: <1455201262-5259-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160211_063559_973209_0AF524EF X-CRM114-Status: GOOD ( 11.41 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas.Lendacky@amd.com, brijesh.singh@amd.com, patches@linaro.org, Manish.Jaggi@caviumnetworks.com, p.fedin@samsung.com, linux-kernel@vger.kernel.org, Bharat.Bhushan@freescale.com, iommu@lists.linux-foundation.org, pranav.sawargaonkar@gmail.com, leo.duran@amd.com, suravee.suthikulpanit@amd.com, sherry.hurwitz@amd.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Let's introduce a new msi_domain_info flag value, MSI_FLAG_IRQ_REMAPPING meant to tell the domain supports IRQ REMAPPING, also known as Interrupt Translation Service. On Intel HW this capability is abstracted on IOMMU side while on ARM it is abstracted on MSI controller side. GICv3 ITS HW is the first HW advertising that feature. Signed-off-by: Eric Auger --- drivers/irqchip/irq-gic-v3-its.c | 1 + include/linux/msi.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 3447549..a5e0d8b 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -1544,6 +1544,7 @@ static int its_probe(struct device_node *node, struct irq_domain *parent) inner_domain->parent = parent; inner_domain->bus_token = DOMAIN_BUS_NEXUS; info->ops = &its_msi_domain_ops; + info->flags |= MSI_FLAG_IRQ_REMAPPING; info->data = its; inner_domain->host_data = info; } diff --git a/include/linux/msi.h b/include/linux/msi.h index a2a0068..03eda72 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -261,6 +261,8 @@ enum { MSI_FLAG_MULTI_PCI_MSI = (1 << 3), /* Support PCI MSIX interrupts */ MSI_FLAG_PCI_MSIX = (1 << 4), + /* Support MSI IRQ remapping service */ + MSI_FLAG_IRQ_REMAPPING = (1 << 5), }; int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,