]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.37 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Feb 2011 03:14:11 +0000 (19:14 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Feb 2011 03:14:11 +0000 (19:14 -0800)
queue-2.6.37/drm-radeon-kms-add-missing-frac-fb-div-flag-for-dce4.patch [new file with mode: 0644]
queue-2.6.37/fs-partitions-validate-map_count-in-mac-partition-tables.patch [new file with mode: 0644]
queue-2.6.37/pm-hibernate-return-error-code-when-alloc_image_page-fails.patch [new file with mode: 0644]
queue-2.6.37/series
queue-2.6.37/x86-mrst-set-correct-apb-timer-irq-affinity-for-secondary-cpu.patch [new file with mode: 0644]

diff --git a/queue-2.6.37/drm-radeon-kms-add-missing-frac-fb-div-flag-for-dce4.patch b/queue-2.6.37/drm-radeon-kms-add-missing-frac-fb-div-flag-for-dce4.patch
new file mode 100644 (file)
index 0000000..b3dfdc2
--- /dev/null
@@ -0,0 +1,51 @@
+From 9f4283f49f0a96a64c5a45fe56f0f8c942885eef Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher@gmail.com>
+Date: Wed, 16 Feb 2011 21:17:04 -0500
+Subject: drm/radeon/kms: add missing frac fb div flag for dce4+
+
+From: Alex Deucher <alexdeucher@gmail.com>
+
+commit 9f4283f49f0a96a64c5a45fe56f0f8c942885eef upstream.
+
+The fixed ref/post dividers are set by the AdjustPll table
+rather than the ss info table on dce4+.  Make sure we enable
+the fractional feedback dividers when using a fixed post
+or ref divider on them as well.
+
+Fixes:
+https://bugzilla.kernel.org/show_bug.cgi?id=29272
+
+Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/radeon/atombios_crtc.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/atombios_crtc.c
++++ b/drivers/gpu/drm/radeon/atombios_crtc.c
+@@ -533,9 +533,9 @@ static u32 atombios_adjust_pll(struct dr
+                       /* use recommended ref_div for ss */
+                       if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
+-                              pll->flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
+                               if (ss_enabled) {
+                                       if (ss->refdiv) {
++                                              pll->flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
+                                               pll->flags |= RADEON_PLL_USE_REF_DIV;
+                                               pll->reference_div = ss->refdiv;
+                                               if (ASIC_IS_AVIVO(rdev))
+@@ -650,10 +650,12 @@ static u32 atombios_adjust_pll(struct dr
+                                                  index, (uint32_t *)&args);
+                               adjusted_clock = le32_to_cpu(args.v3.sOutput.ulDispPllFreq) * 10;
+                               if (args.v3.sOutput.ucRefDiv) {
++                                      pll->flags |= RADEON_PLL_USE_FRAC_FB_DIV;
+                                       pll->flags |= RADEON_PLL_USE_REF_DIV;
+                                       pll->reference_div = args.v3.sOutput.ucRefDiv;
+                               }
+                               if (args.v3.sOutput.ucPostDiv) {
++                                      pll->flags |= RADEON_PLL_USE_FRAC_FB_DIV;
+                                       pll->flags |= RADEON_PLL_USE_POST_DIV;
+                                       pll->post_div = args.v3.sOutput.ucPostDiv;
+                               }
diff --git a/queue-2.6.37/fs-partitions-validate-map_count-in-mac-partition-tables.patch b/queue-2.6.37/fs-partitions-validate-map_count-in-mac-partition-tables.patch
new file mode 100644 (file)
index 0000000..d22c3d1
--- /dev/null
@@ -0,0 +1,66 @@
+From fa7ea87a057958a8b7926c1a60a3ca6d696328ed Mon Sep 17 00:00:00 2001
+From: Timo Warns <warns@pre-sense.de>
+Date: Thu, 17 Feb 2011 22:27:40 +0100
+Subject: fs/partitions: Validate map_count in Mac partition tables
+
+From: Timo Warns <warns@pre-sense.de>
+
+commit fa7ea87a057958a8b7926c1a60a3ca6d696328ed upstream.
+
+Validate number of blocks in map and remove redundant variable.
+
+Signed-off-by: Timo Warns <warns@pre-sense.de>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/partitions/mac.c |   17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+--- a/fs/partitions/mac.c
++++ b/fs/partitions/mac.c
+@@ -29,10 +29,9 @@ static inline void mac_fix_string(char *
+ int mac_partition(struct parsed_partitions *state)
+ {
+-      int slot = 1;
+       Sector sect;
+       unsigned char *data;
+-      int blk, blocks_in_map;
++      int slot, blocks_in_map;
+       unsigned secsize;
+ #ifdef CONFIG_PPC_PMAC
+       int found_root = 0;
+@@ -59,10 +58,14 @@ int mac_partition(struct parsed_partitio
+               put_dev_sector(sect);
+               return 0;               /* not a MacOS disk */
+       }
+-      strlcat(state->pp_buf, " [mac]", PAGE_SIZE);
+       blocks_in_map = be32_to_cpu(part->map_count);
+-      for (blk = 1; blk <= blocks_in_map; ++blk) {
+-              int pos = blk * secsize;
++      if (blocks_in_map < 0 || blocks_in_map >= DISK_MAX_PARTS) {
++              put_dev_sector(sect);
++              return 0;
++      }
++      strlcat(state->pp_buf, " [mac]", PAGE_SIZE);
++      for (slot = 1; slot <= blocks_in_map; ++slot) {
++              int pos = slot * secsize;
+               put_dev_sector(sect);
+               data = read_part_sector(state, pos/512, &sect);
+               if (!data)
+@@ -113,13 +116,11 @@ int mac_partition(struct parsed_partitio
+                       }
+                       if (goodness > found_root_goodness) {
+-                              found_root = blk;
++                              found_root = slot;
+                               found_root_goodness = goodness;
+                       }
+               }
+ #endif /* CONFIG_PPC_PMAC */
+-
+-              ++slot;
+       }
+ #ifdef CONFIG_PPC_PMAC
+       if (found_root_goodness)
diff --git a/queue-2.6.37/pm-hibernate-return-error-code-when-alloc_image_page-fails.patch b/queue-2.6.37/pm-hibernate-return-error-code-when-alloc_image_page-fails.patch
new file mode 100644 (file)
index 0000000..6742073
--- /dev/null
@@ -0,0 +1,47 @@
+From 2e725a065b0153f0c449318da1923a120477633d Mon Sep 17 00:00:00 2001
+From: Stanislaw Gruszka <stf_xl@pop3.wp.pl>
+Date: Sat, 12 Feb 2011 21:06:51 +0100
+Subject: PM / Hibernate: Return error code when alloc_image_page() fails
+
+From: Stanislaw Gruszka <stf_xl@pop3.wp.pl>
+
+commit 2e725a065b0153f0c449318da1923a120477633d upstream.
+
+Currently we return 0 in swsusp_alloc() when alloc_image_page() fails.
+Fix that.  Also remove unneeded "error" variable since the only
+useful value of error is -ENOMEM.
+
+[rjw: Fixed up the changelog and changed subject.]
+
+Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/power/snapshot.c |    7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/kernel/power/snapshot.c
++++ b/kernel/power/snapshot.c
+@@ -1519,11 +1519,8 @@ static int
+ swsusp_alloc(struct memory_bitmap *orig_bm, struct memory_bitmap *copy_bm,
+               unsigned int nr_pages, unsigned int nr_highmem)
+ {
+-      int error = 0;
+-
+       if (nr_highmem > 0) {
+-              error = get_highmem_buffer(PG_ANY);
+-              if (error)
++              if (get_highmem_buffer(PG_ANY))
+                       goto err_out;
+               if (nr_highmem > alloc_highmem) {
+                       nr_highmem -= alloc_highmem;
+@@ -1546,7 +1543,7 @@ swsusp_alloc(struct memory_bitmap *orig_
+  err_out:
+       swsusp_free();
+-      return error;
++      return -ENOMEM;
+ }
+ asmlinkage int swsusp_save(void)
index 16769152e8697e3c5f452fad24b06b5e942a7c80..b00e808346590864acef70265569b9541c49cd05 100644 (file)
@@ -32,3 +32,7 @@ acpi-wakeup-enable-button-gpes-unconditionally-during-initialization.patch
 nfsd-correctly-handle-return-value-from-nfsd_map_name_to_.patch
 x86-hotplug-fix-powersavings-with-offlined-cores-on-amd.patch
 s390-remove-task_show_regs.patch
+x86-mrst-set-correct-apb-timer-irq-affinity-for-secondary-cpu.patch
+pm-hibernate-return-error-code-when-alloc_image_page-fails.patch
+drm-radeon-kms-add-missing-frac-fb-div-flag-for-dce4.patch
+fs-partitions-validate-map_count-in-mac-partition-tables.patch
diff --git a/queue-2.6.37/x86-mrst-set-correct-apb-timer-irq-affinity-for-secondary-cpu.patch b/queue-2.6.37/x86-mrst-set-correct-apb-timer-irq-affinity-for-secondary-cpu.patch
new file mode 100644 (file)
index 0000000..85cd338
--- /dev/null
@@ -0,0 +1,47 @@
+From jacob.jun.pan@linux.intel.com  Thu Feb 17 19:06:50 2011
+From: jacob.jun.pan@linux.intel.com
+Date: Thu, 17 Feb 2011 16:58:21 -0800
+Subject: x86, mrst: Set correct APB timer IRQ affinity for secondary cpu
+To: <stable@kernel.org>, <gregkh@suse.de>
+Cc: "H. Peter Anvin" <hpa@linux.intel.com>, Jacob Pan <jacob.jun.pan@linux.intel.com>
+Message-ID: <1297990701-12440-1-git-send-email-jacob.jun.pan@linux.intel.com>
+
+From: Jacob Pan <jacob.jun.pan@linux.intel.com>
+
+This is a backport for 2.6.37 stable. The original commit ID is
+6550904ddbc3c286798a87edf95eeebcc62bc58a
+
+Offlining the secondary CPU causes the timer irq affinity to be set to
+CPU 0. When the secondary CPU is back online again, the wrong irq
+affinity will be used.
+
+This patch ensures secondary per CPU timer always has the correct
+IRQ affinity when enabled.
+
+Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
+LKML-Reference: <1294963604-18111-1-git-send-email-jacob.jun.pan@linux.intel.com>
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/apb_timer.c |    8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/kernel/apb_timer.c
++++ b/arch/x86/kernel/apb_timer.c
+@@ -313,10 +313,12 @@ static void apbt_setup_irq(struct apbt_d
+       if (adev->irq == 0)
+               return;
++      irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT);
++      irq_set_affinity(adev->irq, cpumask_of(adev->cpu));
++      /* APB timer irqs are set up as mp_irqs, timer is edge type */
++      __set_irq_handler(adev->irq, handle_edge_irq, 0, "edge");
++
+       if (system_state == SYSTEM_BOOTING) {
+-              irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT);
+-              /* APB timer irqs are set up as mp_irqs, timer is edge type */
+-              __set_irq_handler(adev->irq, handle_edge_irq, 0, "edge");
+               if (request_irq(adev->irq, apbt_interrupt_handler,
+                               IRQF_TIMER | IRQF_DISABLED | IRQF_NOBALANCING,
+                               adev->name, adev)) {