* [Patch 1/2] irq_remapping/vt-d: Fix regression caused by commit b106ee63abcc
[not found] <1430707662-28598-1-git-send-email-jiang.liu@linux.intel.com>
@ 2015-05-04 2:47 ` Jiang Liu
0 siblings, 0 replies; only message in thread
From: Jiang Liu @ 2015-05-04 2:47 UTC (permalink / raw)
To: Bjorn Helgaas, Benjamin Herrenschmidt, Thomas Gleixner,
Ingo Molnar, H. Peter Anvin, Rafael J. Wysocki, Randy Dunlap,
Yinghai Lu, Borislav Petkov, Dimitri Sivanich, Joerg Roedel
Cc: Jiang Liu, Konrad Rzeszutek Wilk, David Cohen, Sander Eikelenboom,
David Vrabel, Andrew Morton, Tony Luck, Greg Kroah-Hartman, x86,
linux-kernel, linux-pci, linux-acpi, iommu
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.
Code is written by Thomas and commit message is written by Jiang.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
Hi Thomas,
I missed this patch when rebasing my patch set. It may be
fold into commit b106ee63abcc ("irq_remapping/vt-d: Enhance Intel IR
driver to support hierarchical irqdomains").
Thanks!
Gerry
---
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 14d95694fc1b..7ecc6b3180ba 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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-04 2:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1430707662-28598-1-git-send-email-jiang.liu@linux.intel.com>
2015-05-04 2:47 ` [Patch 1/2] irq_remapping/vt-d: Fix regression caused by commit b106ee63abcc Jiang Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox