]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jun 2013 05:12:06 +0000 (22:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jun 2013 05:12:06 +0000 (22:12 -0700)
added patches:
iommu-amd-re-enable-iommu-event-log-interrupt-after-handling.patch
iommu-amd-workaround-for-erbt1312.patch
jfs-fix-a-couple-races.patch
x86-um-correct-syscall-table-type-attributes-breaking-gcc-4.8.patch
xen-netback-remove-skb-in-xen_netbk_alloc_page.patch

queue-3.4/iommu-amd-re-enable-iommu-event-log-interrupt-after-handling.patch [new file with mode: 0644]
queue-3.4/iommu-amd-workaround-for-erbt1312.patch [new file with mode: 0644]
queue-3.4/jfs-fix-a-couple-races.patch [new file with mode: 0644]
queue-3.4/series
queue-3.4/x86-um-correct-syscall-table-type-attributes-breaking-gcc-4.8.patch [new file with mode: 0644]
queue-3.4/xen-netback-remove-skb-in-xen_netbk_alloc_page.patch [new file with mode: 0644]

diff --git a/queue-3.4/iommu-amd-re-enable-iommu-event-log-interrupt-after-handling.patch b/queue-3.4/iommu-amd-re-enable-iommu-event-log-interrupt-after-handling.patch
new file mode 100644 (file)
index 0000000..de66fee
--- /dev/null
@@ -0,0 +1,47 @@
+From 925fe08bce38d1ff052fe2209b9e2b8d5fbb7f98 Mon Sep 17 00:00:00 2001
+From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
+Date: Wed, 27 Mar 2013 18:51:52 -0500
+Subject: iommu/amd: Re-enable IOMMU event log interrupt after handling.
+
+From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
+
+commit 925fe08bce38d1ff052fe2209b9e2b8d5fbb7f98 upstream.
+
+Current driver does not clear the IOMMU event log interrupt bit
+in the IOMMU status register after processing an interrupt.
+This causes the IOMMU hardware to generate event log interrupt only once.
+This has been observed in both IOMMU v1 and V2 hardware.
+This patch clears the bit by writing 1 to bit 1 of the IOMMU
+status register (MMIO Offset 2020h)
+
+Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
+Signed-off-by: Joerg Roedel <joro@8bytes.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iommu/amd_iommu.c       |    3 +++
+ drivers/iommu/amd_iommu_types.h |    1 +
+ 2 files changed, 4 insertions(+)
+
+--- a/drivers/iommu/amd_iommu.c
++++ b/drivers/iommu/amd_iommu.c
+@@ -534,6 +534,9 @@ static void iommu_poll_events(struct amd
+       u32 head, tail;
+       unsigned long flags;
++      /* enable event interrupts again */
++      writel(MMIO_STATUS_EVT_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET);
++
+       spin_lock_irqsave(&iommu->lock, flags);
+       head = readl(iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);
+--- a/drivers/iommu/amd_iommu_types.h
++++ b/drivers/iommu/amd_iommu_types.h
+@@ -99,6 +99,7 @@
+ #define PASID_MASK            0x000fffff
+ /* MMIO status bits */
++#define MMIO_STATUS_EVT_INT_MASK      (1 << 1)
+ #define MMIO_STATUS_COM_WAIT_INT_MASK (1 << 2)
+ #define MMIO_STATUS_PPR_INT_MASK      (1 << 6)
diff --git a/queue-3.4/iommu-amd-workaround-for-erbt1312.patch b/queue-3.4/iommu-amd-workaround-for-erbt1312.patch
new file mode 100644 (file)
index 0000000..542bf38
--- /dev/null
@@ -0,0 +1,83 @@
+From d3263bc29706e42f74d8800807c2dedf320d77f1 Mon Sep 17 00:00:00 2001
+From: Joerg Roedel <joro@8bytes.org>
+Date: Thu, 18 Apr 2013 17:55:04 +0200
+Subject: iommu/amd: Workaround for ERBT1312
+
+From: Joerg Roedel <joro@8bytes.org>
+
+commit d3263bc29706e42f74d8800807c2dedf320d77f1 upstream.
+
+Work around an IOMMU  hardware bug where clearing the
+EVT_INT or PPR_INT bit in the status register may race with
+the hardware trying to set it again. When not handled the
+bit might not be cleared and we lose all future event or ppr
+interrupts.
+
+Reported-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
+Signed-off-by: Joerg Roedel <joro@8bytes.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iommu/amd_iommu.c |   34 ++++++++++++++++++++++++++--------
+ 1 file changed, 26 insertions(+), 8 deletions(-)
+
+--- a/drivers/iommu/amd_iommu.c
++++ b/drivers/iommu/amd_iommu.c
+@@ -531,14 +531,23 @@ retry:
+ static void iommu_poll_events(struct amd_iommu *iommu)
+ {
+-      u32 head, tail;
++      u32 head, tail, status;
+       unsigned long flags;
+-      /* enable event interrupts again */
+-      writel(MMIO_STATUS_EVT_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET);
+-
+       spin_lock_irqsave(&iommu->lock, flags);
++      /* enable event interrupts again */
++      do {
++              /*
++               * Workaround for Erratum ERBT1312
++               * Clearing the EVT_INT bit may race in the hardware, so read
++               * it again and make sure it was really cleared
++               */
++              status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET);
++              writel(MMIO_STATUS_EVT_INT_MASK,
++                     iommu->mmio_base + MMIO_STATUS_OFFSET);
++      } while (status & MMIO_STATUS_EVT_INT_MASK);
++
+       head = readl(iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);
+       tail = readl(iommu->mmio_base + MMIO_EVT_TAIL_OFFSET);
+@@ -575,16 +584,25 @@ static void iommu_handle_ppr_entry(struc
+ static void iommu_poll_ppr_log(struct amd_iommu *iommu)
+ {
+       unsigned long flags;
+-      u32 head, tail;
++      u32 head, tail, status;
+       if (iommu->ppr_log == NULL)
+               return;
+-      /* enable ppr interrupts again */
+-      writel(MMIO_STATUS_PPR_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET);
+-
+       spin_lock_irqsave(&iommu->lock, flags);
++      /* enable ppr interrupts again */
++      do {
++              /*
++               * Workaround for Erratum ERBT1312
++               * Clearing the PPR_INT bit may race in the hardware, so read
++               * it again and make sure it was really cleared
++               */
++              status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET);
++              writel(MMIO_STATUS_PPR_INT_MASK,
++                     iommu->mmio_base + MMIO_STATUS_OFFSET);
++      } while (status & MMIO_STATUS_PPR_INT_MASK);
++
+       head = readl(iommu->mmio_base + MMIO_PPR_HEAD_OFFSET);
+       tail = readl(iommu->mmio_base + MMIO_PPR_TAIL_OFFSET);
diff --git a/queue-3.4/jfs-fix-a-couple-races.patch b/queue-3.4/jfs-fix-a-couple-races.patch
new file mode 100644 (file)
index 0000000..484f900
--- /dev/null
@@ -0,0 +1,54 @@
+From 73aaa22d5ffb2630456bac2f9a4ed9b81d0d7271 Mon Sep 17 00:00:00 2001
+From: Dave Kleikamp <dave.kleikamp@oracle.com>
+Date: Wed, 1 May 2013 11:08:38 -0500
+Subject: jfs: fix a couple races
+
+From: Dave Kleikamp <dave.kleikamp@oracle.com>
+
+commit 73aaa22d5ffb2630456bac2f9a4ed9b81d0d7271 upstream.
+
+This patch fixes races uncovered by xfstests testcase 068.
+
+One race is the result of jfs_sync() trying to write a sync point to the
+journal after it has been frozen (or possibly in the process). Since
+freezing sync's the journal, there is no need to write a sync point so
+we simply want to return.
+
+The second involves jfs_write_inode() being called on a deleted inode.
+It calls jfs_flush_journal which is held up by the jfs_commit thread
+doing the final iput on the same deleted inode, which itself is
+waiting for the I_SYNC flag to be cleared. jfs_write_inode need not
+do anything when i_nlink is zero, which is the easy fix.
+
+Reported-by: Michael L. Semon <mlsemon35@gmail.com>
+Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/jfs/inode.c      |    2 +-
+ fs/jfs/jfs_logmgr.c |    3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/fs/jfs/inode.c
++++ b/fs/jfs/inode.c
+@@ -125,7 +125,7 @@ int jfs_write_inode(struct inode *inode,
+ {
+       int wait = wbc->sync_mode == WB_SYNC_ALL;
+-      if (test_cflag(COMMIT_Nolink, inode))
++      if (inode->i_nlink == 0)
+               return 0;
+       /*
+        * If COMMIT_DIRTY is not set, the inode isn't really dirty.
+--- a/fs/jfs/jfs_logmgr.c
++++ b/fs/jfs/jfs_logmgr.c
+@@ -1058,7 +1058,8 @@ static int lmLogSync(struct jfs_log * lo
+  */
+ void jfs_syncpt(struct jfs_log *log, int hard_sync)
+ {     LOG_LOCK(log);
+-      lmLogSync(log, hard_sync);
++      if (!test_bit(log_QUIESCE, &log->flag))
++              lmLogSync(log, hard_sync);
+       LOG_UNLOCK(log);
+ }
index 9375c4d1e21f947a36d868c980b5bc38efb64ed0..a28c4024c4d8ef8cc17b7c11b5df65fa2b610e91 100644 (file)
@@ -35,3 +35,8 @@ ata_piix-add-pci-ids-for-intel-baytail.patch
 libata-make-ata_exec_internal_sg-honor-dmadir.patch
 m68k-mac-fix-unexpected-interrupt-with-config_early_printk.patch
 xen-events-handle-virq_timer-before-any-other-hardirq-in-event-loop.patch
+jfs-fix-a-couple-races.patch
+xen-netback-remove-skb-in-xen_netbk_alloc_page.patch
+iommu-amd-re-enable-iommu-event-log-interrupt-after-handling.patch
+iommu-amd-workaround-for-erbt1312.patch
+x86-um-correct-syscall-table-type-attributes-breaking-gcc-4.8.patch
diff --git a/queue-3.4/x86-um-correct-syscall-table-type-attributes-breaking-gcc-4.8.patch b/queue-3.4/x86-um-correct-syscall-table-type-attributes-breaking-gcc-4.8.patch
new file mode 100644 (file)
index 0000000..4cde85d
--- /dev/null
@@ -0,0 +1,38 @@
+From 9271b0b4b2044c6db06051fe60bc58cdd4f17c7c Mon Sep 17 00:00:00 2001
+From: Martin Pelikan <pelikan@storkhole.cz>
+Date: Sat, 9 Jun 2012 21:22:11 +0200
+Subject: x86, um: Correct syscall table type attributes breaking gcc 4.8
+
+From: Martin Pelikan <pelikan@storkhole.cz>
+
+commit 9271b0b4b2044c6db06051fe60bc58cdd4f17c7c upstream.
+
+The latest GCC 4.8 does some more checking on type attributes that
+break the build for ARCH=um -> fill them in.  Specifically, the
+"asmlinkage" attributes is now tested for consistency.
+
+Signed-off-by: Martin Pelikan <pelikan@storkhole.cz>
+Link: http://lkml.kernel.org/r/1339269731-10772-1-git-send-email-pelikan@storkhole.cz
+Acked-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: H. Peter Anvin <hpa@zytor.com>
+Cc: Bernhard M. Wiedemann <bwiedemann@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/um/sys_call_table_32.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/um/sys_call_table_32.c
++++ b/arch/x86/um/sys_call_table_32.c
+@@ -39,9 +39,9 @@
+ #undef __SYSCALL_I386
+ #define __SYSCALL_I386(nr, sym, compat) [ nr ] = sym,
+-typedef void (*sys_call_ptr_t)(void);
++typedef asmlinkage void (*sys_call_ptr_t)(void);
+-extern void sys_ni_syscall(void);
++extern asmlinkage void sys_ni_syscall(void);
+ const sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
+       /*
diff --git a/queue-3.4/xen-netback-remove-skb-in-xen_netbk_alloc_page.patch b/queue-3.4/xen-netback-remove-skb-in-xen_netbk_alloc_page.patch
new file mode 100644 (file)
index 0000000..28be93d
--- /dev/null
@@ -0,0 +1,48 @@
+From 27f852282ab9a028f57da96d05c26f38c424a315 Mon Sep 17 00:00:00 2001
+From: Wei Liu <wei.liu2@citrix.com>
+Date: Mon, 25 Mar 2013 01:08:20 +0000
+Subject: xen-netback: remove skb in xen_netbk_alloc_page
+
+From: Wei Liu <wei.liu2@citrix.com>
+
+commit 27f852282ab9a028f57da96d05c26f38c424a315 upstream.
+
+This variable is never used.
+
+Signed-off-by: Wei Liu <wei.liu2@citrix.com>
+Acked-by: Ian Campbell <ian.campbell@citrix.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/xen-netback/netback.c |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/xen-netback/netback.c
++++ b/drivers/net/xen-netback/netback.c
+@@ -914,7 +914,6 @@ static int netbk_count_requests(struct x
+ }
+ static struct page *xen_netbk_alloc_page(struct xen_netbk *netbk,
+-                                       struct sk_buff *skb,
+                                        u16 pending_idx)
+ {
+       struct page *page;
+@@ -948,7 +947,7 @@ static struct gnttab_copy *xen_netbk_get
+               index = pending_index(netbk->pending_cons++);
+               pending_idx = netbk->pending_ring[index];
+-              page = xen_netbk_alloc_page(netbk, skb, pending_idx);
++              page = xen_netbk_alloc_page(netbk, pending_idx);
+               if (!page)
+                       goto err;
+@@ -1353,7 +1352,7 @@ static unsigned xen_netbk_tx_build_gops(
+               }
+               /* XXX could copy straight to head */
+-              page = xen_netbk_alloc_page(netbk, skb, pending_idx);
++              page = xen_netbk_alloc_page(netbk, pending_idx);
+               if (!page) {
+                       kfree_skb(skb);
+                       netbk_tx_err(vif, &txreq, idx);