From: Greg Kroah-Hartman Date: Thu, 24 Jun 2010 23:22:55 +0000 (-0700) Subject: .32 patches X-Git-Tag: v2.6.31.14~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e06a0fe0f7cd659434069eb9e696f3e21ce8b9c9;p=thirdparty%2Fkernel%2Fstable-queue.git .32 patches --- diff --git a/queue-2.6.32/alsa-hda-use-lpib-for-an-asus-device.patch b/queue-2.6.32/alsa-hda-use-lpib-for-an-asus-device.patch new file mode 100644 index 00000000000..dbb55e3fa45 --- /dev/null +++ b/queue-2.6.32/alsa-hda-use-lpib-for-an-asus-device.patch @@ -0,0 +1,40 @@ +From dd37f8e8659bc617c3f2a84e007a4824ccdac458 Mon Sep 17 00:00:00 2001 +From: Daniel T Chen +Date: Sun, 30 May 2010 01:17:03 -0400 +Subject: ALSA: hda: Use LPIB for an ASUS device + +From: Daniel T Chen + +commit dd37f8e8659bc617c3f2a84e007a4824ccdac458 upstream. + +BugLink: https://launchpad.net/bugs/465942 + +Symptom: On the reporter's ASUS device, using PulseAudio in Ubuntu 10.04 +LTS results in the PA daemon crashing shortly after attempting to select +capture or to configure the audio hardware profile. + +Test case: Using Ubuntu 10.04 LTS (Linux 2.6.32.12), Linux 2.6.33, or +Linux 2.6.34, adjust the HDA device's capture volume with PulseAudio. + +Resolution: add SSID for this machine to the position_fix quirk table, +explicitly specifying the LPIB method. + +Reported-and-Tested-By: Irihapeti +Signed-off-by: Daniel T Chen +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_intel.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -2232,6 +2232,7 @@ static struct snd_pci_quirk position_fix + SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), ++ SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), + SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba A100-259", POS_FIX_LPIB), diff --git a/queue-2.6.32/alsa-hda-use-lpib-for-another-mainboard.patch b/queue-2.6.32/alsa-hda-use-lpib-for-another-mainboard.patch new file mode 100644 index 00000000000..b19e035b83f --- /dev/null +++ b/queue-2.6.32/alsa-hda-use-lpib-for-another-mainboard.patch @@ -0,0 +1,40 @@ +From b90c076424da8166797bdc34187660fd0124f530 Mon Sep 17 00:00:00 2001 +From: Daniel T Chen +Date: Sun, 30 May 2010 19:31:41 -0400 +Subject: ALSA: hda: Use LPIB for another mainboard + +From: Daniel T Chen + +commit b90c076424da8166797bdc34187660fd0124f530 upstream. + +BugLink: https://launchpad.net/bugs/580749 + +Symptom: on the original reporter's VIA VT1708-based board, the +PulseAudio daemon dies shortly after the user attempts to play an audio +file. + +Test case: boot from Ubuntu 10.04 LTS live cd; attempt to play an audio +file. + +Resolution: add SSID for the original reporter's hardware to the +position_fix quirk table, explicitly specifying the LPIB method. + +Reported-and-Tested-By: Harald +Signed-off-by: Daniel T Chen +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_intel.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -2241,6 +2241,7 @@ static struct snd_pci_quirk position_fix + SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1565, 0x8218, "Biostar Microtech", POS_FIX_LPIB), ++ SND_PCI_QUIRK(0x1849, 0x0888, "775Dual-VSTA", POS_FIX_LPIB), + SND_PCI_QUIRK(0x8086, 0x2503, "DG965OT AAD63733-203", POS_FIX_LPIB), + SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB), + {} diff --git a/queue-2.6.32/alsa-hda-use-lpib-for-asus-m2v.patch b/queue-2.6.32/alsa-hda-use-lpib-for-asus-m2v.patch new file mode 100644 index 00000000000..6455daf3375 --- /dev/null +++ b/queue-2.6.32/alsa-hda-use-lpib-for-asus-m2v.patch @@ -0,0 +1,41 @@ +From 9f75c1b12c5ef392ddcea575b13560842c28b1b3 Mon Sep 17 00:00:00 2001 +From: Daniel T Chen +Date: Sun, 30 May 2010 13:08:41 -0400 +Subject: ALSA: hda: Use LPIB for ASUS M2V + +From: Daniel T Chen + +commit 9f75c1b12c5ef392ddcea575b13560842c28b1b3 upstream. + +BugLink: https://launchpad.net/bugs/587546 + +Symptom: On the reporter's ASUS M2V, using PulseAudio in Ubuntu 10.04 LTS +results in the PA daemon crashing shortly after attempting playback of an +audio file. + +Test case: Using Ubuntu 10.04 LTS (Linux 2.6.32.12), Linux 2.6.33, or +Linux 2.6.34, attempt playback of an audio file while PulseAudio is +active. + +Resolution: add SSID for this machine to the position_fix quirk table, +explicitly specifying the LPIB method. + +Reported-and-Tested-By: D Tangman +Signed-off-by: Daniel T Chen +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_intel.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -2233,6 +2233,7 @@ static struct snd_pci_quirk position_fix + SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), ++ SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), + SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB), + SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba A100-259", POS_FIX_LPIB), diff --git a/queue-2.6.32/alsa-hda-use-mb31-quirk-for-an-imac-model.patch b/queue-2.6.32/alsa-hda-use-mb31-quirk-for-an-imac-model.patch new file mode 100644 index 00000000000..6d3f951a3cd --- /dev/null +++ b/queue-2.6.32/alsa-hda-use-mb31-quirk-for-an-imac-model.patch @@ -0,0 +1,39 @@ +From 26fd74fc01991a18f0e3bd54f8b1b75945ee3dbb Mon Sep 17 00:00:00 2001 +From: Daniel T Chen +Date: Sun, 30 May 2010 09:55:23 -0400 +Subject: ALSA: hda: Use mb31 quirk for an iMac model + +From: Daniel T Chen + +commit 26fd74fc01991a18f0e3bd54f8b1b75945ee3dbb upstream. + +BugLink: https://launchpad.net/bugs/542550 + +Symptom: On the reporter's iMac, in Ubuntu 10.04 LTS neither playback +nor capture appear audible out-of-the-box. + +Test case: Boot from an Ubuntu 10.04 LTS live cd or from an installed +configuration and attempt to play or capture audio. + +Resolution: Specify the mb31 quirk for this machine in the codec SSID +table. + +Reported-and-Tested-By: f3a97 +Signed-off-by: Daniel T Chen +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -8937,6 +8937,7 @@ static struct snd_pci_quirk alc882_ssid_ + SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_IMAC24), + SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_IMAC24), + SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC885_MBP3), ++ SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889A_MB31), + SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889A_MB31), + SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), + SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), diff --git a/queue-2.6.32/asoc-fix-db-scales-for-wm835x.patch b/queue-2.6.32/asoc-fix-db-scales-for-wm835x.patch new file mode 100644 index 00000000000..9f04a52ac0c --- /dev/null +++ b/queue-2.6.32/asoc-fix-db-scales-for-wm835x.patch @@ -0,0 +1,32 @@ +From e6a08c5a8990102bcd1f4bae84b668da6c23caa9 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Tue, 25 May 2010 10:46:05 -0700 +Subject: ASoC: Fix dB scales for WM835x + +From: Mark Brown + +commit e6a08c5a8990102bcd1f4bae84b668da6c23caa9 upstream. + +These should be regular rather than linear scales. + +Signed-off-by: Mark Brown +Acked-by: Liam Girdwood +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8350.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/soc/codecs/wm8350.c ++++ b/sound/soc/codecs/wm8350.c +@@ -423,8 +423,8 @@ static const struct soc_enum wm8350_enum + SOC_ENUM_SINGLE(WM8350_INPUT_MIXER_VOLUME, 15, 2, wm8350_lr), + }; + +-static DECLARE_TLV_DB_LINEAR(pre_amp_tlv, -1200, 3525); +-static DECLARE_TLV_DB_LINEAR(out_pga_tlv, -5700, 600); ++static DECLARE_TLV_DB_SCALE(pre_amp_tlv, -1200, 3525, 0); ++static DECLARE_TLV_DB_SCALE(out_pga_tlv, -5700, 600, 0); + static DECLARE_TLV_DB_SCALE(dac_pcm_tlv, -7163, 36, 1); + static DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -12700, 50, 1); + static DECLARE_TLV_DB_SCALE(out_mix_tlv, -1500, 300, 1); diff --git a/queue-2.6.32/asoc-fix-db-scales-for-wm8400.patch b/queue-2.6.32/asoc-fix-db-scales-for-wm8400.patch new file mode 100644 index 00000000000..502d81f7c08 --- /dev/null +++ b/queue-2.6.32/asoc-fix-db-scales-for-wm8400.patch @@ -0,0 +1,60 @@ +From 3351e9fbb0fda6498ee149ee88c67f5849813c57 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Tue, 25 May 2010 10:48:31 -0700 +Subject: ASoC: Fix dB scales for WM8400 + +From: Mark Brown + +commit 3351e9fbb0fda6498ee149ee88c67f5849813c57 upstream. + +These scales should be regular, not linear. + +Signed-off-by: Mark Brown +Acked-by: Liam Girdwood +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8400.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +--- a/sound/soc/codecs/wm8400.c ++++ b/sound/soc/codecs/wm8400.c +@@ -106,21 +106,21 @@ static void wm8400_codec_reset(struct sn + wm8400_reset_codec_reg_cache(wm8400->wm8400); + } + +-static const DECLARE_TLV_DB_LINEAR(rec_mix_tlv, -1500, 600); ++static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0); + +-static const DECLARE_TLV_DB_LINEAR(in_pga_tlv, -1650, 3000); ++static const DECLARE_TLV_DB_SCALE(in_pga_tlv, -1650, 3000, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_mix_tlv, -2100, 0); ++static const DECLARE_TLV_DB_SCALE(out_mix_tlv, -2100, 0, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_pga_tlv, -7300, 600); ++static const DECLARE_TLV_DB_SCALE(out_pga_tlv, -7300, 600, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_omix_tlv, -600, 0); ++static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_dac_tlv, -7163, 0); ++static const DECLARE_TLV_DB_SCALE(out_dac_tlv, -7163, 0, 0); + +-static const DECLARE_TLV_DB_LINEAR(in_adc_tlv, -7163, 1763); ++static const DECLARE_TLV_DB_SCALE(in_adc_tlv, -7163, 1763, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_sidetone_tlv, -3600, 0); ++static const DECLARE_TLV_DB_SCALE(out_sidetone_tlv, -3600, 0, 0); + + static int wm8400_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +@@ -439,7 +439,7 @@ static int outmixer_event (struct snd_so + /* INMIX dB values */ + static const unsigned int in_mix_tlv[] = { + TLV_DB_RANGE_HEAD(1), +- 0,7, TLV_DB_LINEAR_ITEM(-1200, 600), ++ 0,7, TLV_DB_SCALE_ITEM(-1200, 600, 0), + }; + + /* Left In PGA Connections */ diff --git a/queue-2.6.32/asoc-fix-db-scales-for-wm8990.patch b/queue-2.6.32/asoc-fix-db-scales-for-wm8990.patch new file mode 100644 index 00000000000..2e658f604f0 --- /dev/null +++ b/queue-2.6.32/asoc-fix-db-scales-for-wm8990.patch @@ -0,0 +1,60 @@ +From f68596c6d8711650722b2a54328a088a2c21bc5b Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Tue, 25 May 2010 10:49:00 -0700 +Subject: ASoC: Fix dB scales for WM8990 + +From: Mark Brown + +commit f68596c6d8711650722b2a54328a088a2c21bc5b upstream. + +These should be regular, not linear. + +Signed-off-by: Mark Brown +Acked-by: Liam Girdwood +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8990.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +--- a/sound/soc/codecs/wm8990.c ++++ b/sound/soc/codecs/wm8990.c +@@ -110,21 +110,21 @@ static const u16 wm8990_reg[] = { + + #define wm8990_reset(c) snd_soc_write(c, WM8990_RESET, 0) + +-static const DECLARE_TLV_DB_LINEAR(rec_mix_tlv, -1500, 600); ++static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0); + +-static const DECLARE_TLV_DB_LINEAR(in_pga_tlv, -1650, 3000); ++static const DECLARE_TLV_DB_SCALE(in_pga_tlv, -1650, 3000, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_mix_tlv, 0, -2100); ++static const DECLARE_TLV_DB_SCALE(out_mix_tlv, 0, -2100, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_pga_tlv, -7300, 600); ++static const DECLARE_TLV_DB_SCALE(out_pga_tlv, -7300, 600, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_omix_tlv, -600, 0); ++static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_dac_tlv, -7163, 0); ++static const DECLARE_TLV_DB_SCALE(out_dac_tlv, -7163, 0, 0); + +-static const DECLARE_TLV_DB_LINEAR(in_adc_tlv, -7163, 1763); ++static const DECLARE_TLV_DB_SCALE(in_adc_tlv, -7163, 1763, 0); + +-static const DECLARE_TLV_DB_LINEAR(out_sidetone_tlv, -3600, 0); ++static const DECLARE_TLV_DB_SCALE(out_sidetone_tlv, -3600, 0, 0); + + static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +@@ -450,7 +450,7 @@ static int outmixer_event(struct snd_soc + /* INMIX dB values */ + static const unsigned int in_mix_tlv[] = { + TLV_DB_RANGE_HEAD(1), +- 0, 7, TLV_DB_LINEAR_ITEM(-1200, 600), ++ 0, 7, TLV_DB_SCALE_ITEM(-1200, 600, 0), + }; + + /* Left In PGA Connections */ diff --git a/queue-2.6.32/clocksource-sh_cmt-compute-mult-and-shift-before-registration.patch b/queue-2.6.32/clocksource-sh_cmt-compute-mult-and-shift-before-registration.patch new file mode 100644 index 00000000000..5b6801d7625 --- /dev/null +++ b/queue-2.6.32/clocksource-sh_cmt-compute-mult-and-shift-before-registration.patch @@ -0,0 +1,62 @@ +From f4d7c3565c1692c54d9152b52090fe73f0029e37 Mon Sep 17 00:00:00 2001 +From: Paul Mundt +Date: Wed, 2 Jun 2010 17:10:44 +0900 +Subject: clocksource: sh_cmt: compute mult and shift before registration + +From: Paul Mundt + +commit f4d7c3565c1692c54d9152b52090fe73f0029e37 upstream. + +Based on the sh_tmu change in 66f49121ffa41a19c59965b31b046d8368fec3c7 +("clocksource: sh_tmu: compute mult and shift before registration"). +The same issues impact the sh_cmt driver, so we take the same approach +here. + +Signed-off-by: Paul Mundt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clocksource/sh_cmt.c | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +--- a/drivers/clocksource/sh_cmt.c ++++ b/drivers/clocksource/sh_cmt.c +@@ -413,18 +413,10 @@ static cycle_t sh_cmt_clocksource_read(s + static int sh_cmt_clocksource_enable(struct clocksource *cs) + { + struct sh_cmt_priv *p = cs_to_sh_cmt(cs); +- int ret; + + p->total_cycles = 0; + +- ret = sh_cmt_start(p, FLAG_CLOCKSOURCE); +- if (ret) +- return ret; +- +- /* TODO: calculate good shift from rate and counter bit width */ +- cs->shift = 0; +- cs->mult = clocksource_hz2mult(p->rate, cs->shift); +- return 0; ++ return sh_cmt_start(p, FLAG_CLOCKSOURCE); + } + + static void sh_cmt_clocksource_disable(struct clocksource *cs) +@@ -444,7 +436,18 @@ static int sh_cmt_register_clocksource(s + cs->disable = sh_cmt_clocksource_disable; + cs->mask = CLOCKSOURCE_MASK(sizeof(unsigned long) * 8); + cs->flags = CLOCK_SOURCE_IS_CONTINUOUS; ++ ++ /* clk_get_rate() needs an enabled clock */ ++ clk_enable(p->clk); ++ p->rate = clk_get_rate(p->clk) / (p->width == 16) ? 512 : 8; ++ clk_disable(p->clk); ++ ++ /* TODO: calculate good shift from rate and counter bit width */ ++ cs->shift = 10; ++ cs->mult = clocksource_hz2mult(p->rate, cs->shift); ++ + pr_info("sh_cmt: %s used as clock source\n", cs->name); ++ + clocksource_register(cs); + return 0; + } diff --git a/queue-2.6.32/do_generic_file_read-clear-page-errors-when-issuing-a-fresh-read-of-the-page.patch b/queue-2.6.32/do_generic_file_read-clear-page-errors-when-issuing-a-fresh-read-of-the-page.patch new file mode 100644 index 00000000000..19332b8391c --- /dev/null +++ b/queue-2.6.32/do_generic_file_read-clear-page-errors-when-issuing-a-fresh-read-of-the-page.patch @@ -0,0 +1,47 @@ +From 91803b499cca2fe558abad709ce83dc896b80950 Mon Sep 17 00:00:00 2001 +From: Jeff Moyer +Date: Wed, 26 May 2010 11:49:40 -0400 +Subject: do_generic_file_read: clear page errors when issuing a fresh read of the page + +From: Jeff Moyer + +commit 91803b499cca2fe558abad709ce83dc896b80950 upstream. + +I/O errors can happen due to temporary failures, like multipath +errors or losing network contact with the iSCSI server. Because +of that, the VM will retry readpage on the page. + +However, do_generic_file_read does not clear PG_error. This +causes the system to be unable to actually use the data in the +page cache page, even if the subsequent readpage completes +successfully! + +The function filemap_fault has had a ClearPageError before +readpage forever. This patch simply adds the same to +do_generic_file_read. + +Signed-off-by: Jeff Moyer +Signed-off-by: Rik van Riel +Acked-by: Larry Woodman +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/filemap.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/mm/filemap.c ++++ b/mm/filemap.c +@@ -1120,6 +1120,12 @@ page_not_up_to_date_locked: + } + + readpage: ++ /* ++ * A previous I/O error may have been due to temporary ++ * failures, eg. multipath errors. ++ * PG_error will be set again if readpage fails. ++ */ ++ ClearPageError(page); + /* Start the actual read. The read will unlock the page. */ + error = mapping->a_ops->readpage(filp, page); + diff --git a/queue-2.6.32/drm-radeon-fix-the-r100-r200-ums-block-0-page-fix.patch b/queue-2.6.32/drm-radeon-fix-the-r100-r200-ums-block-0-page-fix.patch new file mode 100644 index 00000000000..4805454b0e1 --- /dev/null +++ b/queue-2.6.32/drm-radeon-fix-the-r100-r200-ums-block-0-page-fix.patch @@ -0,0 +1,36 @@ +From cf22f20ade30f8c03955324aaf27b1049e182600 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Sat, 29 May 2010 06:50:37 +1000 +Subject: drm/radeon: fix the r100/r200 ums block 0 page fix + +From: Dave Airlie + +commit cf22f20ade30f8c03955324aaf27b1049e182600 upstream. + +airlied -> brown paper bag. + +I blame Hi-5 or the Wiggles for lowering my IQ, move the fix inside some +brackets instead of breaking everything in site. + +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_state.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/radeon/radeon_state.c ++++ b/drivers/gpu/drm/radeon/radeon_state.c +@@ -878,9 +878,10 @@ static void radeon_cp_dispatch_clear(str + flags |= RADEON_FRONT; + } + if (flags & (RADEON_DEPTH|RADEON_STENCIL)) { +- if (!dev_priv->have_z_offset) ++ if (!dev_priv->have_z_offset) { + printk_once(KERN_ERR "radeon: illegal depth clear request. Buggy mesa detected - please update.\n"); +- flags &= ~(RADEON_DEPTH | RADEON_STENCIL); ++ flags &= ~(RADEON_DEPTH | RADEON_STENCIL); ++ } + } + + if (flags & (RADEON_FRONT | RADEON_BACK)) { diff --git a/queue-2.6.32/drm-radeon-r100-r200-ums-block-ability-for-userspace-app-to-trash-0-page-and-beyond.patch b/queue-2.6.32/drm-radeon-r100-r200-ums-block-ability-for-userspace-app-to-trash-0-page-and-beyond.patch new file mode 100644 index 00000000000..688bad959bf --- /dev/null +++ b/queue-2.6.32/drm-radeon-r100-r200-ums-block-ability-for-userspace-app-to-trash-0-page-and-beyond.patch @@ -0,0 +1,85 @@ +From 566d84d172161cb6c0c4dd834c34abbac6bf7b38 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Wed, 24 Feb 2010 17:17:13 +1000 +Subject: drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond + +From: Dave Airlie + +commit 566d84d172161cb6c0c4dd834c34abbac6bf7b38 upstream. + +radeon's have a special ability to passthrough writes in their internal +memory space directly to PCI, this ability means that if some of the internal +surfaces like the depth buffer point at 0x0, any writes to these will +go directly to RAM at 0x0 via PCI busmastering. + +Now mesa used to always emit clears after emitting state, since the +radeon mesa driver was refactored a year or more ago, it was found it +could generate a clear request without ever sending any setup state to the +card. So the clear would attempt to clear the depth buffer at 0x0, which +would overwrite main memory at this point. fs corruption ensues. + +Also once one app did this correctly, it would never get set back to 0 +making this messy to reproduce. + +The kernel should block this from happening as mesa runs without privs, +though it does require the user be connected to the current running X session. + +This patch implements a check to make sure the depth offset has been set +before a depth clear occurs and if it finds one it prints a warning and +ignores the depth clear request. There is also a mesa fix to avoid sending +the badness going into mesa. + +This only affects r100/r200 GPUs in user modesetting mode. + +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_cp.c | 1 + + drivers/gpu/drm/radeon/radeon_drv.h | 2 ++ + drivers/gpu/drm/radeon/radeon_state.c | 6 ++++++ + 3 files changed, 9 insertions(+) + +--- a/drivers/gpu/drm/radeon/radeon_cp.c ++++ b/drivers/gpu/drm/radeon/radeon_cp.c +@@ -1646,6 +1646,7 @@ static int radeon_do_resume_cp(struct dr + radeon_cp_load_microcode(dev_priv); + radeon_cp_init_ring_buffer(dev, dev_priv, file_priv); + ++ dev_priv->have_z_offset = 0; + radeon_do_engine_reset(dev); + radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1); + +--- a/drivers/gpu/drm/radeon/radeon_drv.h ++++ b/drivers/gpu/drm/radeon/radeon_drv.h +@@ -267,6 +267,8 @@ typedef struct drm_radeon_private { + + u32 scratch_ages[5]; + ++ int have_z_offset; ++ + /* starting from here on, data is preserved accross an open */ + uint32_t flags; /* see radeon_chip_flags */ + resource_size_t fb_aper_offset; +--- a/drivers/gpu/drm/radeon/radeon_state.c ++++ b/drivers/gpu/drm/radeon/radeon_state.c +@@ -101,6 +101,7 @@ static __inline__ int radeon_check_and_f + DRM_ERROR("Invalid depth buffer offset\n"); + return -EINVAL; + } ++ dev_priv->have_z_offset = 1; + break; + + case RADEON_EMIT_PP_CNTL: +@@ -876,6 +877,11 @@ static void radeon_cp_dispatch_clear(str + if (tmp & RADEON_BACK) + flags |= RADEON_FRONT; + } ++ if (flags & (RADEON_DEPTH|RADEON_STENCIL)) { ++ if (!dev_priv->have_z_offset) ++ printk_once(KERN_ERR "radeon: illegal depth clear request. Buggy mesa detected - please update.\n"); ++ flags &= ~(RADEON_DEPTH | RADEON_STENCIL); ++ } + + if (flags & (RADEON_FRONT | RADEON_BACK)) { + diff --git a/queue-2.6.32/hwmon-ltc4245-read-only-one-gpio-pin.patch b/queue-2.6.32/hwmon-ltc4245-read-only-one-gpio-pin.patch new file mode 100644 index 00000000000..9bca0473ec7 --- /dev/null +++ b/queue-2.6.32/hwmon-ltc4245-read-only-one-gpio-pin.patch @@ -0,0 +1,100 @@ +From df16dd53c575d0cb9dbee20a3149927c862a9ff6 Mon Sep 17 00:00:00 2001 +From: Ira W. Snyder +Date: Thu, 27 May 2010 19:59:02 +0200 +Subject: hwmon: (ltc4245) Read only one GPIO pin + +From: Ira W. Snyder + +commit df16dd53c575d0cb9dbee20a3149927c862a9ff6 upstream. + +Read only one of the GPIO pins as an analog voltage. The ADC can be +switched to a different GPIO pin at runtime, but this is not supported. + +Previously, this driver would report the analog voltage of the currently +selected GPIO pin as all three GPIO voltages: in9_input, in10_input and +in11_input. + +Signed-off-by: Ira W. Snyder +Signed-off-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/hwmon/ltc4245 | 4 +--- + drivers/hwmon/ltc4245.c | 18 +++++------------- + 2 files changed, 6 insertions(+), 16 deletions(-) + +--- a/Documentation/hwmon/ltc4245 ++++ b/Documentation/hwmon/ltc4245 +@@ -72,9 +72,7 @@ in6_min_alarm 5v output undervoltage a + in7_min_alarm 3v output undervoltage alarm + in8_min_alarm Vee (-12v) output undervoltage alarm + +-in9_input GPIO #1 voltage data +-in10_input GPIO #2 voltage data +-in11_input GPIO #3 voltage data ++in9_input GPIO voltage data + + power1_input 12v power usage (mW) + power2_input 5v power usage (mW) +--- a/drivers/hwmon/ltc4245.c ++++ b/drivers/hwmon/ltc4245.c +@@ -45,9 +45,7 @@ enum ltc4245_cmd { + LTC4245_VEEIN = 0x19, + LTC4245_VEESENSE = 0x1a, + LTC4245_VEEOUT = 0x1b, +- LTC4245_GPIOADC1 = 0x1c, +- LTC4245_GPIOADC2 = 0x1d, +- LTC4245_GPIOADC3 = 0x1e, ++ LTC4245_GPIOADC = 0x1c, + }; + + struct ltc4245_data { +@@ -61,7 +59,7 @@ struct ltc4245_data { + u8 cregs[0x08]; + + /* Voltage registers */ +- u8 vregs[0x0f]; ++ u8 vregs[0x0d]; + }; + + static struct ltc4245_data *ltc4245_update_device(struct device *dev) +@@ -86,7 +84,7 @@ static struct ltc4245_data *ltc4245_upda + data->cregs[i] = val; + } + +- /* Read voltage registers -- 0x10 to 0x1f */ ++ /* Read voltage registers -- 0x10 to 0x1c */ + for (i = 0; i < ARRAY_SIZE(data->vregs); i++) { + val = i2c_smbus_read_byte_data(client, i+0x10); + if (unlikely(val < 0)) +@@ -128,9 +126,7 @@ static int ltc4245_get_voltage(struct de + case LTC4245_VEEOUT: + voltage = regval * -55; + break; +- case LTC4245_GPIOADC1: +- case LTC4245_GPIOADC2: +- case LTC4245_GPIOADC3: ++ case LTC4245_GPIOADC: + voltage = regval * 10; + break; + default: +@@ -297,9 +293,7 @@ LTC4245_ALARM(in7_min_alarm, (1 << 2), L + LTC4245_ALARM(in8_min_alarm, (1 << 3), LTC4245_FAULT2); + + /* GPIO voltages */ +-LTC4245_VOLTAGE(in9_input, LTC4245_GPIOADC1); +-LTC4245_VOLTAGE(in10_input, LTC4245_GPIOADC2); +-LTC4245_VOLTAGE(in11_input, LTC4245_GPIOADC3); ++LTC4245_VOLTAGE(in9_input, LTC4245_GPIOADC); + + /* Power Consumption (virtual) */ + LTC4245_POWER(power1_input, LTC4245_12VSENSE); +@@ -342,8 +336,6 @@ static struct attribute *ltc4245_attribu + &sensor_dev_attr_in8_min_alarm.dev_attr.attr, + + &sensor_dev_attr_in9_input.dev_attr.attr, +- &sensor_dev_attr_in10_input.dev_attr.attr, +- &sensor_dev_attr_in11_input.dev_attr.attr, + + &sensor_dev_attr_power1_input.dev_attr.attr, + &sensor_dev_attr_power2_input.dev_attr.attr, diff --git a/queue-2.6.32/ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch b/queue-2.6.32/ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch new file mode 100644 index 00000000000..eed4b45d331 --- /dev/null +++ b/queue-2.6.32/ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch @@ -0,0 +1,44 @@ +From a747c5abc329611220f16df0bb4cf0ca4a7fdf0c Mon Sep 17 00:00:00 2001 +From: Jiri Kosina +Date: Wed, 26 May 2010 14:43:53 -0700 +Subject: ipmi: handle run_to_completion properly in deliver_recv_msg() + +From: Jiri Kosina + +commit a747c5abc329611220f16df0bb4cf0ca4a7fdf0c upstream. + +If run_to_completion flag is set, it means that we are running in a +single-threaded mode, and thus no locks are held. + +This fixes a deadlock when IPMI notifier is being called during panic. + +Signed-off-by: Jiri Kosina +Acked-by: Corey Minyard +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/ipmi/ipmi_si_intf.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +--- a/drivers/char/ipmi/ipmi_si_intf.c ++++ b/drivers/char/ipmi/ipmi_si_intf.c +@@ -310,9 +310,14 @@ static void deliver_recv_msg(struct smi_ + { + /* Deliver the message to the upper layer with the lock + released. */ +- spin_unlock(&(smi_info->si_lock)); +- ipmi_smi_msg_received(smi_info->intf, msg); +- spin_lock(&(smi_info->si_lock)); ++ ++ if (smi_info->run_to_completion) { ++ ipmi_smi_msg_received(smi_info->intf, msg); ++ } else { ++ spin_unlock(&(smi_info->si_lock)); ++ ipmi_smi_msg_received(smi_info->intf, msg); ++ spin_lock(&(smi_info->si_lock)); ++ } + } + + static void return_hosed_msg(struct smi_info *smi_info, int cCode) diff --git a/queue-2.6.32/series b/queue-2.6.32/series index 53695a89c62..4f8d0c9dcc6 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -73,3 +73,21 @@ arm-6164-1-add-kto-and-kfrom-to-input-operands-list.patch arm-6146-1-sa1111-prevent-deadlock-in-resume-path.patch arm-6144-1-tcm-memory-bug-freeing-bug.patch arm-vfp-fix-vfp_put_double-for-d16-d31.patch +asoc-fix-db-scales-for-wm835x.patch +asoc-fix-db-scales-for-wm8400.patch +asoc-fix-db-scales-for-wm8990.patch +drm-radeon-r100-r200-ums-block-ability-for-userspace-app-to-trash-0-page-and-beyond.patch +drm-radeon-fix-the-r100-r200-ums-block-0-page-fix.patch +hwmon-ltc4245-read-only-one-gpio-pin.patch +signals-check_kill_permission-don-t-check-creds-if-same_thread_group.patch +do_generic_file_read-clear-page-errors-when-issuing-a-fresh-read-of-the-page.patch +ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch +x86-setup-phoenix-bios-fixup-is-needed-on-dell-inspiron-mini-1012.patch +xen-ensure-timer-tick-is-resumed-even-on-cpu-driving-the-resume.patch +xen-avoid-allocation-causing-potential-swap-activity-on-the-resume-path.patch +alsa-hda-use-lpib-for-an-asus-device.patch +alsa-hda-use-mb31-quirk-for-an-imac-model.patch +alsa-hda-use-lpib-for-another-mainboard.patch +alsa-hda-use-lpib-for-asus-m2v.patch +staging-comedi-correct-parameter-gainlkup-for-daqcard-6024e-in-driver-ni_mio_cs.c.patch +clocksource-sh_cmt-compute-mult-and-shift-before-registration.patch diff --git a/queue-2.6.32/signals-check_kill_permission-don-t-check-creds-if-same_thread_group.patch b/queue-2.6.32/signals-check_kill_permission-don-t-check-creds-if-same_thread_group.patch new file mode 100644 index 00000000000..da667acfbe5 --- /dev/null +++ b/queue-2.6.32/signals-check_kill_permission-don-t-check-creds-if-same_thread_group.patch @@ -0,0 +1,77 @@ +From 065add3941bdca54fe04ed3471a96bce9af88793 Mon Sep 17 00:00:00 2001 +From: Oleg Nesterov +Date: Wed, 26 May 2010 14:42:54 -0700 +Subject: signals: check_kill_permission(): don't check creds if same_thread_group() + +From: Oleg Nesterov + +commit 065add3941bdca54fe04ed3471a96bce9af88793 upstream. + +Andrew Tridgell reports that aio_read(SIGEV_SIGNAL) can fail if the +notification from the helper thread races with setresuid(), see +http://samba.org/~tridge/junkcode/aio_uid.c + +This happens because check_kill_permission() doesn't permit sending a +signal to the task with the different cred->xids. But there is not any +security reason to check ->cred's when the task sends a signal (private or +group-wide) to its sub-thread. Whatever we do, any thread can bypass all +security checks and send SIGKILL to all threads, or it can block a signal +SIG and do kill(gettid(), SIG) to deliver this signal to another +sub-thread. Not to mention that CLONE_THREAD implies CLONE_VM. + +Change check_kill_permission() to avoid the credentials check when the +sender and the target are from the same thread group. + +Also, move "cred = current_cred()" down to avoid calling get_current() +twice. + +Note: David Howells pointed out we could relax this even more, the +CLONE_SIGHAND (without CLONE_THREAD) case probably does not need +these checks too. + +Roland said: +: The glibc (libpthread) that does set*id across threads has +: been in use for a while (2.3.4?), probably in distro's using kernels as old +: or older than any active -stable streams. In the race in question, this +: kernel bug is breaking valid POSIX application expectations. + +Reported-by: Andrew Tridgell +Signed-off-by: Oleg Nesterov +Acked-by: Roland McGrath +Acked-by: David Howells +Cc: Eric Paris +Cc: Jakub Jelinek +Cc: James Morris +Cc: Roland McGrath +Cc: Stephen Smalley +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/signal.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/kernel/signal.c ++++ b/kernel/signal.c +@@ -591,7 +591,7 @@ static int rm_from_queue(unsigned long m + static int check_kill_permission(int sig, struct siginfo *info, + struct task_struct *t) + { +- const struct cred *cred = current_cred(), *tcred; ++ const struct cred *cred, *tcred; + struct pid *sid; + int error; + +@@ -605,8 +605,10 @@ static int check_kill_permission(int sig + if (error) + return error; + ++ cred = current_cred(); + tcred = __task_cred(t); +- if ((cred->euid ^ tcred->suid) && ++ if (!same_thread_group(current, t) && ++ (cred->euid ^ tcred->suid) && + (cred->euid ^ tcred->uid) && + (cred->uid ^ tcred->suid) && + (cred->uid ^ tcred->uid) && diff --git a/queue-2.6.32/staging-comedi-correct-parameter-gainlkup-for-daqcard-6024e-in-driver-ni_mio_cs.c.patch b/queue-2.6.32/staging-comedi-correct-parameter-gainlkup-for-daqcard-6024e-in-driver-ni_mio_cs.c.patch new file mode 100644 index 00000000000..8ea74f5b5a1 --- /dev/null +++ b/queue-2.6.32/staging-comedi-correct-parameter-gainlkup-for-daqcard-6024e-in-driver-ni_mio_cs.c.patch @@ -0,0 +1,31 @@ +From ebe8622342f12bed387f7de4b5fb7c52005ccb29 Mon Sep 17 00:00:00 2001 +From: Martin Homuth-Rosemann +Date: Mon, 31 May 2010 22:33:04 +0200 +Subject: Staging: comedi - correct parameter gainlkup for DAQCard-6024E in driver ni_mio_cs.c + +From: Martin Homuth-Rosemann + +commit ebe8622342f12bed387f7de4b5fb7c52005ccb29 upstream. + +Correct at least one of the incorrect specs for a national instrument +data acquisition card DAQCard-6024E. This card has only four different +gain settings (+-10V, +-5V, +-0.5V, +-0.05V). + +Signed-off-by: Martin Homuth-Rosemann +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/drivers/ni_mio_cs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/staging/comedi/drivers/ni_mio_cs.c ++++ b/drivers/staging/comedi/drivers/ni_mio_cs.c +@@ -123,7 +123,7 @@ static const struct ni_board_struct ni_b + .adbits = 12, + .ai_fifo_depth = 1024, + .alwaysdither = 0, +- .gainlkup = ai_gain_16, ++ .gainlkup = ai_gain_4, + .ai_speed = 5000, + .n_aochan = 2, + .aobits = 12, diff --git a/queue-2.6.32/x86-setup-phoenix-bios-fixup-is-needed-on-dell-inspiron-mini-1012.patch b/queue-2.6.32/x86-setup-phoenix-bios-fixup-is-needed-on-dell-inspiron-mini-1012.patch new file mode 100644 index 00000000000..1eb5be3ea23 --- /dev/null +++ b/queue-2.6.32/x86-setup-phoenix-bios-fixup-is-needed-on-dell-inspiron-mini-1012.patch @@ -0,0 +1,46 @@ +From 3d6e77a3ddb8e4156b89f4273ff8c7d37abaf781 Mon Sep 17 00:00:00 2001 +From: Gabor Gombas +Date: Mon, 24 May 2010 12:13:18 -0700 +Subject: x86, setup: Phoenix BIOS fixup is needed on Dell Inspiron Mini 1012 + +From: Gabor Gombas + +commit 3d6e77a3ddb8e4156b89f4273ff8c7d37abaf781 upstream. + +The low-memory corruption checker triggers during suspend/resume, so we +need to reserve the low 64k. Don't be fooled that the BIOS identifies +itself as "Dell Inc.", it's still Phoenix BIOS. + +[ hpa: I think we blacklist almost every BIOS in existence. We should +either change this to a whitelist or just make it unconditional. ] + +Signed-off-by: Gabor Gombas +LKML-Reference: <201005241913.o4OJDIMM010877@imap1.linux-foundation.org> +Signed-off-by: Andrew Morton +Signed-off-by: H. Peter Anvin +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/setup.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/arch/x86/kernel/setup.c ++++ b/arch/x86/kernel/setup.c +@@ -688,6 +688,17 @@ static struct dmi_system_id __initdata b + DMI_MATCH(DMI_BOARD_NAME, "DG45FC"), + }, + }, ++ /* ++ * The Dell Inspiron Mini 1012 has DMI_BIOS_VENDOR = "Dell Inc.", so ++ * match on the product name. ++ */ ++ { ++ .callback = dmi_low_memory_corruption, ++ .ident = "Phoenix BIOS", ++ .matches = { ++ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"), ++ }, ++ }, + #endif + {} + }; diff --git a/queue-2.6.32/xen-avoid-allocation-causing-potential-swap-activity-on-the-resume-path.patch b/queue-2.6.32/xen-avoid-allocation-causing-potential-swap-activity-on-the-resume-path.patch new file mode 100644 index 00000000000..26a4940584a --- /dev/null +++ b/queue-2.6.32/xen-avoid-allocation-causing-potential-swap-activity-on-the-resume-path.patch @@ -0,0 +1,41 @@ +From b3831cb55d383e8eb55d3b56c715fb48459b87c9 Mon Sep 17 00:00:00 2001 +From: Ian Campbell +Date: Tue, 25 May 2010 10:45:35 +0100 +Subject: xen: avoid allocation causing potential swap activity on the resume path + +From: Ian Campbell + +commit b3831cb55d383e8eb55d3b56c715fb48459b87c9 upstream. + +Since the device we are resuming could be the device containing the +swap device we should ensure that the allocation cannot cause +IO. + +On resume, this path is triggered when the running system tries to +continue using its devices. If it cannot then the resume will fail; +to try to avoid this we let it dip into the emergency pools. + +The majority of these changes were made when linux-2.6.18-xen.hg +changeset e8b49cfbdac0 was ported upstream in +a144ff09bc52ef3f3684ed23eadc9c7c0e57b3aa but somehow this hunk was +dropped. + +Signed-off-by: Ian Campbell +Acked-by: Jeremy Fitzhardinge +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/xen/xenbus/xenbus_xs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/xen/xenbus/xenbus_xs.c ++++ b/drivers/xen/xenbus/xenbus_xs.c +@@ -499,7 +499,7 @@ int xenbus_printf(struct xenbus_transact + #define PRINTF_BUFFER_SIZE 4096 + char *printf_buffer; + +- printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL); ++ printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_NOIO | __GFP_HIGH); + if (printf_buffer == NULL) + return -ENOMEM; + diff --git a/queue-2.6.32/xen-ensure-timer-tick-is-resumed-even-on-cpu-driving-the-resume.patch b/queue-2.6.32/xen-ensure-timer-tick-is-resumed-even-on-cpu-driving-the-resume.patch new file mode 100644 index 00000000000..6c2a69a4144 --- /dev/null +++ b/queue-2.6.32/xen-ensure-timer-tick-is-resumed-even-on-cpu-driving-the-resume.patch @@ -0,0 +1,44 @@ +From cd52e17ea8278f8449b6174a8e5ed439a2e44ffb Mon Sep 17 00:00:00 2001 +From: Ian Campbell +Date: Wed, 19 May 2010 16:19:25 +0100 +Subject: xen: ensure timer tick is resumed even on CPU driving the resume + +From: Ian Campbell + +commit cd52e17ea8278f8449b6174a8e5ed439a2e44ffb upstream. + +The core suspend/resume code is run from stop_machine on CPU0 but +parts of the suspend/resume machinery (including xen_arch_resume) are +run on whichever CPU happened to schedule the xenwatch kernel thread. + +As part of the non-core resume code xen_arch_resume is called in order +to restart the timer tick on non-boot processors. The boot processor +itself is taken care of by core timekeeping code. + +xen_arch_resume uses smp_call_function which does not call the given +function on the current processor. This means that we can end up with +one CPU not receiving timer ticks if the xenwatch thread happened to +be scheduled on CPU > 0. + +Use on_each_cpu instead of smp_call_function to ensure the timer tick +is resumed everywhere. + +Signed-off-by: Ian Campbell +Acked-by: Jeremy Fitzhardinge +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/xen/suspend.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/x86/xen/suspend.c ++++ b/arch/x86/xen/suspend.c +@@ -60,6 +60,6 @@ static void xen_vcpu_notify_restore(void + + void xen_arch_resume(void) + { +- smp_call_function(xen_vcpu_notify_restore, +- (void *)CLOCK_EVT_NOTIFY_RESUME, 1); ++ on_each_cpu(xen_vcpu_notify_restore, ++ (void *)CLOCK_EVT_NOTIFY_RESUME, 1); + }