Patch "powerpc/powernv: Fix iommu initialization again" has been added to the 3.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    powerpc/powernv: Fix iommu initialization again

to the 3.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-powernv-fix-iommu-initialization-again.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 74251fe21bfa9310ddba9e0436d1fcf389e602ee Mon Sep 17 00:00:00 2001
From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 1 Jul 2013 17:54:09 +1000
Subject: powerpc/powernv: Fix iommu initialization again

From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>

commit 74251fe21bfa9310ddba9e0436d1fcf389e602ee upstream.

So because those things always end up in trainwrecks... In 7846de406
we moved back the iommu initialization earlier, essentially undoing
37f02195b which was causing us endless trouble... except that in the
meantime we had merged 959c9bdd58 (to workaround the original breakage)
which is now ... broken :-)

This fixes it by doing a partial revert of the latter (we keep the
ppc_md. path which will be needed in the hotplug case, which happens
also during some EEH error recovery situations).

Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 arch/powerpc/platforms/powernv/pci-ioda.c |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -441,6 +441,17 @@ static void pnv_pci_ioda_dma_dev_setup(s
 	set_iommu_table_base(&pdev->dev, &pe->tce32_table);
 }
 
+static void pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, struct pci_bus *bus)
+{
+	struct pci_dev *dev;
+
+	list_for_each_entry(dev, &bus->devices, bus_list) {
+		set_iommu_table_base(&dev->dev, &pe->tce32_table);
+		if (dev->subordinate)
+			pnv_ioda_setup_bus_dma(pe, dev->subordinate);
+	}
+}
+
 static void pnv_pci_ioda1_tce_invalidate(struct iommu_table *tbl,
 					 u64 *startp, u64 *endp)
 {
@@ -596,6 +607,11 @@ static void pnv_pci_ioda_setup_dma_pe(st
 	}
 	iommu_init_table(tbl, phb->hose->node);
 
+	if (pe->pdev)
+		set_iommu_table_base(&pe->pdev->dev, tbl);
+	else
+		pnv_ioda_setup_bus_dma(pe, pe->pbus);
+
 	return;
  fail:
 	/* XXX Failure: Try to fallback to 64-bit only ? */
@@ -667,6 +683,11 @@ static void pnv_pci_ioda2_setup_dma_pe(s
 	}
 	iommu_init_table(tbl, phb->hose->node);
 
+	if (pe->pdev)
+		set_iommu_table_base(&pe->pdev->dev, tbl);
+	else
+		pnv_ioda_setup_bus_dma(pe, pe->pbus);
+
 	return;
 fail:
 	if (pe->tce32_seg >= 0)


Patches currently in stable-queue which might be from benh@xxxxxxxxxxxxxxxxxxx are

queue-3.10/powerpc-tm-fix-writing-top-half-of-msr-on-32-bit-signals.patch
queue-3.10/powerpc-tm-fix-return-of-active-64bit-signals.patch
queue-3.10/powerpc-tm-fix-return-of-32bit-rt-signals-to-active-transactions.patch
queue-3.10/powerpc-perf-don-t-enable-if-we-have-zero-events.patch
queue-3.10/powerpc-rename-and-flesh-out-the-facility-unavailable-exception-handler.patch
queue-3.10/powerpc-perf-check-that-events-only-include-valid-bits-on-power8.patch
queue-3.10/powerpc-wire-up-the-hv-facility-unavailable-exception.patch
queue-3.10/powerpc-remove-kvmtest-from-relon-exception-handlers.patch
queue-3.10/powerpc-numa-do-not-update-sysfs-cpu-registration-from-invalid-context.patch
queue-3.10/powerpc-tm-fix-restoration-of-msr-on-32bit-signal-return.patch
queue-3.10/powerpc-smp-section-mismatch-from-smp_release_cpus-to-__initdata-spinning_secondaries.patch
queue-3.10/powerpc-perf-rework-disable-logic-in-pmu_disable.patch
queue-3.10/powerpc-powernv-fix-iommu-initialization-again.patch
queue-3.10/powerpc-hw_brk-fix-clearing-of-extraneous-irq.patch
queue-3.10/powerpc-hw_brk-fix-off-by-one-error-when-validating-dawr-region-end.patch
queue-3.10/powerpc-remove-unreachable-relocation-on-exception-handlers.patch
queue-3.10/powerpc-hw_brk-fix-setting-of-length-for-exact-mode-breakpoints.patch
queue-3.10/powerpc-perf-freeze-pmc5-6-if-we-re-not-using-them.patch
queue-3.10/powerpc-perf-use-existing-out-label-in-power_pmu_enable.patch
queue-3.10/powerpc-tm-fix-32-bit-non-rt-signals.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]