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: Auger Eric X-Patchwork-Id: 61776 Delivered-To: patches@linaro.org Received: by 10.112.43.199 with SMTP id y7csp229443lbl; Thu, 11 Feb 2016 06:36:26 -0800 (PST) X-Received: by 10.28.18.21 with SMTP id 21mr17124573wms.11.1455201337894; Thu, 11 Feb 2016 06:35:37 -0800 (PST) Return-Path: Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com. [2a00:1450:400c:c09::229]) by mx.google.com with ESMTPS id y18si12425088wjw.104.2016.02.11.06.35.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Feb 2016 06:35:37 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::229 as permitted sender) client-ip=2a00:1450:400c:c09::229; Authentication-Results: mx.google.com; spf=pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::229 as permitted sender) smtp.mailfrom=eric.auger@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-wm0-x229.google.com with SMTP id p63so75967550wmp.1 for ; Thu, 11 Feb 2016 06:35:37 -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=JLsrVpOldcD/PPP8dce3TpySSQu/uPHoEjF1mAZplLEs26s9ndwHz5d5sUVO3Z+QL0 J5Bzigs1BC64vEqTz19Xj+8eDdFrmHlXGhPMFnC+FSc4S0b4ZLmLK1ULq36V+pK8nR2J 1h62rORgg+GCR0M2AX5R/6S1SwF/f6XcCzgLX1chGhiEWMrwy7/oGIFEG9IXccAbVUR3 DXaHPpb5xBwjJKr9w8yMhRKdTsQ7wGBR2j72d5RKnj2TytITtVRFLrPuGAxVXBhP7R7o NER3JrLUzjh4KN/weDW5cAYe8dkNirB0FjOViH6ocaGEIc4hL2zLazmoxf1m49i2Tbr9 PsLg== X-Gm-Message-State: AG10YORUezzVUdeFDvY6zuDfJvkim5zHgCsDhoC6jC3OVOVdpJ+CRe7FUZ5VwV1T0pQm7h1+6hY= X-Received: by 10.28.54.197 with SMTP id y66mr17418985wmh.16.1455201337686; Thu, 11 Feb 2016 06:35:37 -0800 (PST) Return-Path: 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 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, sherry.hurwitz@amd.com, brijesh.singh@amd.com, leo.duran@amd.com, Thomas.Lendacky@amd.com 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> 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(+) -- 1.9.1 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,