From patchwork Fri Feb 26 17:35:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 8440431 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CEF88C0553 for ; Fri, 26 Feb 2016 17:44:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F14F0203B4 for ; Fri, 26 Feb 2016 17:44:16 +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 2DAE1203B8 for ; Fri, 26 Feb 2016 17:44:16 +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 1aZMPS-0007qI-J8; Fri, 26 Feb 2016 17:42:34 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZMJq-0002Dw-Ni for linux-arm-kernel@bombadil.infradead.org; Fri, 26 Feb 2016 17:36:46 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by merlin.infradead.org with esmtps (Exim 4.85 #2 (Red Hat Linux)) id 1aZMJo-0008M3-HX for linux-arm-kernel@lists.infradead.org; Fri, 26 Feb 2016 17:36:45 +0000 Received: by mail-wm0-x22f.google.com with SMTP id g62so81594437wme.0 for ; Fri, 26 Feb 2016 09:36:22 -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=goSpaPTahf6fgFaMgWLjo6qFUR2mWx+rHu+Z4BEF63g=; b=VX+OPFUg6VYq4MGXnbmxBLwct9ftYQaGaBwH/kWyS1ySumJFHhpvMVUUqcF64JPvWw XHLiU6TZgg4G2Vq03oppWzeLjy6JDqalaVR5QyyyUbJK9M2DcU3rbBuDlQx/hOmuXRrE nu+k2XoRmgp7F9gowSecT0+AYwL0GK4fjqc/o= 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=goSpaPTahf6fgFaMgWLjo6qFUR2mWx+rHu+Z4BEF63g=; b=CBiaxMQNAkO51pf5aSUNyHx22SDxHdnbW0tVGZPNA0PFPRHQ5lr9f9qc8tL6hp3lCY 0o2FyfL/896QtOI3sHewbU2eqISqRrcyq6NG+n0Tow3lWEWK7gvJ3SlTI2pI31N/nIFN veOaf64CeQJQAkYJagYiaSCXrJyVPvPCSU69qPGLv8CYrhvCKQ8D7Se+nz+gQ2zSzshY FZCM3ngefoBxH6P8VwHP6UO39jkTLbSYLdjmqwjmuJKCjWNyxwks9fB5T3RXdTRSpyHk zivQyVrGrF2S3urQ3hJHS1f3Xk6Gx/LnmJP2Jpyc32XCZ13Iqz4Bc9zwaY4+aShpQfsV j1/Q== X-Gm-Message-State: AD7BkJIGwATM2Yi6F95mnrlCXgwc3/zEtrtuenrQe6ogBaUnrxHfRG+3lM0UoWNiGPMbTjjG X-Received: by 10.28.158.198 with SMTP id h189mr4297513wme.74.1456508180891; Fri, 26 Feb 2016 09:36:20 -0800 (PST) Received: from new-host-8.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id 77sm3750373wmp.18.2016.02.26.09.36.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Feb 2016 09:36:19 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, robin.murphy@arm.com, 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 v4 07/14] msi: Add a new MSI_FLAG_IRQ_REMAPPING flag Date: Fri, 26 Feb 2016 17:35:47 +0000 Message-Id: <1456508154-2253-8-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456508154-2253-1-git-send-email-eric.auger@linaro.org> References: <1456508154-2253-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160226_123644_809753_DD5B989C X-CRM114-Status: GOOD ( 12.57 ) 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: 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, suravee.suthikulpanit@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.1 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-pci-msi.c | 3 ++- include/linux/msi.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c index aee60ed..8223765 100644 --- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c @@ -96,7 +96,8 @@ static struct msi_domain_ops its_pci_msi_ops = { static struct msi_domain_info its_pci_msi_domain_info = { .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | - MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX), + MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX | + MSI_FLAG_IRQ_REMAPPING), .ops = &its_pci_msi_ops, .chip = &its_msi_irq_chip, }; 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,