From 3e72c5ef91e78b5d62d98f5c22f797472a35af67 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 19 Jan 2010 15:59:59 -0800 Subject: [PATCH] started .32 queue --- ...-capture-mixer-for-alc861-660-codecs.patch | 33 ++++ ...-laptop-add-lenovo-sl-hotkey-support.patch | 73 ++++++++ ...ect-reporting-of-partition-alignment.patch | 49 +++++ ...e-loop-in-ironlake-interrupt-handler.patch | 88 +++++++++ ...dac-critical-fix-panic-out-of-bounds.patch | 46 +++++ ...move-rw-parameter-from-get_futex_key.patch | 172 ++++++++++++++++++ ...new-model-of-apple-wireless-keyboard.patch | 62 +++++++ ...-device-name-after-device_unregister.patch | 49 +++++ .../i2c-pca-don-t-use-_interruptible.patch | 64 +++++++ ...otify-do-not-reuse-watch-descriptors.patch | 84 +++++++++ ...-only-warn-once-for-inotify-problems.patch | 33 ++++ ...se-move-sentelic-probe-down-the-list.patch | 69 +++++++ ..._mode_io-world-writeable-permissions.patch | 35 ++++ .../memcg-ensure-list-is-empty-at-rmdir.patch | 128 +++++++++++++ ...rrect-wm835x-isink-ramp-time-defines.patch | 58 ++++++ ...pio-direction-register-is-not-locked.patch | 31 ++++ ...te-nr_free_pages-only-when-necessary.patch | 40 ++++ ...bus-add-a-fixup-hook-and-fix-powerpc.patch | 108 +++++++++++ ...-truncate-blocks-not-used-by-a-write.patch | 78 ++++++++ ...-setting-for-samsung-soc-framebuffer.patch | 83 +++++++++ ...-on-config_have_unstable_sched_clock.patch | 102 +++++++++++ .../sched-fix-task-priority-bug.patch | 57 ++++++ ...a-new-fujitsu-wacom-tablet-pc-device.patch | 33 ++++ queue-2.6.32/series | 30 +++ ...c64-fix-niagara2-perf-event-handling.patch | 40 ++++ ...gramming-when-perf-events-are-active.patch | 38 ++++ ...8-gspca-sn9c20x-fix-test-of-unsigned.patch | 29 +++ .../vfs-fix-vmtruncate-regression.patch | 66 +++++++ ...ysical-mode-for-ibm-summit-platforms.patch | 45 +++++ ...toring-depends-on-apic-being-enabled.patch | 47 +++++ ...sgi-uv-fix-mapping-of-mmio-registers.patch | 74 ++++++++ 31 files changed, 1944 insertions(+) create mode 100644 queue-2.6.32/alsa-hda-fix-missing-capture-mixer-for-alc861-660-codecs.patch create mode 100644 queue-2.6.32/asus-laptop-add-lenovo-sl-hotkey-support.patch create mode 100644 queue-2.6.32/block-fix-incorrect-reporting-of-partition-alignment.patch create mode 100644 queue-2.6.32/drm-i915-remove-loop-in-ironlake-interrupt-handler.patch create mode 100644 queue-2.6.32/edac-i5000_edac-critical-fix-panic-out-of-bounds.patch create mode 100644 queue-2.6.32/futexes-remove-rw-parameter-from-get_futex_key.patch create mode 100644 queue-2.6.32/hid-add-device-ids-for-new-model-of-apple-wireless-keyboard.patch create mode 100644 queue-2.6.32/i2c-do-not-use-device-name-after-device_unregister.patch create mode 100644 queue-2.6.32/i2c-pca-don-t-use-_interruptible.patch create mode 100644 queue-2.6.32/inotify-do-not-reuse-watch-descriptors.patch create mode 100644 queue-2.6.32/inotify-only-warn-once-for-inotify-problems.patch create mode 100644 queue-2.6.32/input-pmouse-move-sentelic-probe-down-the-list.patch create mode 100644 queue-2.6.32/megaraid_sas-remove-sysfs-poll_mode_io-world-writeable-permissions.patch create mode 100644 queue-2.6.32/memcg-ensure-list-is-empty-at-rmdir.patch create mode 100644 queue-2.6.32/mfd-correct-wm835x-isink-ramp-time-defines.patch create mode 100644 queue-2.6.32/mfd-wm835x-gpio-direction-register-is-not-locked.patch create mode 100644 queue-2.6.32/page-allocator-update-nr_free_pages-only-when-necessary.patch create mode 100644 queue-2.6.32/pci-cardbus-add-a-fixup-hook-and-fix-powerpc.patch create mode 100644 queue-2.6.32/reiserfs-truncate-blocks-not-used-by-a-write.patch create mode 100644 queue-2.6.32/revert-drivers-video-s3c-fb.c-fix-clock-setting-for-samsung-soc-framebuffer.patch create mode 100644 queue-2.6.32/sched-fix-cpu_clock-in-nmis-on-config_have_unstable_sched_clock.patch create mode 100644 queue-2.6.32/sched-fix-task-priority-bug.patch create mode 100644 queue-2.6.32/serial-8250_pnp-add-a-new-fujitsu-wacom-tablet-pc-device.patch create mode 100644 queue-2.6.32/series create mode 100644 queue-2.6.32/sparc64-fix-niagara2-perf-event-handling.patch create mode 100644 queue-2.6.32/sparc64-fix-nmi-programming-when-perf-events-are-active.patch create mode 100644 queue-2.6.32/v4l-dvb-13868-gspca-sn9c20x-fix-test-of-unsigned.patch create mode 100644 queue-2.6.32/vfs-fix-vmtruncate-regression.patch create mode 100644 queue-2.6.32/x86-apic-use-physical-mode-for-ibm-summit-platforms.patch create mode 100644 queue-2.6.32/x86-mce-thermal-monitoring-depends-on-apic-being-enabled.patch create mode 100644 queue-2.6.32/x86-sgi-uv-fix-mapping-of-mmio-registers.patch diff --git a/queue-2.6.32/alsa-hda-fix-missing-capture-mixer-for-alc861-660-codecs.patch b/queue-2.6.32/alsa-hda-fix-missing-capture-mixer-for-alc861-660-codecs.patch new file mode 100644 index 00000000000..07bb0fc4372 --- /dev/null +++ b/queue-2.6.32/alsa-hda-fix-missing-capture-mixer-for-alc861-660-codecs.patch @@ -0,0 +1,33 @@ +From c7a8eb103248a110cdbe0530d8c5ce987f099eee Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 14 Jan 2010 12:39:02 +0100 +Subject: ALSA: hda - Fix missing capture mixer for ALC861/660 codecs + +From: Takashi Iwai + +commit c7a8eb103248a110cdbe0530d8c5ce987f099eee upstream. + +The capture-related mixer elements are missing with ALC861/ALC660 codecs +when quirks are present, due to missing call of set_capture_mixer(). + +Reference: Novell bnc#567340 + http://bugzilla.novell.com/show_bug.cgi?id=567340 + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -14685,6 +14685,8 @@ static int patch_alc861(struct hda_codec + spec->stream_digital_playback = &alc861_pcm_digital_playback; + spec->stream_digital_capture = &alc861_pcm_digital_capture; + ++ if (!spec->cap_mixer) ++ set_capture_mixer(codec); + set_beep_amp(spec, 0x23, 0, HDA_OUTPUT); + + spec->vmaster_nid = 0x03; diff --git a/queue-2.6.32/asus-laptop-add-lenovo-sl-hotkey-support.patch b/queue-2.6.32/asus-laptop-add-lenovo-sl-hotkey-support.patch new file mode 100644 index 00000000000..68746afe47c --- /dev/null +++ b/queue-2.6.32/asus-laptop-add-lenovo-sl-hotkey-support.patch @@ -0,0 +1,73 @@ +From 14f8af311e7d3e4198cbaade84a34f86505dcb37 Mon Sep 17 00:00:00 2001 +From: Ike Panhc +Date: Thu, 3 Dec 2009 07:45:11 +0000 +Subject: asus-laptop: add Lenovo SL hotkey support + +From: Ike Panhc + +commit 14f8af311e7d3e4198cbaade84a34f86505dcb37 upstream. + +Lenovo SL series laptop has a very similar DSDT with Asus laptops. We can +easily have the extra ACPI function support with little modification in +asus-laptop.c + +Here is the hotkey enablement for Lenovo SL series laptop. + +This patch will enable the following hotkey: + - Volumn Up + - Volumn Down + - Mute + - Screen Lock (Fn+F2) + - Battery Status (Fn+F3) + - WLAN switch (Fn+F5) + - Video output switch (Fn+F7) + - Touchpad switch (Fn+F8) + - Screen Magnifier (Fn+Space) + +The following function of Lenovo SL laptop is still need to be enabled: + - Hotkey: KEY_SUSPEND (Fn+F4), KEY_SLEEP (Fn+F12), Dock Eject (Fn+F9) + - Rfkill for bluetooth and wlan + - LenovoCare LED + - Hwmon for fan speed + - Fingerprint scanner + - Active Protection System + +Signed-off-by: Ike Panhc +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/asus-laptop.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/platform/x86/asus-laptop.c ++++ b/drivers/platform/x86/asus-laptop.c +@@ -221,6 +221,7 @@ static struct asus_hotk *hotk; + */ + static const struct acpi_device_id asus_device_ids[] = { + {"ATK0100", 0}, ++ {"ATK0101", 0}, + {"", 0}, + }; + MODULE_DEVICE_TABLE(acpi, asus_device_ids); +@@ -293,6 +294,11 @@ struct key_entry { + enum { KE_KEY, KE_END }; + + static struct key_entry asus_keymap[] = { ++ {KE_KEY, 0x02, KEY_SCREENLOCK}, ++ {KE_KEY, 0x05, KEY_WLAN}, ++ {KE_KEY, 0x08, BTN_TOUCH}, ++ {KE_KEY, 0x17, KEY_ZOOM}, ++ {KE_KEY, 0x1f, KEY_BATTERY}, + {KE_KEY, 0x30, KEY_VOLUMEUP}, + {KE_KEY, 0x31, KEY_VOLUMEDOWN}, + {KE_KEY, 0x32, KEY_MUTE}, +@@ -312,6 +318,8 @@ static struct key_entry asus_keymap[] = + {KE_KEY, 0x5F, KEY_WLAN}, + {KE_KEY, 0x60, KEY_SWITCHVIDEOMODE}, + {KE_KEY, 0x61, KEY_SWITCHVIDEOMODE}, ++ {KE_KEY, 0x62, KEY_SWITCHVIDEOMODE}, ++ {KE_KEY, 0x63, KEY_SWITCHVIDEOMODE}, + {KE_KEY, 0x6B, BTN_TOUCH}, /* Lock Mouse */ + {KE_KEY, 0x82, KEY_CAMERA}, + {KE_KEY, 0x8A, KEY_PROG1}, diff --git a/queue-2.6.32/block-fix-incorrect-reporting-of-partition-alignment.patch b/queue-2.6.32/block-fix-incorrect-reporting-of-partition-alignment.patch new file mode 100644 index 00000000000..83111ee559c --- /dev/null +++ b/queue-2.6.32/block-fix-incorrect-reporting-of-partition-alignment.patch @@ -0,0 +1,49 @@ +From martin.petersen@oracle.com Tue Jan 19 14:59:39 2010 +From: "Martin K. Petersen" +Date: Fri, 15 Jan 2010 01:55:07 -0500 +Subject: block: Fix incorrect reporting of partition alignment +To: Greg KH +Cc: stable@kernel.org, jens.axboe@oracle.com +Message-ID: + +From: "Martin K. Petersen" + +commit 81744ee44ab2845c16ffd7d6f762f7b4a49a4750 upstream + +queue_sector_alignment_offset returned the wrong value which caused +partitions to report an incorrect alignment_offset. Since offset +calculation is needed several places it has been split into a separate +helper function. + +Signed-off-by: Martin K. Petersen +Tested-by: Mike Snitzer +Cc: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/blkdev.h | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/include/linux/blkdev.h ++++ b/include/linux/blkdev.h +@@ -1114,11 +1114,18 @@ static inline int queue_alignment_offset + return q->limits.alignment_offset; + } + ++static inline int queue_limit_alignment_offset(struct queue_limits *lim, sector_t offset) ++{ ++ unsigned int granularity = max(lim->physical_block_size, lim->io_min); ++ ++ offset &= granularity - 1; ++ return (granularity + lim->alignment_offset - offset) & (granularity - 1); ++} ++ + static inline int queue_sector_alignment_offset(struct request_queue *q, + sector_t sector) + { +- return ((sector << 9) - q->limits.alignment_offset) +- & (q->limits.io_min - 1); ++ return queue_limit_alignment_offset(&q->limits, sector << 9); + } + + static inline int bdev_alignment_offset(struct block_device *bdev) diff --git a/queue-2.6.32/drm-i915-remove-loop-in-ironlake-interrupt-handler.patch b/queue-2.6.32/drm-i915-remove-loop-in-ironlake-interrupt-handler.patch new file mode 100644 index 00000000000..f33e2442566 --- /dev/null +++ b/queue-2.6.32/drm-i915-remove-loop-in-ironlake-interrupt-handler.patch @@ -0,0 +1,88 @@ +From c7c85101afd0cb8ce497456d12ee1cad4aad152f Mon Sep 17 00:00:00 2001 +From: Zou Nan hai +Date: Fri, 15 Jan 2010 10:29:06 +0800 +Subject: drm/i915: remove loop in Ironlake interrupt handler + +From: Zou Nan hai + +commit c7c85101afd0cb8ce497456d12ee1cad4aad152f upstream. + +On Ironlake, there is an interrupt master control bit. With the bit +disabled before clearing IIR, we do not need to handle extra interrupt +in a loop. This patch removes the loop in Ironlake interrupt handler. +It fixed irq lost issue on some Ironlake platforms. + +Signed-off-by: Zou Nan hai +Signed-off-by: Zhenyu Wang +Signed-off-by: Eric Anholt +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/gpu/drm/i915/i915_irq.c | 43 ++++++++++++++++------------------------ + 1 file changed, 18 insertions(+), 25 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_irq.c ++++ b/drivers/gpu/drm/i915/i915_irq.c +@@ -255,7 +255,6 @@ irqreturn_t igdng_irq_handler(struct drm + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + int ret = IRQ_NONE; + u32 de_iir, gt_iir, de_ier; +- u32 new_de_iir, new_gt_iir; + struct drm_i915_master_private *master_priv; + + /* disable master interrupt before clearing iir */ +@@ -266,35 +265,29 @@ irqreturn_t igdng_irq_handler(struct drm + de_iir = I915_READ(DEIIR); + gt_iir = I915_READ(GTIIR); + +- for (;;) { +- if (de_iir == 0 && gt_iir == 0) +- break; +- +- ret = IRQ_HANDLED; +- +- I915_WRITE(DEIIR, de_iir); +- new_de_iir = I915_READ(DEIIR); +- I915_WRITE(GTIIR, gt_iir); +- new_gt_iir = I915_READ(GTIIR); ++ if (de_iir == 0 && gt_iir == 0) ++ goto done; + +- if (dev->primary->master) { +- master_priv = dev->primary->master->driver_priv; +- if (master_priv->sarea_priv) +- master_priv->sarea_priv->last_dispatch = +- READ_BREADCRUMB(dev_priv); +- } ++ ret = IRQ_HANDLED; + +- if (gt_iir & GT_USER_INTERRUPT) { +- u32 seqno = i915_get_gem_seqno(dev); +- dev_priv->mm.irq_gem_seqno = seqno; +- trace_i915_gem_request_complete(dev, seqno); +- DRM_WAKEUP(&dev_priv->irq_queue); +- } ++ if (dev->primary->master) { ++ master_priv = dev->primary->master->driver_priv; ++ if (master_priv->sarea_priv) ++ master_priv->sarea_priv->last_dispatch = ++ READ_BREADCRUMB(dev_priv); ++ } + +- de_iir = new_de_iir; +- gt_iir = new_gt_iir; ++ if (gt_iir & GT_USER_INTERRUPT) { ++ u32 seqno = i915_get_gem_seqno(dev); ++ dev_priv->mm.irq_gem_seqno = seqno; ++ trace_i915_gem_request_complete(dev, seqno); ++ DRM_WAKEUP(&dev_priv->irq_queue); + } + ++ I915_WRITE(GTIIR, gt_iir); ++ I915_WRITE(DEIIR, de_iir); ++ ++done: + I915_WRITE(DEIER, de_ier); + (void)I915_READ(DEIER); + diff --git a/queue-2.6.32/edac-i5000_edac-critical-fix-panic-out-of-bounds.patch b/queue-2.6.32/edac-i5000_edac-critical-fix-panic-out-of-bounds.patch new file mode 100644 index 00000000000..dd616fb0549 --- /dev/null +++ b/queue-2.6.32/edac-i5000_edac-critical-fix-panic-out-of-bounds.patch @@ -0,0 +1,46 @@ +From 118f3e1afd5534c15f9701f33514186cfc841a27 Mon Sep 17 00:00:00 2001 +From: Tamas Vincze +Date: Fri, 15 Jan 2010 17:01:10 -0800 +Subject: edac: i5000_edac critical fix panic out of bounds + +From: Tamas Vincze + +commit 118f3e1afd5534c15f9701f33514186cfc841a27 upstream. + +EDAC MC0: INTERNAL ERROR: channel-b out of range (4 >= 4) +Kernel panic - not syncing: EDAC MC0: Uncorrected Error (XEN) Domain 0 crashed: 'noreboot' set - not rebooting. + +This happens because FERR_NF_FBD bit 28 is not updated on i5000. Due to +that, both bits 28 and 29 may be equal to one, returning channel = 3. As +this value is invalid, EDAC core generates the panic. + +Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14568 + +Signed-off-by: Tamas Vincze +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Doug Thompson +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/edac/i5000_edac.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/edac/i5000_edac.c ++++ b/drivers/edac/i5000_edac.c +@@ -577,7 +577,13 @@ static void i5000_process_nonfatal_error + debugf0("\tUncorrected bits= 0x%x\n", ue_errors); + + branch = EXTRACT_FBDCHAN_INDX(info->ferr_nf_fbd); +- channel = branch; ++ ++ /* ++ * According with i5000 datasheet, bit 28 has no significance ++ * for errors M4Err-M12Err and M17Err-M21Err, on FERR_NF_FBD ++ */ ++ channel = branch & 2; ++ + bank = NREC_BANK(info->nrecmema); + rank = NREC_RANK(info->nrecmema); + rdwr = NREC_RDWR(info->nrecmema); diff --git a/queue-2.6.32/futexes-remove-rw-parameter-from-get_futex_key.patch b/queue-2.6.32/futexes-remove-rw-parameter-from-get_futex_key.patch new file mode 100644 index 00000000000..6afe12f64e3 --- /dev/null +++ b/queue-2.6.32/futexes-remove-rw-parameter-from-get_futex_key.patch @@ -0,0 +1,172 @@ +From 7485d0d3758e8e6491a5c9468114e74dc050785d Mon Sep 17 00:00:00 2001 +From: KOSAKI Motohiro +Date: Tue, 5 Jan 2010 16:32:43 +0900 +Subject: futexes: Remove rw parameter from get_futex_key() + +From: KOSAKI Motohiro + +commit 7485d0d3758e8e6491a5c9468114e74dc050785d upstream. + +Currently, futexes have two problem: + +A) The current futex code doesn't handle private file mappings properly. + +get_futex_key() uses PageAnon() to distinguish file and +anon, which can cause the following bad scenario: + + 1) thread-A call futex(private-mapping, FUTEX_WAIT), it + sleeps on file mapping object. + 2) thread-B writes a variable and it makes it cow. + 3) thread-B calls futex(private-mapping, FUTEX_WAKE), it + wakes up blocked thread on the anonymous page. (but it's nothing) + +B) Current futex code doesn't handle zero page properly. + +Read mode get_user_pages() can return zero page, but current +futex code doesn't handle it at all. Then, zero page makes +infinite loop internally. + +The solution is to use write mode get_user_page() always for +page lookup. It prevents the lookup of both file page of private +mappings and zero page. + +Performance concerns: + +Probaly very little, because glibc always initialize variables +for futex before to call futex(). It means glibc users never see +the overhead of this patch. + +Compatibility concerns: + +This patch has few compatibility issues. After this patch, +FUTEX_WAIT require writable access to futex variables (read-only +mappings makes EFAULT). But practically it's not a problem, +glibc always initalizes variables for futexes explicitly - nobody +uses read-only mappings. + +Reported-by: Hugh Dickins +Signed-off-by: KOSAKI Motohiro +Acked-by: Peter Zijlstra +Acked-by: Darren Hart +Cc: Linus Torvalds +Cc: KAMEZAWA Hiroyuki +Cc: Nick Piggin +Cc: Ulrich Drepper +LKML-Reference: <20100105162633.45A2.A69D9226@jp.fujitsu.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/futex.c | 27 ++++++++++++--------------- + 1 file changed, 12 insertions(+), 15 deletions(-) + +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -203,8 +203,6 @@ static void drop_futex_key_refs(union fu + * @uaddr: virtual address of the futex + * @fshared: 0 for a PROCESS_PRIVATE futex, 1 for PROCESS_SHARED + * @key: address where result is stored. +- * @rw: mapping needs to be read/write (values: VERIFY_READ, +- * VERIFY_WRITE) + * + * Returns a negative error code or 0 + * The key words are stored in *key on success. +@@ -216,7 +214,7 @@ static void drop_futex_key_refs(union fu + * lock_page() might sleep, the caller should not hold a spinlock. + */ + static int +-get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw) ++get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key) + { + unsigned long address = (unsigned long)uaddr; + struct mm_struct *mm = current->mm; +@@ -239,7 +237,7 @@ get_futex_key(u32 __user *uaddr, int fsh + * but access_ok() should be faster than find_vma() + */ + if (!fshared) { +- if (unlikely(!access_ok(rw, uaddr, sizeof(u32)))) ++ if (unlikely(!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))) + return -EFAULT; + key->private.mm = mm; + key->private.address = address; +@@ -248,7 +246,7 @@ get_futex_key(u32 __user *uaddr, int fsh + } + + again: +- err = get_user_pages_fast(address, 1, rw == VERIFY_WRITE, &page); ++ err = get_user_pages_fast(address, 1, 1, &page); + if (err < 0) + return err; + +@@ -867,7 +865,7 @@ static int futex_wake(u32 __user *uaddr, + if (!bitset) + return -EINVAL; + +- ret = get_futex_key(uaddr, fshared, &key, VERIFY_READ); ++ ret = get_futex_key(uaddr, fshared, &key); + if (unlikely(ret != 0)) + goto out; + +@@ -913,10 +911,10 @@ futex_wake_op(u32 __user *uaddr1, int fs + int ret, op_ret; + + retry: +- ret = get_futex_key(uaddr1, fshared, &key1, VERIFY_READ); ++ ret = get_futex_key(uaddr1, fshared, &key1); + if (unlikely(ret != 0)) + goto out; +- ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_WRITE); ++ ret = get_futex_key(uaddr2, fshared, &key2); + if (unlikely(ret != 0)) + goto out_put_key1; + +@@ -1175,11 +1173,10 @@ retry: + pi_state = NULL; + } + +- ret = get_futex_key(uaddr1, fshared, &key1, VERIFY_READ); ++ ret = get_futex_key(uaddr1, fshared, &key1); + if (unlikely(ret != 0)) + goto out; +- ret = get_futex_key(uaddr2, fshared, &key2, +- requeue_pi ? VERIFY_WRITE : VERIFY_READ); ++ ret = get_futex_key(uaddr2, fshared, &key2); + if (unlikely(ret != 0)) + goto out_put_key1; + +@@ -1738,7 +1735,7 @@ static int futex_wait_setup(u32 __user * + */ + retry: + q->key = FUTEX_KEY_INIT; +- ret = get_futex_key(uaddr, fshared, &q->key, VERIFY_READ); ++ ret = get_futex_key(uaddr, fshared, &q->key); + if (unlikely(ret != 0)) + return ret; + +@@ -1904,7 +1901,7 @@ static int futex_lock_pi(u32 __user *uad + q.requeue_pi_key = NULL; + retry: + q.key = FUTEX_KEY_INIT; +- ret = get_futex_key(uaddr, fshared, &q.key, VERIFY_WRITE); ++ ret = get_futex_key(uaddr, fshared, &q.key); + if (unlikely(ret != 0)) + goto out; + +@@ -2023,7 +2020,7 @@ retry: + if ((uval & FUTEX_TID_MASK) != task_pid_vnr(current)) + return -EPERM; + +- ret = get_futex_key(uaddr, fshared, &key, VERIFY_WRITE); ++ ret = get_futex_key(uaddr, fshared, &key); + if (unlikely(ret != 0)) + goto out; + +@@ -2215,7 +2212,7 @@ static int futex_wait_requeue_pi(u32 __u + rt_waiter.task = NULL; + + key2 = FUTEX_KEY_INIT; +- ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_WRITE); ++ ret = get_futex_key(uaddr2, fshared, &key2); + if (unlikely(ret != 0)) + goto out; + diff --git a/queue-2.6.32/hid-add-device-ids-for-new-model-of-apple-wireless-keyboard.patch b/queue-2.6.32/hid-add-device-ids-for-new-model-of-apple-wireless-keyboard.patch new file mode 100644 index 00000000000..01885646620 --- /dev/null +++ b/queue-2.6.32/hid-add-device-ids-for-new-model-of-apple-wireless-keyboard.patch @@ -0,0 +1,62 @@ +From 23aeb61e7e1f02fb0f3b8f9e798e75537ca1731d Mon Sep 17 00:00:00 2001 +From: Christian Schuerer-Waldheim +Date: Wed, 6 Jan 2010 14:49:57 +0100 +Subject: HID: add device IDs for new model of Apple Wireless Keyboard + +From: Christian Schuerer-Waldheim + +commit 23aeb61e7e1f02fb0f3b8f9e798e75537ca1731d upstream. + +Added device IDs for the new model of the Apple Wireless Keyboard +(November 2009). + +Signed-off-by: Christian Schuerer-Waldheim +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-apple.c | 7 +++++++ + drivers/hid/hid-core.c | 3 +++ + drivers/hid/hid-ids.h | 3 +++ + 3 files changed, 13 insertions(+) + +--- a/drivers/hid/hid-apple.c ++++ b/drivers/hid/hid-apple.c +@@ -431,6 +431,13 @@ static const struct hid_device_id apple_ + .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS), + .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI), ++ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO), ++ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | ++ APPLE_ISO_KEYBOARD }, ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS), ++ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY), + .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY), +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -1287,6 +1287,9 @@ static const struct hid_device_id hid_bl + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, + { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -88,6 +88,9 @@ + #define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236 + #define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237 + #define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238 ++#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239 ++#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a ++#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b + #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a + #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b + #define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241 diff --git a/queue-2.6.32/i2c-do-not-use-device-name-after-device_unregister.patch b/queue-2.6.32/i2c-do-not-use-device-name-after-device_unregister.patch new file mode 100644 index 00000000000..9d15c8e4787 --- /dev/null +++ b/queue-2.6.32/i2c-do-not-use-device-name-after-device_unregister.patch @@ -0,0 +1,49 @@ +From c556752109794a5ff199b80a1673336b4df8433a Mon Sep 17 00:00:00 2001 +From: Thadeu Lima de Souza Cascardo +Date: Sat, 16 Jan 2010 20:43:13 +0100 +Subject: i2c: Do not use device name after device_unregister +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Thadeu Lima de Souza Cascardo + +commit c556752109794a5ff199b80a1673336b4df8433a upstream. + +dev_dbg outputs dev_name, which is released with device_unregister. This bug +resulted in output like this: + +i2c Xy2�0: adapter [SMBus I801 adapter at 1880] unregistered + +The right output would be: +i2c i2c-0: adapter [SMBus I801 adapter at 1880] unregistered + +Signed-off-by: Thadeu Lima de Souza Cascardo +Signed-off-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/i2c/i2c-core.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/i2c/i2c-core.c ++++ b/drivers/i2c/i2c-core.c +@@ -801,6 +801,9 @@ int i2c_del_adapter(struct i2c_adapter * + adap->dev.parent); + #endif + ++ /* device name is gone after device_unregister */ ++ dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name); ++ + /* clean up the sysfs representation */ + init_completion(&adap->dev_released); + device_unregister(&adap->dev); +@@ -813,8 +816,6 @@ int i2c_del_adapter(struct i2c_adapter * + idr_remove(&i2c_adapter_idr, adap->nr); + mutex_unlock(&core_lock); + +- dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name); +- + /* Clear the device structure in case this adapter is ever going to be + added again */ + memset(&adap->dev, 0, sizeof(adap->dev)); diff --git a/queue-2.6.32/i2c-pca-don-t-use-_interruptible.patch b/queue-2.6.32/i2c-pca-don-t-use-_interruptible.patch new file mode 100644 index 00000000000..6445619a2dd --- /dev/null +++ b/queue-2.6.32/i2c-pca-don-t-use-_interruptible.patch @@ -0,0 +1,64 @@ +From 22f8b2695eda496026623020811cae34590ee3d7 Mon Sep 17 00:00:00 2001 +From: Wolfram Sang +Date: Sat, 16 Jan 2010 20:43:13 +0100 +Subject: i2c/pca: Don't use *_interruptible + +From: Wolfram Sang + +commit 22f8b2695eda496026623020811cae34590ee3d7 upstream. + +Unexpected signals can disturb the bus-handling and lock it up. Don't use +interruptible in 'wait_event_*' and 'wake_*' as in commits +dc1972d02747d2170fb1d78d114801f5ecb27506 (for cpm), +1ab082d7cbd0f34e39a5396cc6340c00bc5d66ef (for mpc), +b7af349b175af45f9d87b3bf3f0a221e1831ed39 (for omap). + +Signed-off-by: Wolfram Sang +Signed-off-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/i2c/busses/i2c-pca-isa.c | 4 ++-- + drivers/i2c/busses/i2c-pca-platform.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/i2c/busses/i2c-pca-isa.c ++++ b/drivers/i2c/busses/i2c-pca-isa.c +@@ -75,7 +75,7 @@ static int pca_isa_waitforcompletion(voi + unsigned long timeout; + + if (irq > -1) { +- ret = wait_event_interruptible_timeout(pca_wait, ++ ret = wait_event_timeout(pca_wait, + pca_isa_readbyte(pd, I2C_PCA_CON) + & I2C_PCA_CON_SI, pca_isa_ops.timeout); + } else { +@@ -96,7 +96,7 @@ static void pca_isa_resetchip(void *pd) + } + + static irqreturn_t pca_handler(int this_irq, void *dev_id) { +- wake_up_interruptible(&pca_wait); ++ wake_up(&pca_wait); + return IRQ_HANDLED; + } + +--- a/drivers/i2c/busses/i2c-pca-platform.c ++++ b/drivers/i2c/busses/i2c-pca-platform.c +@@ -84,7 +84,7 @@ static int i2c_pca_pf_waitforcompletion( + unsigned long timeout; + + if (i2c->irq) { +- ret = wait_event_interruptible_timeout(i2c->wait, ++ ret = wait_event_timeout(i2c->wait, + i2c->algo_data.read_byte(i2c, I2C_PCA_CON) + & I2C_PCA_CON_SI, i2c->adap.timeout); + } else { +@@ -122,7 +122,7 @@ static irqreturn_t i2c_pca_pf_handler(in + if ((i2c->algo_data.read_byte(i2c, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0) + return IRQ_NONE; + +- wake_up_interruptible(&i2c->wait); ++ wake_up(&i2c->wait); + + return IRQ_HANDLED; + } diff --git a/queue-2.6.32/inotify-do-not-reuse-watch-descriptors.patch b/queue-2.6.32/inotify-do-not-reuse-watch-descriptors.patch new file mode 100644 index 00000000000..e3b7dc773f1 --- /dev/null +++ b/queue-2.6.32/inotify-do-not-reuse-watch-descriptors.patch @@ -0,0 +1,84 @@ +From 9e572cc9877ee6c43af60778f6b8d5ba0692d935 Mon Sep 17 00:00:00 2001 +From: Eric Paris +Date: Fri, 15 Jan 2010 12:12:24 -0500 +Subject: inotify: do not reuse watch descriptors + +From: Eric Paris + +commit 9e572cc9877ee6c43af60778f6b8d5ba0692d935 upstream. + +Since commit 7e790dd5fc937bc8d2400c30a05e32a9e9eef276 ("inotify: fix +error paths in inotify_update_watch") inotify changed the manor in which +it gave watch descriptors back to userspace. Previous to this commit +inotify acted like the following: + + inotify_add_watch(X, Y, Z) = 1 + inotify_rm_watch(X, 1); + inotify_add_watch(X, Y, Z) = 2 + +but after this patch inotify would return watch descriptors like so: + + inotify_add_watch(X, Y, Z) = 1 + inotify_rm_watch(X, 1); + inotify_add_watch(X, Y, Z) = 1 + +which I saw as equivalent to opening an fd where + + open(file) = 1; + close(1); + open(file) = 1; + +seemed perfectly reasonable. The issue is that quite a bit of userspace +apparently relies on the behavior in which watch descriptors will not be +quickly reused. KDE relies on it, I know some selinux packages rely on +it, and I have heard complaints from other random sources such as debian +bug 558981. + +Although the man page implies what we do is ok, we broke userspace so +this patch almost reverts us to the old behavior. It is still slightly +racey and I have patches that would fix that, but they are rather large +and this will fix it for all real world cases. The race is as follows: + + - task1 creates a watch and blocks in idr_new_watch() before it updates + the hint. + - task2 creates a watch and updates the hint. + - task1 updates the hint with it's older wd + - task removes the watch created by task2 + - task adds a new watch and will reuse the wd originally given to task2 + +it requires moving some locking around the hint (last_wd) but this should +solve it for the real world and be -stable safe. + +As a side effect this patch papers over a bug in the lib/idr code which +is causing a large number WARN's to pop on people's system and many +reports in kerneloops.org. I'm working on the root cause of that idr +bug seperately but this should make inotify immune to that issue. + +Signed-off-by: Eric Paris +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/notify/inotify/inotify_user.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/fs/notify/inotify/inotify_user.c ++++ b/fs/notify/inotify/inotify_user.c +@@ -558,7 +558,7 @@ retry: + + spin_lock(&group->inotify_data.idr_lock); + ret = idr_get_new_above(&group->inotify_data.idr, &tmp_ientry->fsn_entry, +- group->inotify_data.last_wd, ++ group->inotify_data.last_wd+1, + &tmp_ientry->wd); + spin_unlock(&group->inotify_data.idr_lock); + if (ret) { +@@ -638,7 +638,7 @@ static struct fsnotify_group *inotify_ne + + spin_lock_init(&group->inotify_data.idr_lock); + idr_init(&group->inotify_data.idr); +- group->inotify_data.last_wd = 1; ++ group->inotify_data.last_wd = 0; + group->inotify_data.user = user; + group->inotify_data.fa = NULL; + diff --git a/queue-2.6.32/inotify-only-warn-once-for-inotify-problems.patch b/queue-2.6.32/inotify-only-warn-once-for-inotify-problems.patch new file mode 100644 index 00000000000..f846220a356 --- /dev/null +++ b/queue-2.6.32/inotify-only-warn-once-for-inotify-problems.patch @@ -0,0 +1,33 @@ +From 976ae32be45a736acd49215a7e4771ff91f161c3 Mon Sep 17 00:00:00 2001 +From: Eric Paris +Date: Fri, 15 Jan 2010 12:12:25 -0500 +Subject: inotify: only warn once for inotify problems + +From: Eric Paris + +commit 976ae32be45a736acd49215a7e4771ff91f161c3 upstream. + +inotify will WARN() if it finds that the idr and the fsnotify internals +somehow got out of sync. It was only supposed to do this once but due +to this stupid bug it would warn every single time a problem was +detected. + +Signed-off-by: Eric Paris +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/notify/inotify/inotify_fsnotify.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/notify/inotify/inotify_fsnotify.c ++++ b/fs/notify/inotify/inotify_fsnotify.c +@@ -121,7 +121,7 @@ static int idr_callback(int id, void *p, + if (warned) + return 0; + +- warned = false; ++ warned = true; + entry = p; + ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry); + diff --git a/queue-2.6.32/input-pmouse-move-sentelic-probe-down-the-list.patch b/queue-2.6.32/input-pmouse-move-sentelic-probe-down-the-list.patch new file mode 100644 index 00000000000..8a7a462aebb --- /dev/null +++ b/queue-2.6.32/input-pmouse-move-sentelic-probe-down-the-list.patch @@ -0,0 +1,69 @@ +From 4a18b3ab6ed537b055e3fcfca64ab870b4f9acf0 Mon Sep 17 00:00:00 2001 +From: Tai-hwa Liang +Date: Wed, 13 Jan 2010 00:16:27 -0800 +Subject: Input: pmouse - move Sentelic probe down the list + +From: Tai-hwa Liang + +commit 4a18b3ab6ed537b055e3fcfca64ab870b4f9acf0 upstream. + +Sentelic probes confuse IBM trackpoints so they stop responding to +TP_READ_ID command. See: + + http://bugzilla.kernel.org/show_bug.cgi?id=14970 + +Let's move FSP detection lower so it is probed after trackpoint and +others, just before we strat probing for Intellimouse Explorer. + +Signed-off-by: Tai-hwa Liang +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/mouse/psmouse-base.c | 28 +++++++++++++++------------- + 1 file changed, 15 insertions(+), 13 deletions(-) + +--- a/drivers/input/mouse/psmouse-base.c ++++ b/drivers/input/mouse/psmouse-base.c +@@ -667,19 +667,6 @@ static int psmouse_extensions(struct psm + max_proto = PSMOUSE_IMEX; + } + +-/* +- * Try Finger Sensing Pad +- */ +- if (max_proto > PSMOUSE_IMEX) { +- if (fsp_detect(psmouse, set_properties) == 0) { +- if (!set_properties || fsp_init(psmouse) == 0) +- return PSMOUSE_FSP; +-/* +- * Init failed, try basic relative protocols +- */ +- max_proto = PSMOUSE_IMEX; +- } +- } + + if (max_proto > PSMOUSE_IMEX) { + if (genius_detect(psmouse, set_properties) == 0) +@@ -696,6 +683,21 @@ static int psmouse_extensions(struct psm + } + + /* ++ * Try Finger Sensing Pad. We do it here because its probe upsets ++ * Trackpoint devices (causing TP_READ_ID command to time out). ++ */ ++ if (max_proto > PSMOUSE_IMEX) { ++ if (fsp_detect(psmouse, set_properties) == 0) { ++ if (!set_properties || fsp_init(psmouse) == 0) ++ return PSMOUSE_FSP; ++/* ++ * Init failed, try basic relative protocols ++ */ ++ max_proto = PSMOUSE_IMEX; ++ } ++ } ++ ++/* + * Reset to defaults in case the device got confused by extended + * protocol probes. Note that we follow up with full reset because + * some mice put themselves to sleep when they see PSMOUSE_RESET_DIS. diff --git a/queue-2.6.32/megaraid_sas-remove-sysfs-poll_mode_io-world-writeable-permissions.patch b/queue-2.6.32/megaraid_sas-remove-sysfs-poll_mode_io-world-writeable-permissions.patch new file mode 100644 index 00000000000..7536f0075a5 --- /dev/null +++ b/queue-2.6.32/megaraid_sas-remove-sysfs-poll_mode_io-world-writeable-permissions.patch @@ -0,0 +1,35 @@ +From bb7d3f24c71e528989501617651b669fbed798cb Mon Sep 17 00:00:00 2001 +From: Bryn M. Reeves +Date: Thu, 12 Nov 2009 18:31:54 +0000 +Subject: [SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions + +From: Bryn M. Reeves + +commit bb7d3f24c71e528989501617651b669fbed798cb upstream. + +/sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being +world-writable, which seems bad (letting any user affect kernel driver +behavior). + +This turns off group and user write permissions, so that on typical +production systems only root can write to it. + +Signed-off-by: Bryn M. Reeves +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/megaraid/megaraid_sas.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/megaraid/megaraid_sas.c ++++ b/drivers/scsi/megaraid/megaraid_sas.c +@@ -3451,7 +3451,7 @@ out: + return retval; + } + +-static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUGO, ++static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUSR, + megasas_sysfs_show_poll_mode_io, + megasas_sysfs_set_poll_mode_io); + diff --git a/queue-2.6.32/memcg-ensure-list-is-empty-at-rmdir.patch b/queue-2.6.32/memcg-ensure-list-is-empty-at-rmdir.patch new file mode 100644 index 00000000000..03e311dbd8c --- /dev/null +++ b/queue-2.6.32/memcg-ensure-list-is-empty-at-rmdir.patch @@ -0,0 +1,128 @@ +From fce66477578d081f19aef5ea218664ff7758c33a Mon Sep 17 00:00:00 2001 +From: Daisuke Nishimura +Date: Fri, 15 Jan 2010 17:01:30 -0800 +Subject: memcg: ensure list is empty at rmdir + +From: Daisuke Nishimura + +commit fce66477578d081f19aef5ea218664ff7758c33a upstream. + +Current mem_cgroup_force_empty() only ensures mem->res.usage == 0 on +success. But this doesn't guarantee memcg's LRU is really empty, because +there are some cases in which !PageCgrupUsed pages exist on memcg's LRU. + +For example: +- Pages can be uncharged by its owner process while they are on LRU. +- race between mem_cgroup_add_lru_list() and __mem_cgroup_uncharge_common(). + +So there can be a case in which the usage is zero but some of the LRUs are not empty. + +OTOH, mem_cgroup_del_lru_list(), which can be called asynchronously with +rmdir, accesses the mem_cgroup, so this access can cause a problem if it +races with rmdir because the mem_cgroup might have been freed by rmdir. + +Actually, I saw a bug which seems to be caused by this race. + + [1530745.949906] BUG: unable to handle kernel NULL pointer dereference at 0000000000000230 + [1530745.950651] IP: [] mem_cgroup_del_lru_list+0x30/0x80 + [1530745.950651] PGD 3863de067 PUD 3862c7067 PMD 0 + [1530745.950651] Oops: 0002 [#1] SMP + [1530745.950651] last sysfs file: /sys/devices/system/cpu/cpu7/cache/index1/shared_cpu_map + [1530745.950651] CPU 3 + [1530745.950651] Modules linked in: configs ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp nfsd nfs_acl auth_rpcgss exportfs autofs4 hidp rfcomm l2cap crc16 bluetooth lockd sunrpc ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp bnx2i cnic uio ipv6 cxgb3i cxgb3 mdio libiscsi_tcp libiscsi scsi_transport_iscsi dm_mirror dm_multipath scsi_dh video output sbs sbshc battery ac lp kvm_intel kvm sg ide_cd_mod cdrom serio_raw tpm_tis tpm tpm_bios acpi_memhotplug button parport_pc parport rtc_cmos rtc_core rtc_lib e1000 i2c_i801 i2c_core pcspkr dm_region_hash dm_log dm_mod ata_piix libata shpchp megaraid_mbox sd_mod scsi_mod megaraid_mm ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: freq_table] + [1530745.950651] Pid: 19653, comm: shmem_test_02 Tainted: G M 2.6.32-mm1-00701-g2b04386 #3 Express5800/140Rd-4 [N8100-1065] + [1530745.950651] RIP: 0010:[] [] mem_cgroup_del_lru_list+0x30/0x80 + [1530745.950651] RSP: 0018:ffff8803863ddcb8 EFLAGS: 00010002 + [1530745.950651] RAX: 00000000000001e0 RBX: ffff8803abc02238 RCX: 00000000000001e0 + [1530745.950651] RDX: 0000000000000000 RSI: ffff88038611a000 RDI: ffff8803abc02238 + [1530745.950651] RBP: ffff8803863ddcc8 R08: 0000000000000002 R09: ffff8803a04c8643 + [1530745.950651] R10: 0000000000000000 R11: ffffffff810c7333 R12: 0000000000000000 + [1530745.950651] R13: ffff880000017f00 R14: 0000000000000092 R15: ffff8800179d0310 + [1530745.950651] FS: 0000000000000000(0000) GS:ffff880017800000(0000) knlGS:0000000000000000 + [1530745.950651] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b + [1530745.950651] CR2: 0000000000000230 CR3: 0000000379d87000 CR4: 00000000000006e0 + [1530745.950651] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 + [1530745.950651] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 + [1530745.950651] Process shmem_test_02 (pid: 19653, threadinfo ffff8803863dc000, task ffff88038612a8a0) + [1530745.950651] Stack: + [1530745.950651] ffffea00040c2fe8 0000000000000000 ffff8803863ddd98 ffffffff810c739a + [1530745.950651] <0> 00000000863ddd18 000000000000000c 0000000000000000 0000000000000000 + [1530745.950651] <0> 0000000000000002 0000000000000000 ffff8803863ddd68 0000000000000046 + [1530745.950651] Call Trace: + [1530745.950651] [] release_pages+0x142/0x1e7 + [1530745.950651] [] ? pagevec_move_tail+0x6e/0x112 + [1530745.950651] [] pagevec_move_tail+0xfd/0x112 + [1530745.950651] [] lru_add_drain+0x76/0x94 + [1530745.950651] [] exit_mmap+0x6e/0x145 + [1530745.950651] [] mmput+0x5e/0xcf + [1530745.950651] [] exit_mm+0x11c/0x129 + [1530745.950651] [] ? audit_free+0x196/0x1c9 + [1530745.950651] [] do_exit+0x1f5/0x6b7 + [1530745.950651] [] ? up_read+0x2b/0x2f + [1530745.950651] [] ? lockdep_sys_exit_thunk+0x35/0x67 + [1530745.950651] [] do_group_exit+0x83/0xb0 + [1530745.950651] [] sys_exit_group+0x17/0x1b + [1530745.950651] [] system_call_fastpath+0x16/0x1b + [1530745.950651] Code: 54 53 0f 1f 44 00 00 83 3d cc 29 7c 00 00 41 89 f4 75 63 eb 4e 48 83 7b 08 00 75 04 0f 0b eb fe 48 89 df e8 18 f3 ff ff 44 89 e2 <48> ff 4c d0 50 48 8b 05 2b 2d 7c 00 48 39 43 08 74 39 48 8b 4b + [1530745.950651] RIP [] mem_cgroup_del_lru_list+0x30/0x80 + [1530745.950651] RSP + [1530745.950651] CR2: 0000000000000230 + [1530745.950651] ---[ end trace c3419c1bb8acc34f ]--- + [1530745.950651] Fixing recursive fault but reboot is needed! + +The problem here is pages on LRU may contain pointer to stale memcg. To +make res->usage to be 0, all pages on memcg must be uncharged or moved to +another(parent) memcg. Moved page_cgroup have already removed from +original LRU, but uncharged page_cgroup contains pointer to memcg withou +PCG_USED bit. (This asynchronous LRU work is for improving performance.) +If PCG_USED bit is not set, page_cgroup will never be added to memcg's +LRU. So, about pages not on LRU, they never access stale pointer. Then, +what we have to take care of is page_cgroup _on_ LRU list. This patch +fixes this problem by making mem_cgroup_force_empty() visit all LRUs +before exiting its loop and guarantee there are no pages on its LRU. + +Signed-off-by: Daisuke Nishimura +Acked-by: KAMEZAWA Hiroyuki +Cc: Balbir Singh +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memcontrol.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +--- a/mm/memcontrol.c ++++ b/mm/memcontrol.c +@@ -2381,7 +2381,7 @@ static int mem_cgroup_force_empty(struct + if (free_all) + goto try_to_free; + move_account: +- while (mem->res.usage > 0) { ++ do { + ret = -EBUSY; + if (cgroup_task_count(cgrp) || !list_empty(&cgrp->children)) + goto out; +@@ -2408,8 +2408,8 @@ move_account: + if (ret == -ENOMEM) + goto try_to_free; + cond_resched(); +- } +- ret = 0; ++ /* "ret" should also be checked to ensure all lists are empty. */ ++ } while (mem->res.usage > 0 || ret); + out: + css_put(&mem->css); + return ret; +@@ -2442,10 +2442,7 @@ try_to_free: + } + lru_add_drain(); + /* try move_account...there may be some *locked* pages. */ +- if (mem->res.usage) +- goto move_account; +- ret = 0; +- goto out; ++ goto move_account; + } + + int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int event) diff --git a/queue-2.6.32/mfd-correct-wm835x-isink-ramp-time-defines.patch b/queue-2.6.32/mfd-correct-wm835x-isink-ramp-time-defines.patch new file mode 100644 index 00000000000..ff58c06b1e2 --- /dev/null +++ b/queue-2.6.32/mfd-correct-wm835x-isink-ramp-time-defines.patch @@ -0,0 +1,58 @@ +From 9dffe2a32b0deef52605d50527c0d240b15cabf7 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Mon, 4 Jan 2010 18:05:00 +0000 +Subject: mfd: Correct WM835x ISINK ramp time defines + +From: Mark Brown + +commit 9dffe2a32b0deef52605d50527c0d240b15cabf7 upstream. + +The constants used to specify ISINK ramp times for WM835x had the +wrong shifts so that the on times applied to the off ramp and vice +versa. The masks for the bitfields are correct. + +Signed-off-by: Mark Brown +Signed-off-by: Samuel Ortiz +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/mfd/wm8350/pmic.h | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +--- a/include/linux/mfd/wm8350/pmic.h ++++ b/include/linux/mfd/wm8350/pmic.h +@@ -666,20 +666,20 @@ + #define WM8350_ISINK_FLASH_DUR_64MS (1 << 8) + #define WM8350_ISINK_FLASH_DUR_96MS (2 << 8) + #define WM8350_ISINK_FLASH_DUR_1024MS (3 << 8) +-#define WM8350_ISINK_FLASH_ON_INSTANT (0 << 4) +-#define WM8350_ISINK_FLASH_ON_0_25S (1 << 4) +-#define WM8350_ISINK_FLASH_ON_0_50S (2 << 4) +-#define WM8350_ISINK_FLASH_ON_1_00S (3 << 4) +-#define WM8350_ISINK_FLASH_ON_1_95S (1 << 4) +-#define WM8350_ISINK_FLASH_ON_3_91S (2 << 4) +-#define WM8350_ISINK_FLASH_ON_7_80S (3 << 4) +-#define WM8350_ISINK_FLASH_OFF_INSTANT (0 << 0) +-#define WM8350_ISINK_FLASH_OFF_0_25S (1 << 0) +-#define WM8350_ISINK_FLASH_OFF_0_50S (2 << 0) +-#define WM8350_ISINK_FLASH_OFF_1_00S (3 << 0) +-#define WM8350_ISINK_FLASH_OFF_1_95S (1 << 0) +-#define WM8350_ISINK_FLASH_OFF_3_91S (2 << 0) +-#define WM8350_ISINK_FLASH_OFF_7_80S (3 << 0) ++#define WM8350_ISINK_FLASH_ON_INSTANT (0 << 0) ++#define WM8350_ISINK_FLASH_ON_0_25S (1 << 0) ++#define WM8350_ISINK_FLASH_ON_0_50S (2 << 0) ++#define WM8350_ISINK_FLASH_ON_1_00S (3 << 0) ++#define WM8350_ISINK_FLASH_ON_1_95S (1 << 0) ++#define WM8350_ISINK_FLASH_ON_3_91S (2 << 0) ++#define WM8350_ISINK_FLASH_ON_7_80S (3 << 0) ++#define WM8350_ISINK_FLASH_OFF_INSTANT (0 << 4) ++#define WM8350_ISINK_FLASH_OFF_0_25S (1 << 4) ++#define WM8350_ISINK_FLASH_OFF_0_50S (2 << 4) ++#define WM8350_ISINK_FLASH_OFF_1_00S (3 << 4) ++#define WM8350_ISINK_FLASH_OFF_1_95S (1 << 4) ++#define WM8350_ISINK_FLASH_OFF_3_91S (2 << 4) ++#define WM8350_ISINK_FLASH_OFF_7_80S (3 << 4) + + /* + * Regulator Interrupts. diff --git a/queue-2.6.32/mfd-wm835x-gpio-direction-register-is-not-locked.patch b/queue-2.6.32/mfd-wm835x-gpio-direction-register-is-not-locked.patch new file mode 100644 index 00000000000..375a69f3866 --- /dev/null +++ b/queue-2.6.32/mfd-wm835x-gpio-direction-register-is-not-locked.patch @@ -0,0 +1,31 @@ +From 8e6ba2dfa2d6c4691a83a63e211990a8bd7b788b Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Thu, 7 Jan 2010 16:16:14 +0000 +Subject: mfd: WM835x GPIO direction register is not locked + +From: Mark Brown + +commit 8e6ba2dfa2d6c4691a83a63e211990a8bd7b788b upstream. + +No need to set the security key when writing to it. + +Signed-off-by: Mark Brown +Signed-off-by: Samuel Ortiz +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mfd/wm8350-core.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/mfd/wm8350-core.c ++++ b/drivers/mfd/wm8350-core.c +@@ -134,8 +134,7 @@ static inline int is_reg_locked(struct w + wm8350->reg_cache[WM8350_SECURITY] == WM8350_UNLOCK_KEY) + return 0; + +- if ((reg == WM8350_GPIO_CONFIGURATION_I_O) || +- (reg >= WM8350_GPIO_FUNCTION_SELECT_1 && ++ if ((reg >= WM8350_GPIO_FUNCTION_SELECT_1 && + reg <= WM8350_GPIO_FUNCTION_SELECT_4) || + (reg >= WM8350_BATTERY_CHARGER_CONTROL_1 && + reg <= WM8350_BATTERY_CHARGER_CONTROL_3)) diff --git a/queue-2.6.32/page-allocator-update-nr_free_pages-only-when-necessary.patch b/queue-2.6.32/page-allocator-update-nr_free_pages-only-when-necessary.patch new file mode 100644 index 00000000000..ec94390b5c1 --- /dev/null +++ b/queue-2.6.32/page-allocator-update-nr_free_pages-only-when-necessary.patch @@ -0,0 +1,40 @@ +From 6ccf80eb15ccaca4d3f1ab5162b9ded5eecd9971 Mon Sep 17 00:00:00 2001 +From: KOSAKI Motohiro +Date: Fri, 15 Jan 2010 17:01:18 -0800 +Subject: page allocator: update NR_FREE_PAGES only when necessary + +From: KOSAKI Motohiro + +commit 6ccf80eb15ccaca4d3f1ab5162b9ded5eecd9971 upstream. + +commit f2260e6b (page allocator: update NR_FREE_PAGES only as necessary) +made one minor regression. if __rmqueue() was failed, NR_FREE_PAGES stat +go wrong. this patch fixes it. + +Signed-off-by: KOSAKI Motohiro +Cc: Mel Gorman +Reviewed-by: Minchan Kim +Reported-by: Huang Shijie +Reviewed-by: Christoph Lameter +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/page_alloc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -1225,10 +1225,10 @@ again: + } + spin_lock_irqsave(&zone->lock, flags); + page = __rmqueue(zone, order, migratetype); +- __mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order)); + spin_unlock(&zone->lock); + if (!page) + goto failed; ++ __mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order)); + } + + __count_zone_vm_events(PGALLOC, zone, 1 << order); diff --git a/queue-2.6.32/pci-cardbus-add-a-fixup-hook-and-fix-powerpc.patch b/queue-2.6.32/pci-cardbus-add-a-fixup-hook-and-fix-powerpc.patch new file mode 100644 index 00000000000..cebb573763f --- /dev/null +++ b/queue-2.6.32/pci-cardbus-add-a-fixup-hook-and-fix-powerpc.patch @@ -0,0 +1,108 @@ +From stefan.bader@canonical.com Tue Jan 19 15:40:47 2010 +From: Benjamin Herrenschmidt +Date: Tue, 19 Jan 2010 12:42:19 +0100 +Subject: PCI/cardbus: Add a fixup hook and fix powerpc +To: stable@kernel.org +Cc: Benjamin Herrenschmidt , Jesse Barnes +Message-ID: <1263901339-15773-1-git-send-email-stefan.bader@canonical.com> + +From: Benjamin Herrenschmidt + +commit 2d1c861871d767153538a77c498752b36d4bb4b8 upstream + +The cardbus code creates PCI devices without ever going through the +necessary fixup bits and pieces that normal PCI devices go through. + +There's in fact a commented out call to pcibios_fixup_bus() in there, +it's commented because ... it doesn't work. + +I could make pcibios_fixup_bus() do the right thing on powerpc easily +but I felt it cleaner instead to provide a specific hook pci_fixup_cardbus +for which a weak empty implementation is provided by the PCI core. + +This fixes cardbus on powerbooks and probably all other PowerPC +platforms which was broken completely for ever on some platforms and +since 2.6.31 on others such as PowerBooks when we made the DMA ops +mandatory (since those are setup by the fixups). + +Acked-by: Dominik Brodowski +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Jesse Barnes +Signed-off-by: Stefan Bader +Acked-by: Benjamin Herrenschmidt +Acked-by: Jesse Barnes +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/pci-common.c | 13 +++++++++++++ + drivers/pci/pci.c | 5 +++++ + drivers/pcmcia/cardbus.c | 2 +- + include/linux/pci.h | 3 +++ + 4 files changed, 22 insertions(+), 1 deletion(-) + +--- a/arch/powerpc/kernel/pci-common.c ++++ b/arch/powerpc/kernel/pci-common.c +@@ -1107,6 +1107,12 @@ void __devinit pcibios_setup_bus_devices + list_for_each_entry(dev, &bus->devices, bus_list) { + struct dev_archdata *sd = &dev->dev.archdata; + ++ /* Cardbus can call us to add new devices to a bus, so ignore ++ * those who are already fully discovered ++ */ ++ if (dev->is_added) ++ continue; ++ + /* Setup OF node pointer in archdata */ + sd->of_node = pci_device_to_OF_node(dev); + +@@ -1147,6 +1153,13 @@ void __devinit pcibios_fixup_bus(struct + } + EXPORT_SYMBOL(pcibios_fixup_bus); + ++void __devinit pci_fixup_cardbus(struct pci_bus *bus) ++{ ++ /* Now fixup devices on that bus */ ++ pcibios_setup_bus_devices(bus); ++} ++ ++ + static int skip_isa_ioresource_align(struct pci_dev *dev) + { + if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) && +--- a/drivers/pci/pci.c ++++ b/drivers/pci/pci.c +@@ -2723,6 +2723,11 @@ int __attribute__ ((weak)) pci_ext_cfg_a + return 1; + } + ++void __weak pci_fixup_cardbus(struct pci_bus *bus) ++{ ++} ++EXPORT_SYMBOL(pci_fixup_cardbus); ++ + static int __init pci_setup(char *str) + { + while (str) { +--- a/drivers/pcmcia/cardbus.c ++++ b/drivers/pcmcia/cardbus.c +@@ -214,7 +214,7 @@ int __ref cb_alloc(struct pcmcia_socket + unsigned int max, pass; + + s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); +-// pcibios_fixup_bus(bus); ++ pci_fixup_cardbus(bus); + + max = bus->secondary; + for (pass = 0; pass < 2; pass++) +--- a/include/linux/pci.h ++++ b/include/linux/pci.h +@@ -564,6 +564,9 @@ void pcibios_align_resource(void *, stru + resource_size_t); + void pcibios_update_irq(struct pci_dev *, int irq); + ++/* Weak but can be overriden by arch */ ++void pci_fixup_cardbus(struct pci_bus *); ++ + /* Generic PCI functions used internally */ + + extern struct pci_bus *pci_find_bus(int domain, int busnr); diff --git a/queue-2.6.32/reiserfs-truncate-blocks-not-used-by-a-write.patch b/queue-2.6.32/reiserfs-truncate-blocks-not-used-by-a-write.patch new file mode 100644 index 00000000000..0e01b9b8450 --- /dev/null +++ b/queue-2.6.32/reiserfs-truncate-blocks-not-used-by-a-write.patch @@ -0,0 +1,78 @@ +From ec8e2f7466ca370f5e09000ca40a71759afc9ac8 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Thu, 17 Dec 2009 15:27:06 -0800 +Subject: reiserfs: truncate blocks not used by a write + +From: Jan Kara + +commit ec8e2f7466ca370f5e09000ca40a71759afc9ac8 upstream. + +It can happen that write does not use all the blocks allocated in +write_begin either because of some filesystem error (like ENOSPC) or +because page with data to write has been removed from memory. We truncate +these blocks so that we don't have dangling blocks beyond i_size. + +Cc: Jeff Mahoney +Signed-off-by: Jan Kara +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/reiserfs/inode.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +--- a/fs/reiserfs/inode.c ++++ b/fs/reiserfs/inode.c +@@ -2531,6 +2531,12 @@ static int reiserfs_writepage(struct pag + return reiserfs_write_full_page(page, wbc); + } + ++static void reiserfs_truncate_failed_write(struct inode *inode) ++{ ++ truncate_inode_pages(inode->i_mapping, inode->i_size); ++ reiserfs_truncate_file(inode, 0); ++} ++ + static int reiserfs_write_begin(struct file *file, + struct address_space *mapping, + loff_t pos, unsigned len, unsigned flags, +@@ -2597,6 +2603,8 @@ static int reiserfs_write_begin(struct f + if (ret) { + unlock_page(page); + page_cache_release(page); ++ /* Truncate allocated blocks */ ++ reiserfs_truncate_failed_write(inode); + } + return ret; + } +@@ -2689,8 +2697,7 @@ static int reiserfs_write_end(struct fil + ** transaction tracking stuff when the size changes. So, we have + ** to do the i_size updates here. + */ +- pos += copied; +- if (pos > inode->i_size) { ++ if (pos + copied > inode->i_size) { + struct reiserfs_transaction_handle myth; + reiserfs_write_lock(inode->i_sb); + /* If the file have grown beyond the border where it +@@ -2708,7 +2715,7 @@ static int reiserfs_write_end(struct fil + goto journal_error; + } + reiserfs_update_inode_transaction(inode); +- inode->i_size = pos; ++ inode->i_size = pos + copied; + /* + * this will just nest into our transaction. It's important + * to use mark_inode_dirty so the inode gets pushed around on the +@@ -2735,6 +2742,10 @@ static int reiserfs_write_end(struct fil + out: + unlock_page(page); + page_cache_release(page); ++ ++ if (pos + len > inode->i_size) ++ reiserfs_truncate_failed_write(inode); ++ + return ret == 0 ? copied : ret; + + journal_error: diff --git a/queue-2.6.32/revert-drivers-video-s3c-fb.c-fix-clock-setting-for-samsung-soc-framebuffer.patch b/queue-2.6.32/revert-drivers-video-s3c-fb.c-fix-clock-setting-for-samsung-soc-framebuffer.patch new file mode 100644 index 00000000000..b9c7b01194f --- /dev/null +++ b/queue-2.6.32/revert-drivers-video-s3c-fb.c-fix-clock-setting-for-samsung-soc-framebuffer.patch @@ -0,0 +1,83 @@ +From eb29a5cc0b601c458bae9df2f6c3696d75c2d383 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Fri, 15 Jan 2010 17:01:40 -0800 +Subject: revert "drivers/video/s3c-fb.c: fix clock setting for Samsung SoC Framebuffer" + +From: Mark Brown + +commit eb29a5cc0b601c458bae9df2f6c3696d75c2d383 upstream. + +Fix divide by zero and broken output. Commit 600ce1a0fa ("fix clock +setting for Samsung SoC Framebuffer") introduced a mandatory refresh +parameter to the platform data for the S3C framebuffer but did not +introduce any validation code, causing existing platforms (none of which +have refresh set) to divide by zero whenever the framebuffer is +configured, generating warnings and unusable output. + +Ben Dooks noted several problems with the patch: + + - The platform data supplies the pixclk directly and should already + have taken care of the refresh rate. + - The addition of a window ID parameter doesn't help since only the + root framebuffer can control the pixclk. + - pixclk is specified in picoseconds (rather than Hz) as the patch + assumed. + +and suggests reverting the commit so do that. Without fixing this no +mainline user of the driver will produce output. + +[akpm@linux-foundation.org: don't revert the correct bit] +Signed-off-by: Mark Brown +Cc: InKi Dae +Cc: Kyungmin Park +Cc: Krzysztof Helt +Cc: Marek Szyprowski +Cc: Ben Dooks +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/video/s3c-fb.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +--- a/drivers/video/s3c-fb.c ++++ b/drivers/video/s3c-fb.c +@@ -211,21 +211,23 @@ static int s3c_fb_check_var(struct fb_va + + /** + * s3c_fb_calc_pixclk() - calculate the divider to create the pixel clock. +- * @id: window id. + * @sfb: The hardware state. + * @pixclock: The pixel clock wanted, in picoseconds. + * + * Given the specified pixel clock, work out the necessary divider to get + * close to the output frequency. + */ +-static int s3c_fb_calc_pixclk(unsigned char id, struct s3c_fb *sfb, unsigned int pixclk) ++static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk) + { +- struct s3c_fb_pd_win *win = sfb->pdata->win[id]; + unsigned long clk = clk_get_rate(sfb->bus_clk); ++ unsigned long long tmp; + unsigned int result; + +- pixclk *= win->win_mode.refresh; +- result = clk / pixclk; ++ tmp = (unsigned long long)clk; ++ tmp *= pixclk; ++ ++ do_div(tmp, 1000000000UL); ++ result = (unsigned int)tmp / 1000; + + dev_dbg(sfb->dev, "pixclk=%u, clk=%lu, div=%d (%lu)\n", + pixclk, clk, result, clk / result); +@@ -301,7 +303,7 @@ static int s3c_fb_set_par(struct fb_info + /* use window 0 as the basis for the lcd output timings */ + + if (win_no == 0) { +- clkdiv = s3c_fb_calc_pixclk(win_no, sfb, var->pixclock); ++ clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock); + + data = sfb->pdata->vidcon0; + data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR); diff --git a/queue-2.6.32/sched-fix-cpu_clock-in-nmis-on-config_have_unstable_sched_clock.patch b/queue-2.6.32/sched-fix-cpu_clock-in-nmis-on-config_have_unstable_sched_clock.patch new file mode 100644 index 00000000000..c215acd1028 --- /dev/null +++ b/queue-2.6.32/sched-fix-cpu_clock-in-nmis-on-config_have_unstable_sched_clock.patch @@ -0,0 +1,102 @@ +From b9f8fcd55bbdb037e5332dbdb7b494f0b70861ac Mon Sep 17 00:00:00 2001 +From: David Miller +Date: Sun, 13 Dec 2009 18:25:02 -0800 +Subject: sched: Fix cpu_clock() in NMIs, on !CONFIG_HAVE_UNSTABLE_SCHED_CLOCK + +From: David Miller + +commit b9f8fcd55bbdb037e5332dbdb7b494f0b70861ac upstream. + +Relax stable-sched-clock architectures to not save/disable/restore +hardirqs in cpu_clock(). + +The background is that I was trying to resolve a sparc64 perf +issue when I discovered this problem. + +On sparc64 I implement pseudo NMIs by simply running the kernel +at IRQ level 14 when local_irq_disable() is called, this allows +performance counter events to still come in at IRQ level 15. + +This doesn't work if any code in an NMI handler does +local_irq_save() or local_irq_disable() since the "disable" will +kick us back to cpu IRQ level 14 thus letting NMIs back in and +we recurse. + +The only path which that does that in the perf event IRQ +handling path is the code supporting frequency based events. It +uses cpu_clock(). + +cpu_clock() simply invokes sched_clock() with IRQs disabled. + +And that's a fundamental bug all on it's own, particularly for +the HAVE_UNSTABLE_SCHED_CLOCK case. NMIs can thus get into the +sched_clock() code interrupting the local IRQ disable code +sections of it. + +Furthermore, for the not-HAVE_UNSTABLE_SCHED_CLOCK case, the IRQ +disabling done by cpu_clock() is just pure overhead and +completely unnecessary. + +So the core problem is that sched_clock() is not NMI safe, but +we are invoking it from NMI contexts in the perf events code +(via cpu_clock()). + +A less important issue is the overhead of IRQ disabling when it +isn't necessary in cpu_clock(). + +CONFIG_HAVE_UNSTABLE_SCHED_CLOCK architectures are not +affected by this patch. + +Signed-off-by: David S. Miller +Acked-by: Peter Zijlstra +Cc: Mike Galbraith +LKML-Reference: <20091213.182502.215092085.davem@davemloft.net> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched_clock.c | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) + +--- a/kernel/sched_clock.c ++++ b/kernel/sched_clock.c +@@ -236,6 +236,18 @@ void sched_clock_idle_wakeup_event(u64 d + } + EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event); + ++unsigned long long cpu_clock(int cpu) ++{ ++ unsigned long long clock; ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ clock = sched_clock_cpu(cpu); ++ local_irq_restore(flags); ++ ++ return clock; ++} ++ + #else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ + + void sched_clock_init(void) +@@ -251,17 +263,12 @@ u64 sched_clock_cpu(int cpu) + return sched_clock(); + } + +-#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ + + unsigned long long cpu_clock(int cpu) + { +- unsigned long long clock; +- unsigned long flags; ++ return sched_clock_cpu(cpu); ++} + +- local_irq_save(flags); +- clock = sched_clock_cpu(cpu); +- local_irq_restore(flags); ++#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ + +- return clock; +-} + EXPORT_SYMBOL_GPL(cpu_clock); diff --git a/queue-2.6.32/sched-fix-task-priority-bug.patch b/queue-2.6.32/sched-fix-task-priority-bug.patch new file mode 100644 index 00000000000..0e3a9465ca8 --- /dev/null +++ b/queue-2.6.32/sched-fix-task-priority-bug.patch @@ -0,0 +1,57 @@ +From 57785df5ac53c70da9fb53696130f3c551bfe1f9 Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Fri, 4 Dec 2009 09:59:02 +0100 +Subject: sched: Fix task priority bug + +From: Peter Zijlstra + +commit 57785df5ac53c70da9fb53696130f3c551bfe1f9 upstream. + +83f9ac removed a call to effective_prio() in wake_up_new_task(), which +leads to tasks running at MAX_PRIO. + +This is caused by the idle thread being set to MAX_PRIO before forking +off init. O(1) used that to make sure idle was always preempted, CFS +uses check_preempt_curr_idle() for that so we can savely remove this bit +of legacy code. + +Reported-by: Mike Galbraith +Tested-by: Mike Galbraith +Signed-off-by: Peter Zijlstra +LKML-Reference: <1259754383.4003.610.camel@laptop> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -3177,10 +3177,6 @@ static void pull_task(struct rq *src_rq, + deactivate_task(src_rq, p, 0); + set_task_cpu(p, this_cpu); + activate_task(this_rq, p, 0); +- /* +- * Note that idle threads have a prio of MAX_PRIO, for this test +- * to be always true for them. +- */ + check_preempt_curr(this_rq, p, 0); + } + +@@ -6982,7 +6978,6 @@ void __cpuinit init_idle(struct task_str + __sched_fork(idle); + idle->se.exec_start = sched_clock(); + +- idle->prio = idle->normal_prio = MAX_PRIO; + cpumask_copy(&idle->cpus_allowed, cpumask_of(cpu)); + __set_task_cpu(idle, cpu); + +@@ -7686,7 +7681,6 @@ migration_call(struct notifier_block *nf + spin_lock_irq(&rq->lock); + update_rq_clock(rq); + deactivate_task(rq, rq->idle, 0); +- rq->idle->static_prio = MAX_PRIO; + __setscheduler(rq, rq->idle, SCHED_NORMAL, 0); + rq->idle->sched_class = &idle_sched_class; + migrate_dead_tasks(cpu); diff --git a/queue-2.6.32/serial-8250_pnp-add-a-new-fujitsu-wacom-tablet-pc-device.patch b/queue-2.6.32/serial-8250_pnp-add-a-new-fujitsu-wacom-tablet-pc-device.patch new file mode 100644 index 00000000000..27419e1f672 --- /dev/null +++ b/queue-2.6.32/serial-8250_pnp-add-a-new-fujitsu-wacom-tablet-pc-device.patch @@ -0,0 +1,33 @@ +From 3018aa4b1a46946dfd0ee73a533038f24e390539 Mon Sep 17 00:00:00 2001 +From: Ping +Date: Fri, 15 Jan 2010 17:01:07 -0800 +Subject: serial/8250_pnp: add a new Fujitsu Wacom Tablet PC device + +From: Ping + +commit 3018aa4b1a46946dfd0ee73a533038f24e390539 upstream. + +This is a new two finger touch Fujitsu Wacom Tablet PC. + +Signed-off-by: Ping Cheng +Cc: Alan Cox +Cc: Dmitry Torokhov +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/serial/8250_pnp.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/serial/8250_pnp.c ++++ b/drivers/serial/8250_pnp.c +@@ -354,6 +354,8 @@ static const struct pnp_device_id pnp_de + { "FUJ02E5", 0 }, + /* Fujitsu P-series tablet PC device */ + { "FUJ02E6", 0 }, ++ /* Fujitsu Wacom 2FGT Tablet PC device */ ++ { "FUJ02E7", 0 }, + /* + * LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in + * disguise) diff --git a/queue-2.6.32/series b/queue-2.6.32/series new file mode 100644 index 00000000000..e0eed3238fc --- /dev/null +++ b/queue-2.6.32/series @@ -0,0 +1,30 @@ +inotify-do-not-reuse-watch-descriptors.patch +inotify-only-warn-once-for-inotify-problems.patch +revert-drivers-video-s3c-fb.c-fix-clock-setting-for-samsung-soc-framebuffer.patch +memcg-ensure-list-is-empty-at-rmdir.patch +drm-i915-remove-loop-in-ironlake-interrupt-handler.patch +block-fix-incorrect-reporting-of-partition-alignment.patch +x86-mce-thermal-monitoring-depends-on-apic-being-enabled.patch +futexes-remove-rw-parameter-from-get_futex_key.patch +page-allocator-update-nr_free_pages-only-when-necessary.patch +x86-apic-use-physical-mode-for-ibm-summit-platforms.patch +edac-i5000_edac-critical-fix-panic-out-of-bounds.patch +x86-sgi-uv-fix-mapping-of-mmio-registers.patch +mfd-wm835x-gpio-direction-register-is-not-locked.patch +mfd-correct-wm835x-isink-ramp-time-defines.patch +alsa-hda-fix-missing-capture-mixer-for-alc861-660-codecs.patch +v4l-dvb-13868-gspca-sn9c20x-fix-test-of-unsigned.patch +reiserfs-truncate-blocks-not-used-by-a-write.patch +hid-add-device-ids-for-new-model-of-apple-wireless-keyboard.patch +pci-cardbus-add-a-fixup-hook-and-fix-powerpc.patch +megaraid_sas-remove-sysfs-poll_mode_io-world-writeable-permissions.patch +input-pmouse-move-sentelic-probe-down-the-list.patch +asus-laptop-add-lenovo-sl-hotkey-support.patch +sched-fix-cpu_clock-in-nmis-on-config_have_unstable_sched_clock.patch +sparc64-fix-nmi-programming-when-perf-events-are-active.patch +sparc64-fix-niagara2-perf-event-handling.patch +i2c-do-not-use-device-name-after-device_unregister.patch +i2c-pca-don-t-use-_interruptible.patch +serial-8250_pnp-add-a-new-fujitsu-wacom-tablet-pc-device.patch +sched-fix-task-priority-bug.patch +vfs-fix-vmtruncate-regression.patch diff --git a/queue-2.6.32/sparc64-fix-niagara2-perf-event-handling.patch b/queue-2.6.32/sparc64-fix-niagara2-perf-event-handling.patch new file mode 100644 index 00000000000..3dd8dafd2f9 --- /dev/null +++ b/queue-2.6.32/sparc64-fix-niagara2-perf-event-handling.patch @@ -0,0 +1,40 @@ +From 36a46e1b2d4213e308135eb5922313f61ea7d14d Mon Sep 17 00:00:00 2001 +From: David S. Miller +Date: Mon, 4 Jan 2010 23:16:03 -0800 +Subject: sparc64: Fix Niagara2 perf event handling. + +From: David S. Miller + +[ Upstream commit e04ed38d4e0cd32141f723560efcc8252b0241e2 ] + +For chips like Niagara2 that have true overflow indications +in the %pcr (which we don't actually need and don't use) +the interrupt signal persists until the overflow bits are +cleared by an explicit %pcr write. + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + arch/sparc/kernel/perf_event.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/arch/sparc/kernel/perf_event.c ++++ b/arch/sparc/kernel/perf_event.c +@@ -986,6 +986,17 @@ static int __kprobes perf_event_nmi_hand + data.addr = 0; + + cpuc = &__get_cpu_var(cpu_hw_events); ++ ++ /* If the PMU has the TOE IRQ enable bits, we need to do a ++ * dummy write to the %pcr to clear the overflow bits and thus ++ * the interrupt. ++ * ++ * Do this before we peek at the counters to determine ++ * overflow so we don't lose any events. ++ */ ++ if (sparc_pmu->irq_bit) ++ pcr_ops->write(cpuc->pcr); ++ + for (idx = 0; idx < MAX_HWEVENTS; idx++) { + struct perf_event *event = cpuc->events[idx]; + struct hw_perf_event *hwc; diff --git a/queue-2.6.32/sparc64-fix-nmi-programming-when-perf-events-are-active.patch b/queue-2.6.32/sparc64-fix-nmi-programming-when-perf-events-are-active.patch new file mode 100644 index 00000000000..606510cebab --- /dev/null +++ b/queue-2.6.32/sparc64-fix-nmi-programming-when-perf-events-are-active.patch @@ -0,0 +1,38 @@ +From 2a7c0c01541e67a9e132274e33fa2443fcf37c00 Mon Sep 17 00:00:00 2001 +From: David S. Miller +Date: Mon, 4 Jan 2010 15:37:04 -0800 +Subject: sparc64: Fix NMI programming when perf events are active. + +From: David S. Miller + +[ Upstream commit 8183e2b38480672a1f61d416812ac078ce94b67b ] + +If perf events are active, we should not reset the %pcr to +PCR_PIC_PRIV. That perf events code does the management. + +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc/kernel/nmi.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/sparc/kernel/nmi.c ++++ b/arch/sparc/kernel/nmi.c +@@ -96,7 +96,6 @@ notrace __kprobes void perfctr_irq(int i + int cpu = smp_processor_id(); + + clear_softint(1 << irq); +- pcr_ops->write(PCR_PIC_PRIV); + + local_cpu_data().__nmi_count++; + +@@ -105,6 +104,8 @@ notrace __kprobes void perfctr_irq(int i + if (notify_die(DIE_NMI, "nmi", regs, 0, + pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP) + touched = 1; ++ else ++ pcr_ops->write(PCR_PIC_PRIV); + + sum = kstat_irqs_cpu(0, cpu); + if (__get_cpu_var(nmi_touch)) { diff --git a/queue-2.6.32/v4l-dvb-13868-gspca-sn9c20x-fix-test-of-unsigned.patch b/queue-2.6.32/v4l-dvb-13868-gspca-sn9c20x-fix-test-of-unsigned.patch new file mode 100644 index 00000000000..ff46c5d1dde --- /dev/null +++ b/queue-2.6.32/v4l-dvb-13868-gspca-sn9c20x-fix-test-of-unsigned.patch @@ -0,0 +1,29 @@ +From c60503c1db76bd46577cc7ff4fafa033b675e0e5 Mon Sep 17 00:00:00 2001 +From: Roel Kluin +Date: Fri, 18 Dec 2009 12:22:43 -0300 +Subject: V4L/DVB (13868): gspca - sn9c20x: Fix test of unsigned. + +From: Roel Kluin + +commit c60503c1db76bd46577cc7ff4fafa033b675e0e5 upstream. + +Signed-off-by: Roel Kluin +Signed-off-by: Jean-Francois Moine +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/video/gspca/sn9c20x.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/media/video/gspca/sn9c20x.c ++++ b/drivers/media/video/gspca/sn9c20x.c +@@ -2319,7 +2319,7 @@ static void do_autogain(struct gspca_dev + } + } + if (avg_lum > MAX_AVG_LUM) { +- if (sd->gain - 1 >= 0) { ++ if (sd->gain >= 1) { + sd->gain--; + set_gain(gspca_dev); + } diff --git a/queue-2.6.32/vfs-fix-vmtruncate-regression.patch b/queue-2.6.32/vfs-fix-vmtruncate-regression.patch new file mode 100644 index 00000000000..0f3fceb8624 --- /dev/null +++ b/queue-2.6.32/vfs-fix-vmtruncate-regression.patch @@ -0,0 +1,66 @@ +From cedabed49b39b4319bccc059a63344b6232b619c Mon Sep 17 00:00:00 2001 +From: OGAWA Hirofumi +Date: Wed, 13 Jan 2010 21:14:09 +0900 +Subject: vfs: Fix vmtruncate() regression + +From: OGAWA Hirofumi + +commit cedabed49b39b4319bccc059a63344b6232b619c upstream. + +If __block_prepare_write() was failed in block_write_begin(), the +allocated blocks can be outside of ->i_size. + +But new truncate_pagecache() in vmtuncate() does nothing if new < old. +It means the above usage is not working anymore. + +So, this patch fixes it by removing "new < old" check. It would need +more cleanup/change. But, now -rc and truncate working is in progress, +so, this tried to fix it minimum change. + +Acked-by: Nick Piggin +Signed-off-by: OGAWA Hirofumi +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/truncate.c | 28 +++++++++++++--------------- + 1 file changed, 13 insertions(+), 15 deletions(-) + +--- a/mm/truncate.c ++++ b/mm/truncate.c +@@ -516,22 +516,20 @@ EXPORT_SYMBOL_GPL(invalidate_inode_pages + */ + void truncate_pagecache(struct inode *inode, loff_t old, loff_t new) + { +- if (new < old) { +- struct address_space *mapping = inode->i_mapping; ++ struct address_space *mapping = inode->i_mapping; + +- /* +- * unmap_mapping_range is called twice, first simply for +- * efficiency so that truncate_inode_pages does fewer +- * single-page unmaps. However after this first call, and +- * before truncate_inode_pages finishes, it is possible for +- * private pages to be COWed, which remain after +- * truncate_inode_pages finishes, hence the second +- * unmap_mapping_range call must be made for correctness. +- */ +- unmap_mapping_range(mapping, new + PAGE_SIZE - 1, 0, 1); +- truncate_inode_pages(mapping, new); +- unmap_mapping_range(mapping, new + PAGE_SIZE - 1, 0, 1); +- } ++ /* ++ * unmap_mapping_range is called twice, first simply for ++ * efficiency so that truncate_inode_pages does fewer ++ * single-page unmaps. However after this first call, and ++ * before truncate_inode_pages finishes, it is possible for ++ * private pages to be COWed, which remain after ++ * truncate_inode_pages finishes, hence the second ++ * unmap_mapping_range call must be made for correctness. ++ */ ++ unmap_mapping_range(mapping, new + PAGE_SIZE - 1, 0, 1); ++ truncate_inode_pages(mapping, new); ++ unmap_mapping_range(mapping, new + PAGE_SIZE - 1, 0, 1); + } + EXPORT_SYMBOL(truncate_pagecache); + diff --git a/queue-2.6.32/x86-apic-use-physical-mode-for-ibm-summit-platforms.patch b/queue-2.6.32/x86-apic-use-physical-mode-for-ibm-summit-platforms.patch new file mode 100644 index 00000000000..53bffb26b5d --- /dev/null +++ b/queue-2.6.32/x86-apic-use-physical-mode-for-ibm-summit-platforms.patch @@ -0,0 +1,45 @@ +From dfea91d5a7c795fd6f4e1a97489a98e4e767463e Mon Sep 17 00:00:00 2001 +From: Suresh Siddha +Date: Mon, 18 Jan 2010 12:10:48 -0800 +Subject: x86, apic: use physical mode for IBM summit platforms + +From: Suresh Siddha + +commit dfea91d5a7c795fd6f4e1a97489a98e4e767463e upstream. + +Chris McDermott from IBM confirmed that hurricane chipset in IBM summit +platforms doesn't support logical flat mode. Irrespective of the other +things like apic_id's, total number of logical cpu's, Linux kernel +should default to physical mode for this system. + +The 32-bit kernel does so using the OEM checks for the IBM summit +platform. Add a similar OEM platform check for the 64bit kernel too. + +Otherwise the linux kernel boot can hang on this platform under certain +bios/platform settings. + +Signed-off-by: Suresh Siddha +Tested-by: Ananth N Mavinakayanahalli +Cc: Chris McDermott +Cc: Yinghai Lu +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/apic/apic_flat_64.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/x86/kernel/apic/apic_flat_64.c ++++ b/arch/x86/kernel/apic/apic_flat_64.c +@@ -240,6 +240,11 @@ static int physflat_acpi_madt_oem_check( + printk(KERN_DEBUG "system APIC only can use physical flat"); + return 1; + } ++ ++ if (!strncmp(oem_id, "IBM", 3) && !strncmp(oem_table_id, "EXA", 3)) { ++ printk(KERN_DEBUG "IBM Summit detected, will use apic physical"); ++ return 1; ++ } + #endif + + return 0; diff --git a/queue-2.6.32/x86-mce-thermal-monitoring-depends-on-apic-being-enabled.patch b/queue-2.6.32/x86-mce-thermal-monitoring-depends-on-apic-being-enabled.patch new file mode 100644 index 00000000000..85a279fd60c --- /dev/null +++ b/queue-2.6.32/x86-mce-thermal-monitoring-depends-on-apic-being-enabled.patch @@ -0,0 +1,47 @@ +From 485a2e1973fd9f98c2c6776e66ac4721882b69e0 Mon Sep 17 00:00:00 2001 +From: Cyrill Gorcunov +Date: Mon, 14 Dec 2009 17:56:34 +0900 +Subject: x86, mce: Thermal monitoring depends on APIC being enabled + +From: Cyrill Gorcunov + +commit 485a2e1973fd9f98c2c6776e66ac4721882b69e0 upstream. + +Add check if APIC is not disabled since thermal +monitoring depends on it. As only apic gets disabled +we should not try to install "thermal monitor" vector, +print out that thermal monitoring is enabled and etc... + +Note that "Intel Correct Machine Check Interrupts" already +has such a check. + +Also I decided to not add cpu_has_apic check into +mcheck_intel_therm_init since even if it'll call apic_read on +disabled apic -- it's safe here and allow us to save a few code +bytes. + +Reported-by: Thomas Gleixner +Signed-off-by: Cyrill Gorcunov +Signed-off-by: Hidetoshi Seto +LKML-Reference: <4B25FDC2.3020401@jp.fujitsu.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/cpu/mcheck/therm_throt.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c ++++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c +@@ -274,8 +274,9 @@ void intel_init_thermal(struct cpuinfo_x + int tm2 = 0; + u32 l, h; + +- /* Thermal monitoring depends on ACPI and clock modulation*/ +- if (!cpu_has(c, X86_FEATURE_ACPI) || !cpu_has(c, X86_FEATURE_ACC)) ++ /* Thermal monitoring depends on APIC, ACPI and clock modulation */ ++ if (!cpu_has_apic || !cpu_has(c, X86_FEATURE_ACPI) || ++ !cpu_has(c, X86_FEATURE_ACC)) + return; + + /* diff --git a/queue-2.6.32/x86-sgi-uv-fix-mapping-of-mmio-registers.patch b/queue-2.6.32/x86-sgi-uv-fix-mapping-of-mmio-registers.patch new file mode 100644 index 00000000000..6481c50551f --- /dev/null +++ b/queue-2.6.32/x86-sgi-uv-fix-mapping-of-mmio-registers.patch @@ -0,0 +1,74 @@ +From fcfbb2b5facd65efa7284cc315225bfe3d1856c2 Mon Sep 17 00:00:00 2001 +From: Mike Travis +Date: Fri, 8 Jan 2010 12:13:54 -0800 +Subject: x86: SGI UV: Fix mapping of MMIO registers + +From: Mike Travis + +commit fcfbb2b5facd65efa7284cc315225bfe3d1856c2 upstream. + +This fixes the problem of the initialization code not correctly +mapping the entire MMIO space on a UV system. A side effect is +the map_high() interface needed to be changed to accommodate +different address and size shifts. + +Signed-off-by: Mike Travis +Reviewed-by: Mike Habeck +Cc: Jack Steiner +Cc: Linus Torvalds +LKML-Reference: <4B479202.7080705@sgi.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/apic/x2apic_uv_x.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +--- a/arch/x86/kernel/apic/x2apic_uv_x.c ++++ b/arch/x86/kernel/apic/x2apic_uv_x.c +@@ -364,13 +364,13 @@ static __init void get_lowmem_redirect(u + + enum map_type {map_wb, map_uc}; + +-static __init void map_high(char *id, unsigned long base, int shift, +- int max_pnode, enum map_type map_type) ++static __init void map_high(char *id, unsigned long base, int pshift, ++ int bshift, int max_pnode, enum map_type map_type) + { + unsigned long bytes, paddr; + +- paddr = base << shift; +- bytes = (1UL << shift) * (max_pnode + 1); ++ paddr = base << pshift; ++ bytes = (1UL << bshift) * (max_pnode + 1); + printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr, + paddr + bytes); + if (map_type == map_uc) +@@ -386,7 +386,7 @@ static __init void map_gru_high(int max_ + + gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR); + if (gru.s.enable) +- map_high("GRU", gru.s.base, shift, max_pnode, map_wb); ++ map_high("GRU", gru.s.base, shift, shift, max_pnode, map_wb); + } + + static __init void map_mmr_high(int max_pnode) +@@ -396,7 +396,7 @@ static __init void map_mmr_high(int max_ + + mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR); + if (mmr.s.enable) +- map_high("MMR", mmr.s.base, shift, max_pnode, map_uc); ++ map_high("MMR", mmr.s.base, shift, shift, max_pnode, map_uc); + } + + static __init void map_mmioh_high(int max_pnode) +@@ -406,7 +406,8 @@ static __init void map_mmioh_high(int ma + + mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR); + if (mmioh.s.enable) +- map_high("MMIOH", mmioh.s.base, shift, max_pnode, map_uc); ++ map_high("MMIOH", mmioh.s.base, shift, mmioh.s.m_io, ++ max_pnode, map_uc); + } + + static __init void uv_rtc_init(void) -- 2.47.3