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: Auger Eric X-Patchwork-Id: 63096 Delivered-To: patches@linaro.org Received: by 10.112.235.234 with SMTP id up10csp943lbc; Fri, 26 Feb 2016 09:36:28 -0800 (PST) X-Received: by 10.28.228.214 with SMTP id b205mr4677531wmh.94.1456508181097; Fri, 26 Feb 2016 09:36:21 -0800 (PST) Return-Path: Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com. [2a00:1450:400c:c09::230]) by mx.google.com with ESMTPS id dc4si17114100wjc.52.2016.02.26.09.36.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2016 09:36:21 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::230 as permitted sender) client-ip=2a00:1450:400c:c09::230; Authentication-Results: mx.google.com; spf=pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::230 as permitted sender) smtp.mailfrom=eric.auger@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-wm0-x230.google.com with SMTP id c200so82108183wme.0 for ; Fri, 26 Feb 2016 09:36:21 -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=hHXE1Vf3yw8tw0RTzcvYCX3E9E13SyIgBTq2x+/CGL2/7C2nAylg4aMLjc60mDXNr/ Ki3NNqCD83qp69tLuFfZrN88k3+R6/sKqReQ8eRgQlvliuiFznVmyhghVvwdLcDLpWZC Lbnk2jxN/8LqOPoiu7m5fJEzB1dwpJVgTJTlnuMJIFLCmIKNxmoQjCsGpy1Fl1GONmaG eePKZH3gXJiHOPlDdCl5fz5O0iVWkWjs3J9nlMxEI9R+AmLlPNSVcaNg6qQVto3M1HuU nXf3RgoQ902JG6HbaEbidGdyvdJwdAz3HbVs5xJPXHickHKcW+8wq+SMcKb5N2hZ1TwF rLRg== X-Gm-Message-State: AD7BkJIsV81HIpWlXK9JBzyDIQZVOfdCgLE1RnBrNoxLVaJsneUk/Z9mi+MFjAUXzvdsXQE4KG8= X-Received: by 10.28.158.198 with SMTP id h189mr4297513wme.74.1456508180891; Fri, 26 Feb 2016 09:36:20 -0800 (PST) Return-Path: 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 Cc: suravee.suthikulpanit@amd.com, patches@linaro.org, linux-kernel@vger.kernel.org, Manish.Jaggi@caviumnetworks.com, Bharat.Bhushan@freescale.com, pranav.sawargaonkar@gmail.com, p.fedin@samsung.com, iommu@lists.linux-foundation.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> 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(-) -- 1.9.1 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,