From: Greg Kroah-Hartman Date: Mon, 23 Aug 2010 22:45:57 +0000 (-0700) Subject: .35 patches X-Git-Tag: v2.6.32.21~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9c45d74a2cbf865c39f59aa81abe248d4f42177;p=thirdparty%2Fkernel%2Fstable-queue.git .35 patches --- diff --git a/queue-2.6.35/drm-agp-i915-trim-stolen-space-to-32m.patch b/queue-2.6.35/drm-agp-i915-trim-stolen-space-to-32m.patch new file mode 100644 index 00000000000..0591bbc1784 --- /dev/null +++ b/queue-2.6.35/drm-agp-i915-trim-stolen-space-to-32m.patch @@ -0,0 +1,80 @@ +From d1d6ca73ef548748e141747e7260798327d6a2c1 Mon Sep 17 00:00:00 2001 +From: Jesse Barnes +Date: Thu, 8 Jul 2010 09:22:46 -0700 +Subject: drm/agp/i915: trim stolen space to 32M + +From: Jesse Barnes + +commit d1d6ca73ef548748e141747e7260798327d6a2c1 upstream. + +Some BIOSes will claim a large chunk of stolen space. Unless we +reclaim it, our aperture for remapping buffer objects will be +constrained. So clamp the stolen space to 32M and ignore the rest. + +Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15469 among others. + +Adding the ignored stolen memory back into the general pool using the +memory hotplug code is left as an exercise for the reader. + +Signed-off-by: Jesse Barnes +Reviewed-by: Simon Farnsworth +Tested-by: Artem S. Tashkinov +Signed-off-by: Eric Anholt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/agp/intel-gtt.c | 11 ++++++++++- + drivers/gpu/drm/i915/i915_dma.c | 8 ++++++++ + 2 files changed, 18 insertions(+), 1 deletion(-) + +--- a/drivers/char/agp/intel-gtt.c ++++ b/drivers/char/agp/intel-gtt.c +@@ -25,6 +25,10 @@ + #define USE_PCI_DMA_API 1 + #endif + ++/* Max amount of stolen space, anything above will be returned to Linux */ ++int intel_max_stolen = 32 * 1024 * 1024; ++EXPORT_SYMBOL(intel_max_stolen); ++ + static const struct aper_size_info_fixed intel_i810_sizes[] = + { + {64, 16384, 4}, +@@ -710,7 +714,12 @@ static void intel_i830_init_gtt_entries( + break; + } + } +- if (gtt_entries > 0) { ++ if (!local && gtt_entries > intel_max_stolen) { ++ dev_info(&agp_bridge->dev->dev, ++ "detected %dK stolen memory, trimming to %dK\n", ++ gtt_entries / KB(1), intel_max_stolen / KB(1)); ++ gtt_entries = intel_max_stolen / KB(4); ++ } else if (gtt_entries > 0) { + dev_info(&agp_bridge->dev->dev, "detected %dK %s memory\n", + gtt_entries / KB(1), local ? "local" : "stolen"); + gtt_entries /= KB(4); +--- a/drivers/gpu/drm/i915/i915_dma.c ++++ b/drivers/gpu/drm/i915/i915_dma.c +@@ -40,6 +40,8 @@ + #include + #include + ++extern int intel_max_stolen; /* from AGP driver */ ++ + /** + * Sets up the hardware status page for devices that need a physical address + * in the register. +@@ -2104,6 +2106,12 @@ int i915_driver_load(struct drm_device * + if (ret) + goto out_iomapfree; + ++ if (prealloc_size > intel_max_stolen) { ++ DRM_INFO("detected %dM stolen memory, trimming to %dM\n", ++ prealloc_size >> 20, intel_max_stolen >> 20); ++ prealloc_size = intel_max_stolen; ++ } ++ + dev_priv->wq = create_singlethread_workqueue("i915"); + if (dev_priv->wq == NULL) { + DRM_ERROR("Failed to create our workqueue.\n"); diff --git a/queue-2.6.35/fix-init-ordering-of-dev-console-vs-callers-of-modprobe.patch b/queue-2.6.35/fix-init-ordering-of-dev-console-vs-callers-of-modprobe.patch new file mode 100644 index 00000000000..63753797fca --- /dev/null +++ b/queue-2.6.35/fix-init-ordering-of-dev-console-vs-callers-of-modprobe.patch @@ -0,0 +1,95 @@ +From 31d1d48e199e99077fb30f6fb9a793be7bec756f Mon Sep 17 00:00:00 2001 +From: David Howells +Date: Fri, 6 Aug 2010 16:34:43 +0100 +Subject: Fix init ordering of /dev/console vs callers of modprobe + +From: David Howells + +commit 31d1d48e199e99077fb30f6fb9a793be7bec756f upstream. + +Make /dev/console get initialised before any initialisation routine that +invokes modprobe because if modprobe fails, it's going to want to open +/dev/console, presumably to write an error message to. + +The problem with that is that if the /dev/console driver is not yet +initialised, the chardev handler will call request_module() to invoke +modprobe, which will fail, because we never compile /dev/console as a +module. + +This will lead to a modprobe loop, showing the following in the kernel +log: + + request_module: runaway loop modprobe char-major-5-1 + request_module: runaway loop modprobe char-major-5-1 + request_module: runaway loop modprobe char-major-5-1 + request_module: runaway loop modprobe char-major-5-1 + request_module: runaway loop modprobe char-major-5-1 + +This can happen, for example, when the built in md5 module can't find +the built in cryptomgr module (because the latter fails to initialise). +The md5 module comes before the call to tty_init(), presumably because +'crypto' comes before 'drivers' alphabetically. + +Fix this by calling tty_init() from chrdev_init(). + +Signed-off-by: David Howells +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/mem.c | 2 +- + drivers/char/tty_io.c | 4 ++-- + fs/char_dev.c | 1 + + include/linux/tty.h | 3 +++ + 4 files changed, 7 insertions(+), 3 deletions(-) + +--- a/drivers/char/mem.c ++++ b/drivers/char/mem.c +@@ -916,7 +916,7 @@ static int __init chr_dev_init(void) + NULL, devlist[minor].name); + } + +- return 0; ++ return tty_init(); + } + + fs_initcall(chr_dev_init); +--- a/drivers/char/tty_io.c ++++ b/drivers/char/tty_io.c +@@ -3128,7 +3128,7 @@ static struct cdev tty_cdev, console_cde + * Ok, now we can initialize the rest of the tty devices and can count + * on memory allocations, interrupts etc.. + */ +-static int __init tty_init(void) ++int __init tty_init(void) + { + cdev_init(&tty_cdev, &tty_fops); + if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || +@@ -3149,4 +3149,4 @@ static int __init tty_init(void) + #endif + return 0; + } +-module_init(tty_init); ++ +--- a/fs/char_dev.c ++++ b/fs/char_dev.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include "internal.h" + +--- a/include/linux/tty.h ++++ b/include/linux/tty.h +@@ -552,6 +552,9 @@ static inline void tty_audit_push_task(s + } + #endif + ++/* tty_io.c */ ++extern int __init tty_init(void); ++ + /* tty_ioctl.c */ + extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, + unsigned int cmd, unsigned long arg); diff --git a/queue-2.6.35/gen_nand-test-if-nr_chips-field-is-valid.patch b/queue-2.6.35/gen_nand-test-if-nr_chips-field-is-valid.patch new file mode 100644 index 00000000000..8764360c100 --- /dev/null +++ b/queue-2.6.35/gen_nand-test-if-nr_chips-field-is-valid.patch @@ -0,0 +1,31 @@ +From 01cd2ababddd55a127caa1cd20d570637e0d42e1 Mon Sep 17 00:00:00 2001 +From: Marek Vasut +Date: Thu, 12 Aug 2010 03:53:55 +0100 +Subject: gen_nand: Test if nr_chips field is valid + +From: Marek Vasut + +commit 01cd2ababddd55a127caa1cd20d570637e0d42e1 upstream. + +Signed-off-by: Marek Vasut +Signed-off-by: David Woodhouse +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mtd/nand/plat_nand.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/mtd/nand/plat_nand.c ++++ b/drivers/mtd/nand/plat_nand.c +@@ -37,6 +37,11 @@ static int __devinit plat_nand_probe(str + struct resource *res; + int err = 0; + ++ if (pdata->chip.nr_chips < 1) { ++ dev_err(&pdev->dev, "invalid number of chips specified\n"); ++ return -EINVAL; ++ } ++ + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -ENXIO; diff --git a/queue-2.6.35/isdn-gigaset-add-missing-unlock.patch b/queue-2.6.35/isdn-gigaset-add-missing-unlock.patch new file mode 100644 index 00000000000..fa578b8232d --- /dev/null +++ b/queue-2.6.35/isdn-gigaset-add-missing-unlock.patch @@ -0,0 +1,31 @@ +From 7e27a0aeb98d53539bdc38384eee899d6db62617 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 5 Aug 2010 22:23:23 +0000 +Subject: isdn: gigaset: add missing unlock + +From: Dan Carpenter + +commit 7e27a0aeb98d53539bdc38384eee899d6db62617 upstream. + +We should unlock here. This is the only place where we return from the +function with the lock held. The caller isn't expecting it. + +Signed-off-by: Dan Carpenter +Signed-off-by: David S. Miller +Signed-off-by: Tilman Schmidt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/isdn/gigaset/capi.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/isdn/gigaset/capi.c ++++ b/drivers/isdn/gigaset/capi.c +@@ -1044,6 +1044,7 @@ static inline void remove_appl_from_chan + do { + if (bcap->bcnext == ap) { + bcap->bcnext = bcap->bcnext->bcnext; ++ spin_unlock_irqrestore(&bcs->aplock, flags); + return; + } + bcap = bcap->bcnext; diff --git a/queue-2.6.35/isdn-gigaset-reduce-syslog-spam.patch b/queue-2.6.35/isdn-gigaset-reduce-syslog-spam.patch new file mode 100644 index 00000000000..f815d4cb66e --- /dev/null +++ b/queue-2.6.35/isdn-gigaset-reduce-syslog-spam.patch @@ -0,0 +1,90 @@ +From 7d060ed2877ff6d00e7238226edbaf91493d6d0b Mon Sep 17 00:00:00 2001 +From: Tilman Schmidt +Date: Mon, 5 Jul 2010 14:19:14 +0000 +Subject: isdn/gigaset: reduce syslog spam + +From: Tilman Schmidt + +commit 7d060ed2877ff6d00e7238226edbaf91493d6d0b upstream. + +Downgrade some error messages which occur frequently during +normal operation to debug messages. + +Impact: logging +Signed-off-by: Tilman Schmidt +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/isdn/gigaset/capi.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/drivers/isdn/gigaset/capi.c ++++ b/drivers/isdn/gigaset/capi.c +@@ -378,13 +378,13 @@ void gigaset_skb_sent(struct bc_state *b + ++bcs->trans_up; + + if (!ap) { +- dev_err(cs->dev, "%s: no application\n", __func__); ++ gig_dbg(DEBUG_MCMD, "%s: application gone", __func__); + return; + } + + /* don't send further B3 messages if disconnected */ + if (bcs->apconnstate < APCONN_ACTIVE) { +- gig_dbg(DEBUG_LLDATA, "disconnected, discarding ack"); ++ gig_dbg(DEBUG_MCMD, "%s: disconnected", __func__); + return; + } + +@@ -422,13 +422,14 @@ void gigaset_skb_rcvd(struct bc_state *b + bcs->trans_down++; + + if (!ap) { +- dev_err(cs->dev, "%s: no application\n", __func__); ++ gig_dbg(DEBUG_MCMD, "%s: application gone", __func__); ++ dev_kfree_skb_any(skb); + return; + } + + /* don't send further B3 messages if disconnected */ + if (bcs->apconnstate < APCONN_ACTIVE) { +- gig_dbg(DEBUG_LLDATA, "disconnected, discarding data"); ++ gig_dbg(DEBUG_MCMD, "%s: disconnected", __func__); + dev_kfree_skb_any(skb); + return; + } +@@ -747,7 +748,7 @@ void gigaset_isdn_connD(struct bc_state + ap = bcs->ap; + if (!ap) { + spin_unlock_irqrestore(&bcs->aplock, flags); +- dev_err(cs->dev, "%s: no application\n", __func__); ++ gig_dbg(DEBUG_CMD, "%s: application gone", __func__); + return; + } + if (bcs->apconnstate == APCONN_NONE) { +@@ -843,7 +844,7 @@ void gigaset_isdn_connB(struct bc_state + ap = bcs->ap; + if (!ap) { + spin_unlock_irqrestore(&bcs->aplock, flags); +- dev_err(cs->dev, "%s: no application\n", __func__); ++ gig_dbg(DEBUG_CMD, "%s: application gone", __func__); + return; + } + if (!bcs->apconnstate) { +@@ -901,13 +902,12 @@ void gigaset_isdn_connB(struct bc_state + */ + void gigaset_isdn_hupB(struct bc_state *bcs) + { +- struct cardstate *cs = bcs->cs; + struct gigaset_capi_appl *ap = bcs->ap; + + /* ToDo: assure order of DISCONNECT_B3_IND and DISCONNECT_IND ? */ + + if (!ap) { +- dev_err(cs->dev, "%s: no application\n", __func__); ++ gig_dbg(DEBUG_CMD, "%s: application gone", __func__); + return; + } + diff --git a/queue-2.6.35/oprofile-add-support-for-intel-processor-model-30.patch b/queue-2.6.35/oprofile-add-support-for-intel-processor-model-30.patch new file mode 100644 index 00000000000..8ab4033ef68 --- /dev/null +++ b/queue-2.6.35/oprofile-add-support-for-intel-processor-model-30.patch @@ -0,0 +1,65 @@ +From a7c55cbee0c1bae9bf5a15a08300e91d88706e45 Mon Sep 17 00:00:00 2001 +From: Josh Hunt +Date: Wed, 4 Aug 2010 20:27:05 -0400 +Subject: oprofile: add support for Intel processor model 30 + +From: Josh Hunt + +commit a7c55cbee0c1bae9bf5a15a08300e91d88706e45 upstream. + +Newer Intel processors identifying themselves as model 30 are not recognized by +oprofile. + + +model : 30 +model name : Intel(R) Xeon(R) CPU X3470 @ 2.93GHz + + +Running oprofile on these machines gives the following: ++ opcontrol --init ++ opcontrol --list-events +oprofile: available events for CPU type "Intel Architectural Perfmon" + +See Intel 64 and IA-32 Architectures Software Developer's Manual +Volume 3B (Document 253669) Chapter 18 for architectural perfmon events +This is a limited set of fallback events because oprofile doesn't know your CPU +CPU_CLK_UNHALTED: (counter: all) + Clock cycles when not halted (min count: 6000) +INST_RETIRED: (counter: all) + number of instructions retired (min count: 6000) +LLC_MISSES: (counter: all) + Last level cache demand requests from this core that missed the LLC +(min count: 6000) + Unit masks (default 0x41) + ---------- + 0x41: No unit mask +LLC_REFS: (counter: all) + Last level cache demand requests from this core (min count: 6000) + Unit masks (default 0x4f) + ---------- + 0x4f: No unit mask +BR_MISS_PRED_RETIRED: (counter: all) + number of mispredicted branches retired (precise) (min count: 500) ++ opcontrol --shutdown + +Tested using oprofile 0.9.6. + +Signed-off-by: Josh Hunt +Reviewed-by: Andi Kleen +Signed-off-by: Robert Richter +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/oprofile/nmi_int.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/x86/oprofile/nmi_int.c ++++ b/arch/x86/oprofile/nmi_int.c +@@ -668,6 +668,7 @@ static int __init ppro_init(char **cpu_t + *cpu_type = "i386/core_2"; + break; + case 0x1a: ++ case 0x1e: + case 0x2e: + spec = &op_arch_perfmon_spec; + *cpu_type = "i386/core_i7"; diff --git a/queue-2.6.35/oprofile-change-cpuids-from-decimal-to-hex-and-add-some-comments.patch b/queue-2.6.35/oprofile-change-cpuids-from-decimal-to-hex-and-add-some-comments.patch new file mode 100644 index 00000000000..d9220d1bcf2 --- /dev/null +++ b/queue-2.6.35/oprofile-change-cpuids-from-decimal-to-hex-and-add-some-comments.patch @@ -0,0 +1,61 @@ +From 45c34e05c4e3d36e7c44e790241ea11a1d90d54e Mon Sep 17 00:00:00 2001 +From: John Villalovos +Date: Fri, 7 May 2010 12:41:40 -0400 +Subject: Oprofile: Change CPUIDS from decimal to hex, and add some comments + +From: John Villalovos + +commit 45c34e05c4e3d36e7c44e790241ea11a1d90d54e upstream. + +Back when the patch was submitted for "Add Xeon 7500 series support to +oprofile", Robert Richter had asked for a followon patch that +converted all the CPU ID values to hex. + +I have done that here for the "i386/core_i7" and "i386/atom" class +processors in the ppro_init() function and also added some comments on +where to find documentation on the Intel processors. + +Signed-off-by: John L. Villalovos +Signed-off-by: Robert Richter +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/oprofile/nmi_int.c | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +--- a/arch/x86/oprofile/nmi_int.c ++++ b/arch/x86/oprofile/nmi_int.c +@@ -634,6 +634,18 @@ static int __init ppro_init(char **cpu_t + if (force_arch_perfmon && cpu_has_arch_perfmon) + return 0; + ++ /* ++ * Documentation on identifying Intel processors by CPU family ++ * and model can be found in the Intel Software Developer's ++ * Manuals (SDM): ++ * ++ * http://www.intel.com/products/processor/manuals/ ++ * ++ * As of May 2010 the documentation for this was in the: ++ * "Intel 64 and IA-32 Architectures Software Developer's ++ * Manual Volume 3B: System Programming Guide", "Table B-1 ++ * CPUID Signature Values of DisplayFamily_DisplayModel". ++ */ + switch (cpu_model) { + case 0 ... 2: + *cpu_type = "i386/ppro"; +@@ -655,12 +667,12 @@ static int __init ppro_init(char **cpu_t + case 15: case 23: + *cpu_type = "i386/core_2"; + break; ++ case 0x1a: + case 0x2e: +- case 26: + spec = &op_arch_perfmon_spec; + *cpu_type = "i386/core_i7"; + break; +- case 28: ++ case 0x1c: + *cpu_type = "i386/atom"; + break; + default: diff --git a/queue-2.6.35/series b/queue-2.6.35/series index 690b39e9f0a..2e00867d3d0 100644 --- a/queue-2.6.35/series +++ b/queue-2.6.35/series @@ -70,3 +70,10 @@ pkt_sched-fix-sch_sfq-vs-tcf_bind_filter-oops.patch pkt_sched-fix-sch_sfq-vs-tc_modify_qdisc-oops.patch net-disable-preemption-before-call-smp_processor_id.patch act_nat-fix-wild-pointer.patch +fix-init-ordering-of-dev-console-vs-callers-of-modprobe.patch +gen_nand-test-if-nr_chips-field-is-valid.patch +isdn-gigaset-reduce-syslog-spam.patch +isdn-gigaset-add-missing-unlock.patch +oprofile-change-cpuids-from-decimal-to-hex-and-add-some-comments.patch +oprofile-add-support-for-intel-processor-model-30.patch +drm-agp-i915-trim-stolen-space-to-32m.patch