]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Jun 2014 22:47:36 +0000 (15:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Jun 2014 22:47:36 +0000 (15:47 -0700)
added patches:
gpio-mcp23s08-bug-fix-of-spi-device-tree-registration.patch
iommu-vt-d-fix-missing-iotlb-flush-in-intel_iommu_unmap.patch

queue-3.14/gpio-mcp23s08-bug-fix-of-spi-device-tree-registration.patch [new file with mode: 0644]
queue-3.14/iommu-vt-d-fix-missing-iotlb-flush-in-intel_iommu_unmap.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/gpio-mcp23s08-bug-fix-of-spi-device-tree-registration.patch b/queue-3.14/gpio-mcp23s08-bug-fix-of-spi-device-tree-registration.patch
new file mode 100644 (file)
index 0000000..9d4bf91
--- /dev/null
@@ -0,0 +1,54 @@
+From 99e4b98dbe3ad1fe38a74d12c3b8d44a55930de4 Mon Sep 17 00:00:00 2001
+From: Michael Welling <mwelling@ieee.org>
+Date: Wed, 16 Apr 2014 20:00:24 -0500
+Subject: gpio: mcp23s08: Bug fix of SPI device tree registration.
+
+From: Michael Welling <mwelling@ieee.org>
+
+commit 99e4b98dbe3ad1fe38a74d12c3b8d44a55930de4 upstream.
+
+The chips variable needs to be incremented for each chip that is
+found in the spi_present_mask when registering via device tree.
+Without this and the checking a negative index is passed to the
+data->chip array in a subsequent loop.
+
+Signed-off-by: Michael Welling <mwelling@ieee.org>
+Acked-by: Peter Korsgaard <peter@korsgaard.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpio/gpio-mcp23s08.c |   11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpio/gpio-mcp23s08.c
++++ b/drivers/gpio/gpio-mcp23s08.c
+@@ -895,8 +895,11 @@ static int mcp23s08_probe(struct spi_dev
+                       return -ENODEV;
+               }
+-              for (addr = 0; addr < ARRAY_SIZE(pdata->chip); addr++)
++              for (addr = 0; addr < ARRAY_SIZE(pdata->chip); addr++) {
+                       pullups[addr] = 0;
++                      if (spi_present_mask & (1 << addr))
++                              chips++;
++              }
+       } else {
+               type = spi_get_device_id(spi)->driver_data;
+               pdata = dev_get_platdata(&spi->dev);
+@@ -919,12 +922,12 @@ static int mcp23s08_probe(struct spi_dev
+                       pullups[addr] = pdata->chip[addr].pullups;
+               }
+-              if (!chips)
+-                      return -ENODEV;
+-
+               base = pdata->base;
+       }
++      if (!chips)
++              return -ENODEV;
++
+       data = kzalloc(sizeof *data + chips * sizeof(struct mcp23s08),
+                       GFP_KERNEL);
+       if (!data)
diff --git a/queue-3.14/iommu-vt-d-fix-missing-iotlb-flush-in-intel_iommu_unmap.patch b/queue-3.14/iommu-vt-d-fix-missing-iotlb-flush-in-intel_iommu_unmap.patch
new file mode 100644 (file)
index 0000000..890a6b3
--- /dev/null
@@ -0,0 +1,59 @@
+From dwmw2@infradead.org  Mon Jun  9 15:43:20 2014
+From: David Woodhouse <dwmw2@infradead.org>
+Date: Mon, 09 Jun 2014 14:09:53 +0100
+Subject: [stable PATCH] iommu/vt-d: Fix missing IOTLB flush in intel_iommu_unmap()
+To: stable@kernel.org
+Cc: iommu@lists.linux-foundation.org
+Message-ID: <1402319285.7595.9.camel@i7.infradead.org>
+
+From: David Woodhouse <dwmw2@infradead.org>
+
+Based on commit ea8ea460c9ace60bbb5ac6e5521d637d5c15293d upstream
+
+This missing IOTLB flush was added as a minor, inconsequential bug-fix
+in commit ea8ea460c ("iommu/vt-d: Clean up and fix page table clear/free
+behaviour") in 3.15. It wasn't originally intended for -stable but a
+couple of users have reported issues which turn out to be fixed by
+adding the missing flush.
+
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+---
+For 3.14 and earlier. As noted, this fix is in 3.15 already.
+
+ drivers/iommu/intel-iommu.c |   18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+--- a/drivers/iommu/intel-iommu.c
++++ b/drivers/iommu/intel-iommu.c
+@@ -4075,7 +4075,7 @@ static size_t intel_iommu_unmap(struct i
+                            unsigned long iova, size_t size)
+ {
+       struct dmar_domain *dmar_domain = domain->priv;
+-      int order;
++      int order, iommu_id;
+       order = dma_pte_clear_range(dmar_domain, iova >> VTD_PAGE_SHIFT,
+                           (iova + size - 1) >> VTD_PAGE_SHIFT);
+@@ -4083,6 +4083,22 @@ static size_t intel_iommu_unmap(struct i
+       if (dmar_domain->max_addr == iova + size)
+               dmar_domain->max_addr = iova;
++      for_each_set_bit(iommu_id, dmar_domain->iommu_bmp, g_num_of_iommus) {
++              struct intel_iommu *iommu = g_iommus[iommu_id];
++              int num, ndomains;
++
++              /*
++               * find bit position of dmar_domain
++               */
++              ndomains = cap_ndoms(iommu->cap);
++              for_each_set_bit(num, iommu->domain_ids, ndomains) {
++                      if (iommu->domains[num] == dmar_domain)
++                              iommu_flush_iotlb_psi(iommu, num,
++                                                    iova >> VTD_PAGE_SHIFT,
++                                                    1 << order, 0);
++              }
++      }
++
+       return PAGE_SIZE << order;
+ }
index 8ea91257e9cd027b768928facc8c38654bc1f3a9..9be171550057d6291fef8eebf03c912e0bcec26d 100644 (file)
@@ -74,3 +74,5 @@ netfilter-fix-potential-use-after-free-in-ip6_route_me_harder.patch
 netfilter-nfnetlink-fix-use-after-free-when-it-fails-to-process-batch.patch
 drm-i915-add-unregister-callback-to-connector.patch
 drm-i915-dp-fix-order-of-dp-aux-i2c-device-cleanup.patch
+gpio-mcp23s08-bug-fix-of-spi-device-tree-registration.patch
+iommu-vt-d-fix-missing-iotlb-flush-in-intel_iommu_unmap.patch