From: Greg Kroah-Hartman Date: Sat, 9 Jun 2012 15:50:03 +0000 (+0900) Subject: 3.4-stable patches X-Git-Tag: v3.0.35~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f55402b63a036b99d5c7186efc41d6cc044ac976;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: btree-fix-tree-corruption-in-btree_get_prev.patch char-agp-add-another-ironlake-host-bridge.patch drm-i915-reset-last_retired_head-when-resetting-ring.patch drm-nouveau-disp-fix-dithering-not-being-enabled-on-some-edp-macbooks.patch ext4-fix-the-free-blocks-calculation-for-ext3-file-systems-w-uninit_bg.patch module_param-stop-double-calling-parameters.patch powerpc-fix-kernel-panic-during-kernel-module-load.patch powerpc-time-sanity-check-of-decrementer-expiration-is-necessary.patch timekeeping-fix-clock_monotonic-inconsistency-during-leapsecond.patch x86-mce-amd-make-apic-lvt-thresholding-interrupt-optional.patch x86-uv-fix-uv2-bau-legacy-mode.patch --- diff --git a/queue-3.4/btree-fix-tree-corruption-in-btree_get_prev.patch b/queue-3.4/btree-fix-tree-corruption-in-btree_get_prev.patch new file mode 100644 index 00000000000..5c3c5e38ddb --- /dev/null +++ b/queue-3.4/btree-fix-tree-corruption-in-btree_get_prev.patch @@ -0,0 +1,54 @@ +From cbf8ae32f66a9ceb8907ad9e16663c2a29e48990 Mon Sep 17 00:00:00 2001 +From: Roland Dreier +Date: Thu, 7 Jun 2012 14:21:13 -0700 +Subject: btree: fix tree corruption in btree_get_prev() + +From: Roland Dreier + +commit cbf8ae32f66a9ceb8907ad9e16663c2a29e48990 upstream. + +The memory the parameter __key points to is used as an iterator in +btree_get_prev(), so if we save off a bkey() pointer in retry_key and +then assign that to __key, we'll end up corrupting the btree internals +when we do eg + + longcpy(__key, bkey(geo, node, i), geo->keylen); + +to return the key value. What we should do instead is use longcpy() to +copy the key value that retry_key points to __key. + +This can cause a btree to get corrupted by seemingly read-only +operations such as btree_for_each_safe. + +[akpm@linux-foundation.org: avoid the double longcpy()] +Signed-off-by: Roland Dreier +Acked-by: Joern Engel +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + lib/btree.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/lib/btree.c ++++ b/lib/btree.c +@@ -319,8 +319,8 @@ void *btree_get_prev(struct btree_head * + + if (head->height == 0) + return NULL; +-retry: + longcpy(key, __key, geo->keylen); ++retry: + dec_key(geo, key); + + node = head->node; +@@ -351,7 +351,7 @@ retry: + } + miss: + if (retry_key) { +- __key = retry_key; ++ longcpy(key, retry_key, geo->keylen); + retry_key = NULL; + goto retry; + } diff --git a/queue-3.4/char-agp-add-another-ironlake-host-bridge.patch b/queue-3.4/char-agp-add-another-ironlake-host-bridge.patch new file mode 100644 index 00000000000..b1bb5da65f0 --- /dev/null +++ b/queue-3.4/char-agp-add-another-ironlake-host-bridge.patch @@ -0,0 +1,42 @@ +From 67384fe3fd450536342330f684ea1f7dcaef8130 Mon Sep 17 00:00:00 2001 +From: Eugeni Dodonov +Date: Wed, 6 Jun 2012 11:59:06 -0300 +Subject: char/agp: add another Ironlake host bridge + +From: Eugeni Dodonov + +commit 67384fe3fd450536342330f684ea1f7dcaef8130 upstream. + +This seems to come on Gigabyte H55M-S2V and was discovered through the +https://bugs.freedesktop.org/show_bug.cgi?id=50381 debugging. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50381 +Signed-off-by: Eugeni Dodonov +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/agp/intel-agp.c | 1 + + drivers/char/agp/intel-agp.h | 1 + + 2 files changed, 2 insertions(+) + +--- a/drivers/char/agp/intel-agp.c ++++ b/drivers/char/agp/intel-agp.c +@@ -898,6 +898,7 @@ static struct pci_device_id agp_intel_pc + ID(PCI_DEVICE_ID_INTEL_B43_HB), + ID(PCI_DEVICE_ID_INTEL_B43_1_HB), + ID(PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB), ++ ID(PCI_DEVICE_ID_INTEL_IRONLAKE_D2_HB), + ID(PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB), + ID(PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB), + ID(PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB), +--- a/drivers/char/agp/intel-agp.h ++++ b/drivers/char/agp/intel-agp.h +@@ -211,6 +211,7 @@ + #define PCI_DEVICE_ID_INTEL_G41_HB 0x2E30 + #define PCI_DEVICE_ID_INTEL_G41_IG 0x2E32 + #define PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB 0x0040 ++#define PCI_DEVICE_ID_INTEL_IRONLAKE_D2_HB 0x0069 + #define PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG 0x0042 + #define PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB 0x0044 + #define PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB 0x0062 diff --git a/queue-3.4/drm-i915-reset-last_retired_head-when-resetting-ring.patch b/queue-3.4/drm-i915-reset-last_retired_head-when-resetting-ring.patch new file mode 100644 index 00000000000..fbf33417a29 --- /dev/null +++ b/queue-3.4/drm-i915-reset-last_retired_head-when-resetting-ring.patch @@ -0,0 +1,42 @@ +From c3b20037926e607b6cdaecbf9d3103e2ca63bc31 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Mon, 28 May 2012 22:33:02 +0100 +Subject: drm/i915: Reset last_retired_head when resetting ring + +From: Chris Wilson + +commit c3b20037926e607b6cdaecbf9d3103e2ca63bc31 upstream. + +When we reset the ring control registers, including the HEAD and TAIL of +the ring, we also need to reset associated state. In this instance, we +were failing to reset the cached value of ring->last_retired_head and so +upon the first request for more space following a resume would +potentially (depending on a narrow race window) believe that the HEAD had +advanced much further than reality. + +This is a regression from: + +commit a71d8d94525e8fd855c0466fb586ae1cb008f3a2 +Author: Chris Wilson +Date: Wed Feb 15 11:25:36 2012 +0000 + + drm/i915: Record the tail at each request and use it to estimate the head + +Signed-off-by: Chris Wilson +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_ringbuffer.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/i915/intel_ringbuffer.c ++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c +@@ -309,6 +309,7 @@ static int init_ring_common(struct intel + ring->head = I915_READ_HEAD(ring); + ring->tail = I915_READ_TAIL(ring) & TAIL_ADDR; + ring->space = ring_space(ring); ++ ring->last_retired_head = -1; + } + + return 0; diff --git a/queue-3.4/drm-nouveau-disp-fix-dithering-not-being-enabled-on-some-edp-macbooks.patch b/queue-3.4/drm-nouveau-disp-fix-dithering-not-being-enabled-on-some-edp-macbooks.patch new file mode 100644 index 00000000000..1722f78ceb9 --- /dev/null +++ b/queue-3.4/drm-nouveau-disp-fix-dithering-not-being-enabled-on-some-edp-macbooks.patch @@ -0,0 +1,34 @@ +From a6a17859f1bdf607650ee055101f54c5f207762b Mon Sep 17 00:00:00 2001 +From: Ben Skeggs +Date: Sat, 5 May 2012 00:39:21 +1000 +Subject: drm/nouveau/disp: fix dithering not being enabled on some eDP macbooks + +From: Ben Skeggs + +commit a6a17859f1bdf607650ee055101f54c5f207762b upstream. + +Signed-off-by: Ben Skeggs +Cc: Maarten Lankhorst +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/nouveau/nouveau_connector.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/nouveau/nouveau_connector.c ++++ b/drivers/gpu/drm/nouveau/nouveau_connector.c +@@ -654,7 +654,13 @@ nouveau_connector_detect_depth(struct dr + if (nv_connector->edid && connector->display_info.bpc) + return; + +- /* if not, we're out of options unless we're LVDS, default to 8bpc */ ++ /* EDID 1.4 is *supposed* to be supported on eDP, but, Apple... */ ++ if (nv_connector->type == DCB_CONNECTOR_eDP) { ++ connector->display_info.bpc = 6; ++ return; ++ } ++ ++ /* we're out of options unless we're LVDS, default to 8bpc */ + if (nv_encoder->dcb->type != OUTPUT_LVDS) { + connector->display_info.bpc = 8; + return; diff --git a/queue-3.4/ext4-fix-the-free-blocks-calculation-for-ext3-file-systems-w-uninit_bg.patch b/queue-3.4/ext4-fix-the-free-blocks-calculation-for-ext3-file-systems-w-uninit_bg.patch new file mode 100644 index 00000000000..5f7ab7cd722 --- /dev/null +++ b/queue-3.4/ext4-fix-the-free-blocks-calculation-for-ext3-file-systems-w-uninit_bg.patch @@ -0,0 +1,73 @@ +From b0dd6b70f0fda17ae9762fbb72d98e40a4f66556 Mon Sep 17 00:00:00 2001 +From: Theodore Ts'o +Date: Thu, 7 Jun 2012 18:56:06 -0400 +Subject: ext4: fix the free blocks calculation for ext3 file systems w/ uninit_bg + +From: Theodore Ts'o + +commit b0dd6b70f0fda17ae9762fbb72d98e40a4f66556 upstream. + +Ext3 filesystems that are converted to use as many ext4 file system +features as possible will enable uninit_bg to speed up e2fsck times. +These file systems will have a native ext3 layout of inode tables and +block allocation bitmaps (as opposed to ext4's flex_bg layout). +Unfortunately, in these cases, when first allocating a block in an +uninitialized block group, ext4 would incorrectly calculate the number +of free blocks in that block group, and then errorneously report that +the file system was corrupt: + +EXT4-fs error (device vdd): ext4_mb_generate_buddy:741: group 30, 32254 clusters in bitmap, 32258 in gd + +This problem can be reproduced via: + + mke2fs -q -t ext4 -O ^flex_bg /dev/vdd 5g + mount -t ext4 /dev/vdd /mnt + fallocate -l 4600m /mnt/test + +The problem was caused by a bone headed mistake in the check to see if a +particular metadata block was part of the block group. + +Many thanks to Kees Cook for finding and bisecting the buggy commit +which introduced this bug (commit fd034a84e1, present since v3.2). + +Reported-by: Sander Eikelenboom +Reported-by: Kees Cook +Signed-off-by: "Theodore Ts'o" +Tested-by: Kees Cook +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ext4/balloc.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/fs/ext4/balloc.c ++++ b/fs/ext4/balloc.c +@@ -90,8 +90,8 @@ unsigned ext4_num_overhead_clusters(stru + * unusual file system layouts. + */ + if (ext4_block_in_group(sb, ext4_block_bitmap(sb, gdp), block_group)) { +- block_cluster = EXT4_B2C(sbi, (start - +- ext4_block_bitmap(sb, gdp))); ++ block_cluster = EXT4_B2C(sbi, ++ ext4_block_bitmap(sb, gdp) - start); + if (block_cluster < num_clusters) + block_cluster = -1; + else if (block_cluster == num_clusters) { +@@ -102,7 +102,7 @@ unsigned ext4_num_overhead_clusters(stru + + if (ext4_block_in_group(sb, ext4_inode_bitmap(sb, gdp), block_group)) { + inode_cluster = EXT4_B2C(sbi, +- start - ext4_inode_bitmap(sb, gdp)); ++ ext4_inode_bitmap(sb, gdp) - start); + if (inode_cluster < num_clusters) + inode_cluster = -1; + else if (inode_cluster == num_clusters) { +@@ -114,7 +114,7 @@ unsigned ext4_num_overhead_clusters(stru + itbl_blk = ext4_inode_table(sb, gdp); + for (i = 0; i < sbi->s_itb_per_group; i++) { + if (ext4_block_in_group(sb, itbl_blk + i, block_group)) { +- c = EXT4_B2C(sbi, start - itbl_blk + i); ++ c = EXT4_B2C(sbi, itbl_blk + i - start); + if ((c < num_clusters) || (c == inode_cluster) || + (c == block_cluster) || (c == itbl_cluster)) + continue; diff --git a/queue-3.4/module_param-stop-double-calling-parameters.patch b/queue-3.4/module_param-stop-double-calling-parameters.patch new file mode 100644 index 00000000000..39d38ea7a23 --- /dev/null +++ b/queue-3.4/module_param-stop-double-calling-parameters.patch @@ -0,0 +1,92 @@ +From ae82fdb1406ad41d68f07027fe31f2d35ba22a90 Mon Sep 17 00:00:00 2001 +From: Rusty Russell +Date: Fri, 8 Jun 2012 14:58:13 +0930 +Subject: module_param: stop double-calling parameters. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Rusty Russell + +commit ae82fdb1406ad41d68f07027fe31f2d35ba22a90 upstream. + +Commit 026cee0086fe1df4cf74691cf273062cc769617d "params: +_initcall-like kernel parameters" set old-style module +parameters to level 0. And we call those level 0 calls where we used +to, early in start_kernel(). + +We also loop through the initcall levels and call the levelled +module_params before the corresponding initcall. Unfortunately level +0 is early_init(), so we call the standard module_param calls twice. + +(Turns out most things don't care, but at least ubi.mtd does). + +Change the level to -1 for standard module_param calls. + +Reported-by: Benoît Thébaudeau +Signed-off-by: Rusty Russell +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/moduleparam.h | 10 +++++----- + init/main.c | 2 +- + 2 files changed, 6 insertions(+), 6 deletions(-) + +--- a/include/linux/moduleparam.h ++++ b/include/linux/moduleparam.h +@@ -128,7 +128,7 @@ struct kparam_array + * The ops can have NULL set or get functions. + */ + #define module_param_cb(name, ops, arg, perm) \ +- __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, 0) ++ __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1) + + /** + * _param_cb - general callback for a module/cmdline parameter +@@ -192,7 +192,7 @@ struct kparam_array + { (void *)set, (void *)get }; \ + __module_param_call(MODULE_PARAM_PREFIX, \ + name, &__param_ops_##name, arg, \ +- (perm) + sizeof(__check_old_set_param(set))*0, 0) ++ (perm) + sizeof(__check_old_set_param(set))*0, -1) + + /* We don't get oldget: it's often a new-style param_get_uint, etc. */ + static inline int +@@ -272,7 +272,7 @@ static inline void __kernel_param_unlock + */ + #define core_param(name, var, type, perm) \ + param_check_##type(name, &(var)); \ +- __module_param_call("", name, ¶m_ops_##type, &var, perm, 0) ++ __module_param_call("", name, ¶m_ops_##type, &var, perm, -1) + #endif /* !MODULE */ + + /** +@@ -290,7 +290,7 @@ static inline void __kernel_param_unlock + = { len, string }; \ + __module_param_call(MODULE_PARAM_PREFIX, name, \ + ¶m_ops_string, \ +- .str = &__param_string_##name, perm, 0); \ ++ .str = &__param_string_##name, perm, -1); \ + __MODULE_PARM_TYPE(name, "string") + + /** +@@ -431,7 +431,7 @@ extern int param_set_bint(const char *va + __module_param_call(MODULE_PARAM_PREFIX, name, \ + ¶m_array_ops, \ + .arr = &__param_arr_##name, \ +- perm, 0); \ ++ perm, -1); \ + __MODULE_PARM_TYPE(name, "array of " #type) + + extern struct kernel_param_ops param_array_ops; +--- a/init/main.c ++++ b/init/main.c +@@ -508,7 +508,7 @@ asmlinkage void __init start_kernel(void + parse_early_param(); + parse_args("Booting kernel", static_command_line, __start___param, + __stop___param - __start___param, +- 0, 0, &unknown_bootoption); ++ -1, -1, &unknown_bootoption); + + jump_label_init(); + diff --git a/queue-3.4/powerpc-fix-kernel-panic-during-kernel-module-load.patch b/queue-3.4/powerpc-fix-kernel-panic-during-kernel-module-load.patch new file mode 100644 index 00000000000..aa98e2d4d2f --- /dev/null +++ b/queue-3.4/powerpc-fix-kernel-panic-during-kernel-module-load.patch @@ -0,0 +1,68 @@ +From 3c75296562f43e6fbc6cddd3de948a7b3e4e9bcf Mon Sep 17 00:00:00 2001 +From: Steffen Rumler +Date: Wed, 6 Jun 2012 16:37:17 +0200 +Subject: powerpc: Fix kernel panic during kernel module load + +From: Steffen Rumler + +commit 3c75296562f43e6fbc6cddd3de948a7b3e4e9bcf upstream. + +This fixes a problem which can causes kernel oopses while loading +a kernel module. + +According to the PowerPC EABI specification, GPR r11 is assigned +the dedicated function to point to the previous stack frame. +In the powerpc-specific kernel module loader, do_plt_call() +(in arch/powerpc/kernel/module_32.c), GPR r11 is also used +to generate trampoline code. + +This combination crashes the kernel, in the case where the compiler +chooses to use a helper function for saving GPRs on entry, and the +module loader has placed the .init.text section far away from the +.text section, meaning that it has to generate a trampoline for +functions in the .init.text section to call the GPR save helper. +Because the trampoline trashes r11, references to the stack frame +using r11 can cause an oops. + +The fix just uses GPR r12 instead of GPR r11 for generating the +trampoline code. According to the statements from Freescale, this is +safe from an EABI perspective. + +I've tested the fix for kernel 2.6.33 on MPC8541. + +Signed-off-by: Steffen Rumler +[paulus@samba.org: reworded the description] +Signed-off-by: Paul Mackerras +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/module_32.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +--- a/arch/powerpc/kernel/module_32.c ++++ b/arch/powerpc/kernel/module_32.c +@@ -176,8 +176,8 @@ int module_frob_arch_sections(Elf32_Ehdr + + static inline int entry_matches(struct ppc_plt_entry *entry, Elf32_Addr val) + { +- if (entry->jump[0] == 0x3d600000 + ((val + 0x8000) >> 16) +- && entry->jump[1] == 0x396b0000 + (val & 0xffff)) ++ if (entry->jump[0] == 0x3d800000 + ((val + 0x8000) >> 16) ++ && entry->jump[1] == 0x398c0000 + (val & 0xffff)) + return 1; + return 0; + } +@@ -204,10 +204,9 @@ static uint32_t do_plt_call(void *locati + entry++; + } + +- /* Stolen from Paul Mackerras as well... */ +- entry->jump[0] = 0x3d600000+((val+0x8000)>>16); /* lis r11,sym@ha */ +- entry->jump[1] = 0x396b0000 + (val&0xffff); /* addi r11,r11,sym@l*/ +- entry->jump[2] = 0x7d6903a6; /* mtctr r11 */ ++ entry->jump[0] = 0x3d800000+((val+0x8000)>>16); /* lis r12,sym@ha */ ++ entry->jump[1] = 0x398c0000 + (val&0xffff); /* addi r12,r12,sym@l*/ ++ entry->jump[2] = 0x7d8903a6; /* mtctr r12 */ + entry->jump[3] = 0x4e800420; /* bctr */ + + DEBUGP("Initialized plt for 0x%x at %p\n", val, entry); diff --git a/queue-3.4/powerpc-time-sanity-check-of-decrementer-expiration-is-necessary.patch b/queue-3.4/powerpc-time-sanity-check-of-decrementer-expiration-is-necessary.patch new file mode 100644 index 00000000000..957d5e38895 --- /dev/null +++ b/queue-3.4/powerpc-time-sanity-check-of-decrementer-expiration-is-necessary.patch @@ -0,0 +1,62 @@ +From 860aed25a1f0936d4852ab936252b47cd1e630f1 Mon Sep 17 00:00:00 2001 +From: Paul Mackerras +Date: Fri, 1 Jun 2012 18:13:43 +1000 +Subject: powerpc/time: Sanity check of decrementer expiration is necessary + +From: Paul Mackerras + +commit 860aed25a1f0936d4852ab936252b47cd1e630f1 upstream. + +This reverts 68568add2c ("powerpc/time: Remove unnecessary sanity check +of decrementer expiration"). We do need to check whether we have reached +the expiration time of the next event, because we sometimes get an early +decrementer interrupt, most notably when we set the decrementer to 1 in +arch_irq_work_raise(). The effect of not having the sanity check is that +if timer_interrupt() gets called early, we leave the decrementer set to +its maximum value, which means we then don't get any more decrementer +interrupts for about 4 seconds (or longer, depending on timebase +frequency). I saw these pauses as a consequence of getting a stray +hypervisor decrementer interrupt left over from exiting a KVM guest. + +This isn't quite a straight revert because of changes to the surrounding +code, but it restores the same algorithm as was previously used. + +Acked-by: Anton Blanchard +Acked-by: Benjamin Herrenschmidt +Signed-off-by: Paul Mackerras +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/time.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +--- a/arch/powerpc/kernel/time.c ++++ b/arch/powerpc/kernel/time.c +@@ -474,6 +474,7 @@ void timer_interrupt(struct pt_regs * re + struct pt_regs *old_regs; + u64 *next_tb = &__get_cpu_var(decrementers_next_tb); + struct clock_event_device *evt = &__get_cpu_var(decrementers); ++ u64 now; + + /* Ensure a positive value is written to the decrementer, or else + * some CPUs will continue to take decrementer exceptions. +@@ -508,9 +509,16 @@ void timer_interrupt(struct pt_regs * re + irq_work_run(); + } + +- *next_tb = ~(u64)0; +- if (evt->event_handler) +- evt->event_handler(evt); ++ now = get_tb_or_rtc(); ++ if (now >= *next_tb) { ++ *next_tb = ~(u64)0; ++ if (evt->event_handler) ++ evt->event_handler(evt); ++ } else { ++ now = *next_tb - now; ++ if (now <= DECREMENTER_MAX) ++ set_dec((int)now); ++ } + + #ifdef CONFIG_PPC64 + /* collect purr register values often, for accurate calculations */ diff --git a/queue-3.4/series b/queue-3.4/series new file mode 100644 index 00000000000..ea275bd2fcd --- /dev/null +++ b/queue-3.4/series @@ -0,0 +1,11 @@ +drm-nouveau-disp-fix-dithering-not-being-enabled-on-some-edp-macbooks.patch +drm-i915-reset-last_retired_head-when-resetting-ring.patch +char-agp-add-another-ironlake-host-bridge.patch +btree-fix-tree-corruption-in-btree_get_prev.patch +powerpc-time-sanity-check-of-decrementer-expiration-is-necessary.patch +powerpc-fix-kernel-panic-during-kernel-module-load.patch +module_param-stop-double-calling-parameters.patch +timekeeping-fix-clock_monotonic-inconsistency-during-leapsecond.patch +ext4-fix-the-free-blocks-calculation-for-ext3-file-systems-w-uninit_bg.patch +x86-uv-fix-uv2-bau-legacy-mode.patch +x86-mce-amd-make-apic-lvt-thresholding-interrupt-optional.patch diff --git a/queue-3.4/timekeeping-fix-clock_monotonic-inconsistency-during-leapsecond.patch b/queue-3.4/timekeeping-fix-clock_monotonic-inconsistency-during-leapsecond.patch new file mode 100644 index 00000000000..06d8b8856d0 --- /dev/null +++ b/queue-3.4/timekeeping-fix-clock_monotonic-inconsistency-during-leapsecond.patch @@ -0,0 +1,44 @@ +From fad0c66c4bb836d57a5f125ecd38bed653ca863a Mon Sep 17 00:00:00 2001 +From: John Stultz +Date: Wed, 30 May 2012 10:54:57 -0700 +Subject: timekeeping: Fix CLOCK_MONOTONIC inconsistency during leapsecond + +From: John Stultz + +commit fad0c66c4bb836d57a5f125ecd38bed653ca863a upstream. + +Commit 6b43ae8a61 (ntp: Fix leap-second hrtimer livelock) broke the +leapsecond update of CLOCK_MONOTONIC. The missing leapsecond update to +wall_to_monotonic causes discontinuities in CLOCK_MONOTONIC. + +Adjust wall_to_monotonic when NTP inserted a leapsecond. + +Reported-by: Richard Cochran +Signed-off-by: John Stultz +Tested-by: Richard Cochran +Link: http://lkml.kernel.org/r/1338400497-12420-1-git-send-email-john.stultz@linaro.org +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/time/timekeeping.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/kernel/time/timekeeping.c ++++ b/kernel/time/timekeeping.c +@@ -964,6 +964,7 @@ static cycle_t logarithmic_accumulation( + timekeeper.xtime.tv_sec++; + leap = second_overflow(timekeeper.xtime.tv_sec); + timekeeper.xtime.tv_sec += leap; ++ timekeeper.wall_to_monotonic.tv_sec -= leap; + } + + /* Accumulate raw time */ +@@ -1079,6 +1080,7 @@ static void update_wall_time(void) + timekeeper.xtime.tv_sec++; + leap = second_overflow(timekeeper.xtime.tv_sec); + timekeeper.xtime.tv_sec += leap; ++ timekeeper.wall_to_monotonic.tv_sec -= leap; + } + + timekeeping_update(false); diff --git a/queue-3.4/x86-mce-amd-make-apic-lvt-thresholding-interrupt-optional.patch b/queue-3.4/x86-mce-amd-make-apic-lvt-thresholding-interrupt-optional.patch new file mode 100644 index 00000000000..ff28bed2c25 --- /dev/null +++ b/queue-3.4/x86-mce-amd-make-apic-lvt-thresholding-interrupt-optional.patch @@ -0,0 +1,141 @@ +From f227d4306cf30e1d5b6f231e8ef9006c34f3d186 Mon Sep 17 00:00:00 2001 +From: Borislav Petkov +Date: Mon, 16 Apr 2012 18:01:53 +0200 +Subject: x86, MCE, AMD: Make APIC LVT thresholding interrupt optional + +From: Borislav Petkov + +commit f227d4306cf30e1d5b6f231e8ef9006c34f3d186 upstream. + +Currently, the APIC LVT interrupt for error thresholding is implicitly +enabled. However, there are models in the F15h range which do not enable +it. Make the code machinery which sets up the APIC interrupt support +an optional setting and add an ->interrupt_capable member to the bank +representation mirroring that capability and enable the interrupt offset +programming only if it is true. + +Simplify code and fixup comment style while at it. + +Signed-off-by: Borislav Petkov +Cc: Robert Richter +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/cpu/mcheck/mce_amd.c | 56 +++++++++++++++++++++++++++-------- + 1 file changed, 44 insertions(+), 12 deletions(-) + +--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c ++++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c +@@ -51,6 +51,7 @@ struct threshold_block { + unsigned int cpu; + u32 address; + u16 interrupt_enable; ++ bool interrupt_capable; + u16 threshold_limit; + struct kobject kobj; + struct list_head miscj; +@@ -83,6 +84,21 @@ struct thresh_restart { + u16 old_limit; + }; + ++static bool lvt_interrupt_supported(unsigned int bank, u32 msr_high_bits) ++{ ++ /* ++ * bank 4 supports APIC LVT interrupts implicitly since forever. ++ */ ++ if (bank == 4) ++ return true; ++ ++ /* ++ * IntP: interrupt present; if this bit is set, the thresholding ++ * bank can generate APIC LVT interrupts ++ */ ++ return msr_high_bits & BIT(28); ++} ++ + static int lvt_off_valid(struct threshold_block *b, int apic, u32 lo, u32 hi) + { + int msr = (hi & MASK_LVTOFF_HI) >> 20; +@@ -104,8 +120,10 @@ static int lvt_off_valid(struct threshol + return 1; + }; + +-/* must be called with correct cpu affinity */ +-/* Called via smp_call_function_single() */ ++/* ++ * Called via smp_call_function_single(), must be called with correct ++ * cpu affinity. ++ */ + static void threshold_restart_bank(void *_tr) + { + struct thresh_restart *tr = _tr; +@@ -128,6 +146,12 @@ static void threshold_restart_bank(void + (new_count & THRESHOLD_MAX); + } + ++ /* clear IntType */ ++ hi &= ~MASK_INT_TYPE_HI; ++ ++ if (!tr->b->interrupt_capable) ++ goto done; ++ + if (tr->set_lvt_off) { + if (lvt_off_valid(tr->b, tr->lvt_off, lo, hi)) { + /* set new lvt offset */ +@@ -136,9 +160,10 @@ static void threshold_restart_bank(void + } + } + +- tr->b->interrupt_enable ? +- (hi = (hi & ~MASK_INT_TYPE_HI) | INT_TYPE_APIC) : +- (hi &= ~MASK_INT_TYPE_HI); ++ if (tr->b->interrupt_enable) ++ hi |= INT_TYPE_APIC; ++ ++ done: + + hi |= MASK_COUNT_EN_HI; + wrmsr(tr->b->address, lo, hi); +@@ -202,14 +227,17 @@ void mce_amd_feature_init(struct cpuinfo + if (shared_bank[bank] && c->cpu_core_id) + break; + +- offset = setup_APIC_mce(offset, +- (high & MASK_LVTOFF_HI) >> 20); +- + memset(&b, 0, sizeof(b)); +- b.cpu = cpu; +- b.bank = bank; +- b.block = block; +- b.address = address; ++ b.cpu = cpu; ++ b.bank = bank; ++ b.block = block; ++ b.address = address; ++ b.interrupt_capable = lvt_interrupt_supported(bank, high); ++ ++ if (b.interrupt_capable) { ++ int new = (high & MASK_LVTOFF_HI) >> 20; ++ offset = setup_APIC_mce(offset, new); ++ } + + mce_threshold_block_init(&b, offset); + mce_threshold_vector = amd_threshold_interrupt; +@@ -309,6 +337,9 @@ store_interrupt_enable(struct threshold_ + struct thresh_restart tr; + unsigned long new; + ++ if (!b->interrupt_capable) ++ return -EINVAL; ++ + if (strict_strtoul(buf, 0, &new) < 0) + return -EINVAL; + +@@ -467,6 +498,7 @@ static __cpuinit int allocate_threshold_ + b->cpu = cpu; + b->address = address; + b->interrupt_enable = 0; ++ b->interrupt_capable = lvt_interrupt_supported(bank, high); + b->threshold_limit = THRESHOLD_MAX; + + INIT_LIST_HEAD(&b->miscj); diff --git a/queue-3.4/x86-uv-fix-uv2-bau-legacy-mode.patch b/queue-3.4/x86-uv-fix-uv2-bau-legacy-mode.patch new file mode 100644 index 00000000000..93f172e559a --- /dev/null +++ b/queue-3.4/x86-uv-fix-uv2-bau-legacy-mode.patch @@ -0,0 +1,49 @@ +From d5d2d2eea84b0d8450b082edbc3dbde41fb8bfd8 Mon Sep 17 00:00:00 2001 +From: Cliff Wickman +Date: Thu, 7 Jun 2012 08:31:40 -0500 +Subject: x86/uv: Fix UV2 BAU legacy mode + +From: Cliff Wickman + +commit d5d2d2eea84b0d8450b082edbc3dbde41fb8bfd8 upstream. + +The SGI Altix UV2 BAU (Broadcast Assist Unit) as used for +tlb-shootdown (selective broadcast mode) always uses UV2 +broadcast descriptor format. There is no need to clear the +'legacy' (UV1) mode, because the hardware always uses UV2 mode +for selective broadcast. + +But the BIOS uses general broadcast and legacy mode, and the +hardware pays attention to the legacy mode bit for general +broadcast. So the kernel must not clear that mode bit. + +Signed-off-by: Cliff Wickman +Link: http://lkml.kernel.org/r/E1SccoO-0002Lh-Cb@eag09.americas.sgi.com +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/uv/uv_bau.h | 1 - + arch/x86/platform/uv/tlb_uv.c | 1 - + 2 files changed, 2 deletions(-) + +--- a/arch/x86/include/asm/uv/uv_bau.h ++++ b/arch/x86/include/asm/uv/uv_bau.h +@@ -149,7 +149,6 @@ + /* 4 bits of software ack period */ + #define UV2_ACK_MASK 0x7UL + #define UV2_ACK_UNITS_SHFT 3 +-#define UV2_LEG_SHFT UV2H_LB_BAU_MISC_CONTROL_USE_LEGACY_DESCRIPTOR_FORMATS_SHFT + #define UV2_EXT_SHFT UV2H_LB_BAU_MISC_CONTROL_ENABLE_EXTENDED_SB_STATUS_SHFT + + /* +--- a/arch/x86/platform/uv/tlb_uv.c ++++ b/arch/x86/platform/uv/tlb_uv.c +@@ -1295,7 +1295,6 @@ static void __init enable_timeouts(void) + */ + mmr_image |= (1L << SOFTACK_MSHIFT); + if (is_uv2_hub()) { +- mmr_image &= ~(1L << UV2_LEG_SHFT); + mmr_image |= (1L << UV2_EXT_SHFT); + } + write_mmr_misc_control(pnode, mmr_image);