From: Greg Kroah-Hartman Date: Wed, 5 Jun 2013 05:12:06 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.81~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d4f1a8e3a359694e4e136a1743150ad3dff961c;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches 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 --- 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 index 00000000000..de66fee2ec4 --- /dev/null +++ b/queue-3.4/iommu-amd-re-enable-iommu-event-log-interrupt-after-handling.patch @@ -0,0 +1,47 @@ +From 925fe08bce38d1ff052fe2209b9e2b8d5fbb7f98 Mon Sep 17 00:00:00 2001 +From: Suravee Suthikulpanit +Date: Wed, 27 Mar 2013 18:51:52 -0500 +Subject: iommu/amd: Re-enable IOMMU event log interrupt after handling. + +From: Suravee Suthikulpanit + +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 +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..542bf389fb8 --- /dev/null +++ b/queue-3.4/iommu-amd-workaround-for-erbt1312.patch @@ -0,0 +1,83 @@ +From d3263bc29706e42f74d8800807c2dedf320d77f1 Mon Sep 17 00:00:00 2001 +From: Joerg Roedel +Date: Thu, 18 Apr 2013 17:55:04 +0200 +Subject: iommu/amd: Workaround for ERBT1312 + +From: Joerg Roedel + +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 +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..484f90058ad --- /dev/null +++ b/queue-3.4/jfs-fix-a-couple-races.patch @@ -0,0 +1,54 @@ +From 73aaa22d5ffb2630456bac2f9a4ed9b81d0d7271 Mon Sep 17 00:00:00 2001 +From: Dave Kleikamp +Date: Wed, 1 May 2013 11:08:38 -0500 +Subject: jfs: fix a couple races + +From: Dave Kleikamp + +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 +Signed-off-by: Dave Kleikamp +Signed-off-by: Greg Kroah-Hartman + +--- + 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); + } + diff --git a/queue-3.4/series b/queue-3.4/series index 9375c4d1e21..a28c4024c4d 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -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 index 00000000000..4cde85d6efc --- /dev/null +++ b/queue-3.4/x86-um-correct-syscall-table-type-attributes-breaking-gcc-4.8.patch @@ -0,0 +1,38 @@ +From 9271b0b4b2044c6db06051fe60bc58cdd4f17c7c Mon Sep 17 00:00:00 2001 +From: Martin Pelikan +Date: Sat, 9 Jun 2012 21:22:11 +0200 +Subject: x86, um: Correct syscall table type attributes breaking gcc 4.8 + +From: Martin Pelikan + +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 +Link: http://lkml.kernel.org/r/1339269731-10772-1-git-send-email-pelikan@storkhole.cz +Acked-by: Richard Weinberger +Signed-off-by: H. Peter Anvin +Cc: Bernhard M. Wiedemann +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..28be93dec30 --- /dev/null +++ b/queue-3.4/xen-netback-remove-skb-in-xen_netbk_alloc_page.patch @@ -0,0 +1,48 @@ +From 27f852282ab9a028f57da96d05c26f38c424a315 Mon Sep 17 00:00:00 2001 +From: Wei Liu +Date: Mon, 25 Mar 2013 01:08:20 +0000 +Subject: xen-netback: remove skb in xen_netbk_alloc_page + +From: Wei Liu + +commit 27f852282ab9a028f57da96d05c26f38c424a315 upstream. + +This variable is never used. + +Signed-off-by: Wei Liu +Acked-by: Ian Campbell +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + 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);