From patchwork Fri Feb 12 08:13:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 8288371 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 28A1D9F3CD for ; Fri, 12 Feb 2016 08:21:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 36DA52035D for ; Fri, 12 Feb 2016 08:21: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 69900202EC for ; Fri, 12 Feb 2016 08:21:46 +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 1aU8xT-0002eZ-1l; Fri, 12 Feb 2016 08:20:07 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aU8sH-0004oq-Uo for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2016 08:14:48 +0000 Received: by mail-wm0-x235.google.com with SMTP id 128so51771727wmz.1 for ; Fri, 12 Feb 2016 00:14:29 -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=Qw3B6qLqIjtq/C2vlhOmKKUIChn+r5IBE/ZqkDskDBy8TRQ7e2P/jfUrTFCm3YsNau yK9BNz4C8eC10auTEKDX3z57JDu+5X1hZ4mOAvJ4mp5kmoTzXclGvmIR8ihVfBQOCZyZ 3PpyIoKu66HUMLg787iJM2gzPi/3u9Uzm2hNo= 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=fkJlnkfKRlmdlIG8240Tl8YMeQT6ZcuZ7vXVpIBkWUD7l8QM6uETh3vCHWRK5rmKz1 7o/xbiHIuDagFp5Ft/xspnhJHQKn9Crff8TT5hSYVXb04/ZAL4MXUcvu2xG6YQH7h8AX a4ouqxpddSdnf58ltVWqgYD1R0Cr2enj3OYdptZiD1X8Sq7UraLtBi1NZl5g1gjx98nd EEcitRKXMfiKcI+gAqBxFDDXiw1jPoFWpgO0CLyRN72OOhFs41AH1lfX04XMD9TvfDAP V0ftunGnttALgsZ+YxK/0vmBzAUhV3BoiVifY4jSVfUfFVFmoADj6FtHE8E2p3Rk7SFo miNw== X-Gm-Message-State: AG10YOQkGfnGpcyz/nvaRVqHd2YIfHx3bqw8Fjns56kpzGqb7xTv5iv4dgtclHY2j8VHd3YY X-Received: by 10.28.47.9 with SMTP id v9mr2743745wmv.69.1455264868592; Fri, 12 Feb 2016 00:14:28 -0800 (PST) Received: from new-host-17.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id x66sm1243977wmb.20.2016.02.12.00.14.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Feb 2016 00:14:25 -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 v3 11/15] msi: Add a new MSI_FLAG_IRQ_REMAPPING flag Date: Fri, 12 Feb 2016 08:13:13 +0000 Message-Id: <1455264797-2334-12-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455264797-2334-1-git-send-email-eric.auger@linaro.org> References: <1455264797-2334-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160212_001446_299300_79B747BA X-CRM114-Status: GOOD ( 12.50 ) 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.2 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,