public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: joro@8bytes.org, tglx@linutronix.de, bp@alien8.de,
	sivanich@sgi.com, david.a.cohen@linux.intel.com,
	bhelgaas@google.com, mingo@kernel.org, konrad.wilk@oracle.com,
	benh@kernel.crashing.org, david.vrabel@citrix.com,
	linux-kernel@vger.kernel.org, hpa@zytor.com, yinghai@kernel.org,
	tony.luck@intel.com, rdunlap@infradead.org, rjw@rjwysocki.net,
	jiang.liu@linux.intel.com, linux@eikelenboom.it,
	gregkh@linuxfoundation.org
Subject: [tip:x86/apic] irq_remapping/vt-d: Init all MSI entries not just the first one
Date: Tue, 5 May 2015 02:15:30 -0700	[thread overview]
Message-ID: <tip-9d4c0313f24a05e5252e7106636bf3c5b6318f5d@git.kernel.org> (raw)
In-Reply-To: <1430707662-28598-2-git-send-email-jiang.liu@linux.intel.com>

Commit-ID:  9d4c0313f24a05e5252e7106636bf3c5b6318f5d
Gitweb:     http://git.kernel.org/tip/9d4c0313f24a05e5252e7106636bf3c5b6318f5d
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 4 May 2015 10:47:40 +0800
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 5 May 2015 11:14:48 +0200

irq_remapping/vt-d: Init all MSI entries not just the first one

Commit b106ee63abcc ("irq_remapping/vt-d: Enhance Intel IR driver to
support hierarchical irqdomains") caused a regression, which forgot
to initialize remapping data structures other than the first entry
when setting up remapping entries for multiple MSIs.

[ Jiang: Commit message ]

Fixes: b106ee63abcc ("irq_remapping/vt-d: Enhance Intel IR driver to support hierarchical irqdomains")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Cohen <david.a.cohen@linux.intel.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: iommu@lists.linux-foundation.org
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Joerg Roedel <joro@8bytes.org>
Link: http://lkml.kernel.org/r/1430707662-28598-2-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/iommu/intel_irq_remapping.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index 14d9569..7ecc6b3 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -1113,7 +1113,7 @@ static int intel_irq_remapping_alloc(struct irq_domain *domain,
 {
 	struct intel_iommu *iommu = domain->host_data;
 	struct irq_alloc_info *info = arg;
-	struct intel_ir_data *data;
+	struct intel_ir_data *data, *ird;
 	struct irq_data *irq_data;
 	struct irq_cfg *irq_cfg;
 	int i, ret, index;
@@ -1158,14 +1158,20 @@ static int intel_irq_remapping_alloc(struct irq_domain *domain,
 		}
 
 		if (i > 0) {
-			data = kzalloc(sizeof(*data), GFP_KERNEL);
-			if (!data)
+			ird = kzalloc(sizeof(*ird), GFP_KERNEL);
+			if (!ird)
 				goto out_free_data;
+			/* Initialize the common data */
+			ird->irq_2_iommu = data->irq_2_iommu;
+			ird->irq_2_iommu.sub_handle = i;
+		} else {
+			ird = data;
 		}
+
 		irq_data->hwirq = (index << 16) + i;
-		irq_data->chip_data = data;
+		irq_data->chip_data = ird;
 		irq_data->chip = &intel_ir_chip;
-		intel_irq_remapping_prepare_irte(data, irq_cfg, info, index, i);
+		intel_irq_remapping_prepare_irte(ird, irq_cfg, info, index, i);
 		irq_set_status_flags(virq + i, IRQ_MOVE_PCNTXT);
 	}
 	return 0;

  reply	other threads:[~2015-05-05  9:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04  2:47 [Patch 0/2] Optimize CPU vector allocation for NUMA systems Jiang Liu
2015-05-04  2:47 ` [Patch 1/2] irq_remapping/vt-d: Fix regression caused by commit b106ee63abcc Jiang Liu
2015-05-05  9:15   ` tip-bot for Thomas Gleixner [this message]
2015-05-04  2:47 ` [Patch 2/2] x86, irq: Support CPU vector allocation policies Jiang Liu
2015-05-05 19:25   ` Thomas Gleixner
2015-05-06  5:17     ` Jiang Liu
2015-05-06  8:36     ` [Patch v2] " Jiang Liu
2015-05-06 10:22       ` Thomas Gleixner
2015-05-07  2:53         ` [Patch v3] x86, irq: Allocate CPU vectors from device local CPUs if possible Jiang Liu
2015-05-08  7:21           ` Daniel J Blueman
2015-05-13  7:54           ` [tip:x86/apic] " tip-bot for Jiang Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-9d4c0313f24a05e5252e7106636bf3c5b6318f5d@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=david.a.cohen@linux.intel.com \
    --cc=david.vrabel@citrix.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=joro@8bytes.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@eikelenboom.it \
    --cc=mingo@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=sivanich@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox