From: Greg Kroah-Hartman Date: Mon, 23 Aug 2010 21:53:21 +0000 (-0700) Subject: .32 patches X-Git-Tag: v2.6.32.21~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e40d12f5fa51339fde5369334c3e3bb9532a6f7e;p=thirdparty%2Fkernel%2Fstable-queue.git .32 patches --- diff --git a/queue-2.6.32/drm-i915-add-reclaimable-to-i915-self-reclaimable-page-allocations.patch b/queue-2.6.32/drm-i915-add-reclaimable-to-i915-self-reclaimable-page-allocations.patch new file mode 100644 index 00000000000..b643cad3cf9 --- /dev/null +++ b/queue-2.6.32/drm-i915-add-reclaimable-to-i915-self-reclaimable-page-allocations.patch @@ -0,0 +1,51 @@ +From cd9f040df6ce46573760a507cb88192d05d27d86 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Sun, 18 Jul 2010 09:44:37 -0700 +Subject: drm/i915: add 'reclaimable' to i915 self-reclaimable page allocations + +From: Linus Torvalds + +commit cd9f040df6ce46573760a507cb88192d05d27d86 upstream. + +The hibernate issues that got fixed in commit 985b823b9192 ("drm/i915: +fix hibernation since i915 self-reclaim fixes") turn out to have been +incomplete. Vefa Bicakci tested lots of hibernate cycles, and without +the __GFP_RECLAIMABLE flag the system eventually fails to resume. + +With the flag added, Vefa can apparently hibernate forever (or until he +gets bored running his automated scripts, whichever comes first). + +The reclaimable flag was there originally, and was one of the flags that +were dropped (unintentionally) by commit 4bdadb978569 ("drm/i915: +Selectively enable self-reclaim") that introduced all these problems, +but I didn't want to just blindly add back all the flags in commit +985b823b9192, and it looked like __GFP_RECLAIM wasn't necessary. It +clearly was. + +I still suspect that there is some subtle reason we're missing that +causes the problems, but __GFP_RECLAIMABLE is certainly not wrong to use +in this context, and is what the code historically used. And we have no +idea what the causes the corruption without it. + +Reported-and-tested-by: M. Vefa Bicakci +Cc: Dave Airlie +Cc: Chris Wilson +Cc: KOSAKI Motohiro +Cc: Hugh Dickins +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_gem.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -2264,6 +2264,7 @@ i915_gem_object_get_pages(struct drm_gem + page = read_cache_page_gfp(mapping, i, + GFP_HIGHUSER | + __GFP_COLD | ++ __GFP_RECLAIMABLE | + gfpmask); + if (IS_ERR(page)) + goto err_pages; diff --git a/queue-2.6.32/drm-i915-fix-hibernation-since-i915-self-reclaim-fixes.patch b/queue-2.6.32/drm-i915-fix-hibernation-since-i915-self-reclaim-fixes.patch new file mode 100644 index 00000000000..9c583b77c26 --- /dev/null +++ b/queue-2.6.32/drm-i915-fix-hibernation-since-i915-self-reclaim-fixes.patch @@ -0,0 +1,43 @@ +From 985b823b919273fe1327d56d2196b4f92e5d0fae Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Fri, 2 Jul 2010 10:04:42 +1000 +Subject: drm/i915: fix hibernation since i915 self-reclaim fixes + +From: Linus Torvalds + +commit 985b823b919273fe1327d56d2196b4f92e5d0fae upstream. + +Since commit 4bdadb9785696439c6e2b3efe34aa76df1149c83 ("drm/i915: +Selectively enable self-reclaim"), we've been passing GFP_MOVABLE to the +i915 page allocator where we weren't before due to some over-eager +removal of the page mapping gfp_flags games the code used to play. + +This caused hibernate on Intel hardware to result in a lot of memory +corruptions on resume. See for example + + http://bugzilla.kernel.org/show_bug.cgi?id=13811 + +Reported-by: Evengi Golov (in bugzilla) +Signed-off-by: Dave Airlie +Tested-by: M. Vefa Bicakci +Cc: Chris Wilson +Cc: KOSAKI Motohiro +Cc: Hugh Dickins +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_gem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -2262,7 +2262,7 @@ i915_gem_object_get_pages(struct drm_gem + mapping = inode->i_mapping; + for (i = 0; i < page_count; i++) { + page = read_cache_page_gfp(mapping, i, +- mapping_gfp_mask (mapping) | ++ GFP_HIGHUSER | + __GFP_COLD | + gfpmask); + if (IS_ERR(page)) diff --git a/queue-2.6.32/series b/queue-2.6.32/series index 85930e45435..c4adff55ff2 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -24,3 +24,10 @@ dm-ioctl-release-_hash_lock-between-devices-in-remove_all.patch mm-make-the-vma-list-be-doubly-linked.patch mm-make-the-mlock-stack-guard-page-checks-stricter.patch mm-make-stack-guard-page-logic-use-vm_prev-pointer.patch +drm-i915-fix-hibernation-since-i915-self-reclaim-fixes.patch +drm-i915-add-reclaimable-to-i915-self-reclaimable-page-allocations.patch +slab-fix-object-alignment.patch +sunxvr500-ignore-secondary-output-pci-devices.patch +sparc64-add-missing-id-to-parport-probing-code.patch +sparc64-fix-rwsem-constant-bug-leading-to-hangs.patch +sparc64-fix-atomic64_t-routine-return-values.patch diff --git a/queue-2.6.32/slab-fix-object-alignment.patch b/queue-2.6.32/slab-fix-object-alignment.patch new file mode 100644 index 00000000000..901767471fb --- /dev/null +++ b/queue-2.6.32/slab-fix-object-alignment.patch @@ -0,0 +1,50 @@ +From 1ab335d8f85792e3b107ff8237d53cf64db714df Mon Sep 17 00:00:00 2001 +From: Carsten Otte +Date: Fri, 6 Aug 2010 18:19:22 +0200 +Subject: slab: fix object alignment + +From: Carsten Otte + +commit 1ab335d8f85792e3b107ff8237d53cf64db714df upstream. + +This patch fixes alignment of slab objects in case CONFIG_DEBUG_PAGEALLOC is +active. +Before this spot in kmem_cache_create, we have this situation: +- align contains the required alignment of the object +- cachep->obj_offset is 0 or equals align in case of CONFIG_DEBUG_SLAB +- size equals the size of the object, or object plus trailing redzone in case + of CONFIG_DEBUG_SLAB + +This spot tries to fill one page per object if the object is in certain size +limits, however setting obj_offset to PAGE_SIZE - size does break the object +alignment since size may not be aligned with the required alignment. +This patch simply adds an ALIGN(size, align) to the equation and fixes the +object size detection accordingly. + +This code in drivers/s390/cio/qdio_setup_init has lead to incorrectly aligned +slab objects (sizeof(struct qdio_q) equals 1792): + qdio_q_cache = kmem_cache_create("qdio_q", sizeof(struct qdio_q), + 256, 0, NULL); + +Acked-by: Christoph Lameter +Signed-off-by: Carsten Otte +Signed-off-by: Pekka Enberg +Signed-off-by: Greg Kroah-Hartman + +--- + mm/slab.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/mm/slab.c ++++ b/mm/slab.c +@@ -2249,8 +2249,8 @@ kmem_cache_create (const char *name, siz + } + #if FORCED_DEBUG && defined(CONFIG_DEBUG_PAGEALLOC) + if (size >= malloc_sizes[INDEX_L3 + 1].cs_size +- && cachep->obj_size > cache_line_size() && size < PAGE_SIZE) { +- cachep->obj_offset += PAGE_SIZE - size; ++ && cachep->obj_size > cache_line_size() && ALIGN(size, align) < PAGE_SIZE) { ++ cachep->obj_offset += PAGE_SIZE - ALIGN(size, align); + size = PAGE_SIZE; + } + #endif diff --git a/queue-2.6.32/sparc64-add-missing-id-to-parport-probing-code.patch b/queue-2.6.32/sparc64-add-missing-id-to-parport-probing-code.patch new file mode 100644 index 00000000000..6cbd8d7c69e --- /dev/null +++ b/queue-2.6.32/sparc64-add-missing-id-to-parport-probing-code.patch @@ -0,0 +1,32 @@ +From f305fbd22d54a0d9c906697c4c38945d37d6bc24 Mon Sep 17 00:00:00 2001 +From: David S. Miller +Date: Wed, 4 Aug 2010 17:30:21 -0700 +Subject: sparc64: Add missing ID to parport probing code. + +From: David S. Miller + +[ Upstream commit bf8253bf5e7cfe17dd53e3f6340a45b11d9fb51c ] + +SunBlade-2500 has 'parallel' device node with compatible +property "pnpALI,1533,3" so add that to the ID table. + +Reported-by: Mikael Pettersson +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + arch/sparc/include/asm/parport.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/sparc/include/asm/parport.h ++++ b/arch/sparc/include/asm/parport.h +@@ -228,6 +228,10 @@ static const struct of_device_id ecpp_ma + .name = "parallel", + .compatible = "ns87317-ecpp", + }, ++ { ++ .name = "parallel", ++ .compatible = "pnpALI,1533,3", ++ }, + {}, + }; + diff --git a/queue-2.6.32/sparc64-fix-atomic64_t-routine-return-values.patch b/queue-2.6.32/sparc64-fix-atomic64_t-routine-return-values.patch new file mode 100644 index 00000000000..0bbcb7228e0 --- /dev/null +++ b/queue-2.6.32/sparc64-fix-atomic64_t-routine-return-values.patch @@ -0,0 +1,50 @@ +From e68176c823a9ed4993f7fe34cd26717bc01b35ad Mon Sep 17 00:00:00 2001 +From: David S. Miller +Date: Wed, 18 Aug 2010 14:47:23 -0700 +Subject: sparc64: Fix atomic64_t routine return values. + +From: David S. Miller + +[ Upstream commits 86fa04b8742ac681d470786f55e2403ada0075b2 + and b10f997bb0f4e5b34d447f498fb85834a40d3acb ] + +Should return 'long' instead of 'int'. + +Thanks to Dimitris Michailidis and Tony Luck. + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + arch/sparc/include/asm/atomic_64.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/arch/sparc/include/asm/atomic_64.h ++++ b/arch/sparc/include/asm/atomic_64.h +@@ -20,14 +20,14 @@ + #define atomic64_set(v, i) (((v)->counter) = i) + + extern void atomic_add(int, atomic_t *); +-extern void atomic64_add(int, atomic64_t *); ++extern void atomic64_add(long, atomic64_t *); + extern void atomic_sub(int, atomic_t *); +-extern void atomic64_sub(int, atomic64_t *); ++extern void atomic64_sub(long, atomic64_t *); + + extern int atomic_add_ret(int, atomic_t *); +-extern int atomic64_add_ret(int, atomic64_t *); ++extern long atomic64_add_ret(long, atomic64_t *); + extern int atomic_sub_ret(int, atomic_t *); +-extern int atomic64_sub_ret(int, atomic64_t *); ++extern long atomic64_sub_ret(long, atomic64_t *); + + #define atomic_dec_return(v) atomic_sub_ret(1, v) + #define atomic64_dec_return(v) atomic64_sub_ret(1, v) +@@ -91,7 +91,7 @@ static inline int atomic_add_unless(atom + ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) + #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) + +-static inline int atomic64_add_unless(atomic64_t *v, long a, long u) ++static inline long atomic64_add_unless(atomic64_t *v, long a, long u) + { + long c, old; + c = atomic64_read(v); diff --git a/queue-2.6.32/sparc64-fix-rwsem-constant-bug-leading-to-hangs.patch b/queue-2.6.32/sparc64-fix-rwsem-constant-bug-leading-to-hangs.patch new file mode 100644 index 00000000000..e1aac519c14 --- /dev/null +++ b/queue-2.6.32/sparc64-fix-rwsem-constant-bug-leading-to-hangs.patch @@ -0,0 +1,36 @@ +From 4ab3a5d96ab725c8eed154f61850104ba1be263f Mon Sep 17 00:00:00 2001 +From: David S. Miller +Date: Tue, 17 Aug 2010 17:09:53 -0700 +Subject: sparc64: Fix rwsem constant bug leading to hangs. + +From: David S. Miller + +[ Upstream commit ef201bebe5afc91a2b99b45dacc8c6dd88ca9e58 ] + +As noticed by Linus, it is critical that some of the +rwsem constants be signed. Yet, hex constants are +unsigned unless explicitly casted or negated. + +The most critical one is RWSEM_WAITING_BIAS. + +This bug was exacerbated by commit +424acaaeb3a3932d64a9b4bd59df6cf72c22d8f3 ("rwsem: wake queued readers +when writer blocks on active read lock") + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + arch/sparc/include/asm/rwsem-const.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/sparc/include/asm/rwsem-const.h ++++ b/arch/sparc/include/asm/rwsem-const.h +@@ -5,7 +5,7 @@ + #define RWSEM_UNLOCKED_VALUE 0x00000000 + #define RWSEM_ACTIVE_BIAS 0x00000001 + #define RWSEM_ACTIVE_MASK 0x0000ffff +-#define RWSEM_WAITING_BIAS 0xffff0000 ++#define RWSEM_WAITING_BIAS (-0x00010000) + #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS + #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) + diff --git a/queue-2.6.32/sunxvr500-ignore-secondary-output-pci-devices.patch b/queue-2.6.32/sunxvr500-ignore-secondary-output-pci-devices.patch new file mode 100644 index 00000000000..82f458b82c0 --- /dev/null +++ b/queue-2.6.32/sunxvr500-ignore-secondary-output-pci-devices.patch @@ -0,0 +1,67 @@ +From ff67b6b75751461970363f1266a5db8088ed4977 Mon Sep 17 00:00:00 2001 +From: David S. Miller +Date: Sun, 4 Apr 2010 01:12:50 -0700 +Subject: sunxvr500: Ignore secondary output PCI devices. + +From: David S. Miller + +[ Upstream commit bdd32ce95f79fb5cc964cd789d7ae4500bba7c6f ] + +These just represent the secondary and further heads attached to the +card, and they have different sets of PCI bar registers to map. + +So don't try to drive them in the main driver. + +Reported-by: Frans van Berckel +Tested-by: Frans van Berckel +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/video/sunxvr500.c | 24 +++++++++++++++++------- + 1 file changed, 17 insertions(+), 7 deletions(-) + +--- a/drivers/video/sunxvr500.c ++++ b/drivers/video/sunxvr500.c +@@ -242,11 +242,27 @@ static int __devinit e3d_set_fbinfo(stru + static int __devinit e3d_pci_register(struct pci_dev *pdev, + const struct pci_device_id *ent) + { ++ struct device_node *of_node; ++ const char *device_type; + struct fb_info *info; + struct e3d_info *ep; + unsigned int line_length; + int err; + ++ of_node = pci_device_to_OF_node(pdev); ++ if (!of_node) { ++ printk(KERN_ERR "e3d: Cannot find OF node of %s\n", ++ pci_name(pdev)); ++ return -ENODEV; ++ } ++ ++ device_type = of_get_property(of_node, "device_type", NULL); ++ if (!device_type) { ++ printk(KERN_INFO "e3d: Ignoring secondary output device " ++ "at %s\n", pci_name(pdev)); ++ return -ENODEV; ++ } ++ + err = pci_enable_device(pdev); + if (err < 0) { + printk(KERN_ERR "e3d: Cannot enable PCI device %s\n", +@@ -265,13 +281,7 @@ static int __devinit e3d_pci_register(st + ep->info = info; + ep->pdev = pdev; + spin_lock_init(&ep->lock); +- ep->of_node = pci_device_to_OF_node(pdev); +- if (!ep->of_node) { +- printk(KERN_ERR "e3d: Cannot find OF node of %s\n", +- pci_name(pdev)); +- err = -ENODEV; +- goto err_release_fb; +- } ++ ep->of_node = of_node; + + /* Read the PCI base register of the frame buffer, which we + * need in order to interpret the RAMDAC_VID_*FB* values in