From: Greg Kroah-Hartman Date: Thu, 24 Jun 2010 23:21:39 +0000 (-0700) Subject: .34 patches X-Git-Tag: v2.6.31.14~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7f91ed80a86ebe8f456dfad22acbf48917dd66c;p=thirdparty%2Fkernel%2Fstable-queue.git .34 patches --- diff --git a/queue-2.6.34/alsa-hda-use-lpib-for-an-asus-device.patch b/queue-2.6.34/alsa-hda-use-lpib-for-an-asus-device.patch new file mode 100644 index 00000000000..781e831c28f --- /dev/null +++ b/queue-2.6.34/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 +@@ -2269,6 +2269,7 @@ static struct snd_pci_quirk position_fix + SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB), + SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", 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.34/alsa-hda-use-lpib-for-another-mainboard.patch b/queue-2.6.34/alsa-hda-use-lpib-for-another-mainboard.patch new file mode 100644 index 00000000000..032fee64e24 --- /dev/null +++ b/queue-2.6.34/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 +@@ -2278,6 +2278,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.34/alsa-hda-use-lpib-for-asus-m2v.patch b/queue-2.6.34/alsa-hda-use-lpib-for-asus-m2v.patch new file mode 100644 index 00000000000..b84b2ee170b --- /dev/null +++ b/queue-2.6.34/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 +@@ -2270,6 +2270,7 @@ static struct snd_pci_quirk position_fix + SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", 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.34/alsa-hda-use-mb31-quirk-for-an-imac-model.patch b/queue-2.6.34/alsa-hda-use-mb31-quirk-for-an-imac-model.patch new file mode 100644 index 00000000000..f7b99d20442 --- /dev/null +++ b/queue-2.6.34/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 +@@ -9392,6 +9392,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.34/arch-x86-kernel-add-missing-spin_unlock.patch b/queue-2.6.34/arch-x86-kernel-add-missing-spin_unlock.patch new file mode 100644 index 00000000000..ba581fd7754 --- /dev/null +++ b/queue-2.6.34/arch-x86-kernel-add-missing-spin_unlock.patch @@ -0,0 +1,82 @@ +From 84fe6c19e4a598e8071e3bd1b2c923454eae1268 Mon Sep 17 00:00:00 2001 +From: Julia Lawall +Date: Thu, 27 May 2010 12:31:51 +0200 +Subject: arch/x86/kernel: Add missing spin_unlock + +From: Julia Lawall + +commit 84fe6c19e4a598e8071e3bd1b2c923454eae1268 upstream. + +Add a spin_unlock missing on the error path. The locks and unlocks are +balanced in other functions, so it seems that the same should be the case +here. + +The semantic match that finds this problem is as follows: +(http://coccinelle.lip6.fr/) + +// +@@ +expression E1; +@@ + +* spin_lock(E1,...); + <+... when != E1 + if (...) { + ... when != E1 +* return ...; + } + ...+> +* spin_unlock(E1,...); +// + +Signed-off-by: Julia Lawall +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/amd_iommu.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/arch/x86/kernel/amd_iommu.c ++++ b/arch/x86/kernel/amd_iommu.c +@@ -1420,6 +1420,7 @@ static int __attach_device(struct device + struct protection_domain *domain) + { + struct iommu_dev_data *dev_data, *alias_data; ++ int ret; + + dev_data = get_dev_data(dev); + alias_data = get_dev_data(dev_data->alias); +@@ -1431,13 +1432,14 @@ static int __attach_device(struct device + spin_lock(&domain->lock); + + /* Some sanity checks */ ++ ret = -EBUSY; + if (alias_data->domain != NULL && + alias_data->domain != domain) +- return -EBUSY; ++ goto out_unlock; + + if (dev_data->domain != NULL && + dev_data->domain != domain) +- return -EBUSY; ++ goto out_unlock; + + /* Do real assignment */ + if (dev_data->alias != dev) { +@@ -1453,10 +1455,14 @@ static int __attach_device(struct device + + atomic_inc(&dev_data->bind); + ++ ret = 0; ++ ++out_unlock: ++ + /* ready */ + spin_unlock(&domain->lock); + +- return 0; ++ return ret; + } + + /* diff --git a/queue-2.6.34/asoc-fix-db-scales-for-wm835x.patch b/queue-2.6.34/asoc-fix-db-scales-for-wm835x.patch new file mode 100644 index 00000000000..f834bfb9753 --- /dev/null +++ b/queue-2.6.34/asoc-fix-db-scales-for-wm835x.patch @@ -0,0 +1,30 @@ +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 + +diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c +index e5a48da..c342c2c 100644 +--- a/sound/soc/codecs/wm8350.c ++++ b/sound/soc/codecs/wm8350.c +@@ -425,8 +425,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.34/asoc-fix-db-scales-for-wm8400.patch b/queue-2.6.34/asoc-fix-db-scales-for-wm8400.patch new file mode 100644 index 00000000000..fae05c7d477 --- /dev/null +++ b/queue-2.6.34/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 +@@ -107,21 +107,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) +@@ -440,7 +440,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.34/asoc-fix-db-scales-for-wm8990.patch b/queue-2.6.34/asoc-fix-db-scales-for-wm8990.patch new file mode 100644 index 00000000000..e724d6fee67 --- /dev/null +++ b/queue-2.6.34/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 +@@ -111,21 +111,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) +@@ -451,7 +451,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.34/asoc-update-freescale-i.mx-ssi-driver-dma-parameter-handling.patch b/queue-2.6.34/asoc-update-freescale-i.mx-ssi-driver-dma-parameter-handling.patch new file mode 100644 index 00000000000..e9395215c96 --- /dev/null +++ b/queue-2.6.34/asoc-update-freescale-i.mx-ssi-driver-dma-parameter-handling.patch @@ -0,0 +1,52 @@ +From e2b3e622b259e62aa2450a25f1c20cca1bfdc81e Mon Sep 17 00:00:00 2001 +From: Stuart Longland +Date: Sat, 22 May 2010 22:01:25 +1000 +Subject: ASoC: Update Freescale i.MX SSI driver DMA parameter handling + +From: Stuart Longland + +commit e2b3e622b259e62aa2450a25f1c20cca1bfdc81e upstream. + +This updates the i.MX SSI driver to make it compatible with the ASoC tree +following the move of DMA parameters from the DAI to the audio substream +object. + +Signed-off-by: Stuart Longland +Acked-by: Liam Girdwood +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/imx/imx-pcm-dma-mx2.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/sound/soc/imx/imx-pcm-dma-mx2.c ++++ b/sound/soc/imx/imx-pcm-dma-mx2.c +@@ -73,7 +73,8 @@ static void snd_imx_dma_err_callback(int + { + struct snd_pcm_substream *substream = data; + struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; ++ struct imx_pcm_dma_params *dma_params = ++ snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct imx_pcm_runtime_data *iprtd = runtime->private_data; + int ret; +@@ -102,7 +103,7 @@ static int imx_ssi_dma_alloc(struct snd_ + struct imx_pcm_runtime_data *iprtd = runtime->private_data; + int ret; + +- dma_params = snd_soc_get_dma_data(rtd->dai->cpu_dai, substream); ++ dma_params = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); + + iprtd->dma = imx_dma_request_by_prio(DRV_NAME, DMA_PRIO_HIGH); + if (iprtd->dma < 0) { +@@ -212,7 +213,7 @@ static int snd_imx_pcm_prepare(struct sn + struct imx_pcm_runtime_data *iprtd = runtime->private_data; + int err; + +- dma_params = snd_soc_get_dma_data(rtd->dai->cpu_dai, substream); ++ dma_params = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); + + iprtd->substream = substream; + iprtd->buf = (unsigned int *)substream->dma_buffer.area; diff --git a/queue-2.6.34/clocksource-sh_cmt-compute-mult-and-shift-before-registration.patch b/queue-2.6.34/clocksource-sh_cmt-compute-mult-and-shift-before-registration.patch new file mode 100644 index 00000000000..c609733ee14 --- /dev/null +++ b/queue-2.6.34/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) +@@ -451,7 +443,18 @@ static int sh_cmt_register_clocksource(s + cs->resume = sh_cmt_clocksource_resume; + 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.34/clocksource-sh_tmu-compute-mult-and-shift-before-registration.patch b/queue-2.6.34/clocksource-sh_tmu-compute-mult-and-shift-before-registration.patch new file mode 100644 index 00000000000..77955223619 --- /dev/null +++ b/queue-2.6.34/clocksource-sh_tmu-compute-mult-and-shift-before-registration.patch @@ -0,0 +1,63 @@ +From 66f49121ffa41a19c59965b31b046d8368fec3c7 Mon Sep 17 00:00:00 2001 +From: Aurelien Jarno +Date: Mon, 31 May 2010 21:45:48 +0000 +Subject: clocksource: sh_tmu: compute mult and shift before registration + +From: Aurelien Jarno + +commit 66f49121ffa41a19c59965b31b046d8368fec3c7 upstream. + +Since commit 98962465ed9e6ea99c38e0af63fe1dcb5a79dc25 ("nohz: Prevent +clocksource wrapping during idle"), the CPU of an R2D board never goes +to idle. This commit assumes that mult and shift are assigned before +the clocksource is registered. As a consequence the safe maximum sleep +time is negative and the CPU never goes into idle. + +This patch fixes the problem by moving mult and shift initialization +from sh_tmu_clocksource_enable() to sh_tmu_register_clocksource(). + +Signed-off-by: Aurelien Jarno +Signed-off-by: Paul Mundt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clocksource/sh_tmu.c | 20 +++++++++++--------- + 1 file changed, 11 insertions(+), 9 deletions(-) + +--- a/drivers/clocksource/sh_tmu.c ++++ b/drivers/clocksource/sh_tmu.c +@@ -200,16 +200,8 @@ static cycle_t sh_tmu_clocksource_read(s + static int sh_tmu_clocksource_enable(struct clocksource *cs) + { + struct sh_tmu_priv *p = cs_to_sh_tmu(cs); +- int ret; + +- ret = sh_tmu_enable(p); +- if (ret) +- return ret; +- +- /* TODO: calculate good shift from rate and counter bit width */ +- cs->shift = 10; +- cs->mult = clocksource_hz2mult(p->rate, cs->shift); +- return 0; ++ return sh_tmu_enable(p); + } + + static void sh_tmu_clocksource_disable(struct clocksource *cs) +@@ -229,6 +221,16 @@ static int sh_tmu_register_clocksource(s + cs->disable = sh_tmu_clocksource_disable; + cs->mask = CLOCKSOURCE_MASK(32); + cs->flags = CLOCK_SOURCE_IS_CONTINUOUS; ++ ++ /* clk_get_rate() needs an enabled clock */ ++ clk_enable(p->clk); ++ /* channel will be configured at parent clock / 4 */ ++ p->rate = clk_get_rate(p->clk) / 4; ++ 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_tmu: %s used as clock source\n", cs->name); + clocksource_register(cs); + return 0; diff --git a/queue-2.6.34/compat-factor-out-compat_rw_copy_check_uvector-from-compat_do_readv_writev.patch b/queue-2.6.34/compat-factor-out-compat_rw_copy_check_uvector-from-compat_do_readv_writev.patch new file mode 100644 index 00000000000..279a782c02a --- /dev/null +++ b/queue-2.6.34/compat-factor-out-compat_rw_copy_check_uvector-from-compat_do_readv_writev.patch @@ -0,0 +1,204 @@ +From b83733639a494d5f42fa00a2506563fbd2d3015d Mon Sep 17 00:00:00 2001 +From: Jeff Moyer +Date: Wed, 26 May 2010 14:44:25 -0700 +Subject: compat: factor out compat_rw_copy_check_uvector from compat_do_readv_writev + +From: Jeff Moyer + +commit b83733639a494d5f42fa00a2506563fbd2d3015d upstream. + +It was reported in http://lkml.org/lkml/2010/3/8/309 that 32 bit readv and +writev AIO operations were not functioning properly. It turns out that +the code to convert the 32bit io vectors to 64 bits was never written. +The results of that can be pretty bad, but in my testing, it mostly ended +up in generating EFAULT as we walked off the list of I/O vectors provided. + +This patch set fixes the problem in my environment. are greatly +appreciated. + +This patch: + +Factor out code that will be used by both compat_do_readv_writev and the +compat aio submission code paths. + +Signed-off-by: Jeff Moyer +Reported-by: Michael Tokarev +Cc: Zach Brown +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/compat.c | 130 +++++++++++++++++++++++++++++-------------------- + include/linux/compat.h | 4 + + 2 files changed, 81 insertions(+), 53 deletions(-) + +--- a/fs/compat.c ++++ b/fs/compat.c +@@ -568,6 +568,79 @@ out: + return ret; + } + ++/* A write operation does a read from user space and vice versa */ ++#define vrfy_dir(type) ((type) == READ ? VERIFY_WRITE : VERIFY_READ) ++ ++ssize_t compat_rw_copy_check_uvector(int type, ++ const struct compat_iovec __user *uvector, unsigned long nr_segs, ++ unsigned long fast_segs, struct iovec *fast_pointer, ++ struct iovec **ret_pointer) ++{ ++ compat_ssize_t tot_len; ++ struct iovec *iov = *ret_pointer = fast_pointer; ++ ssize_t ret = 0; ++ int seg; ++ ++ /* ++ * SuS says "The readv() function *may* fail if the iovcnt argument ++ * was less than or equal to 0, or greater than {IOV_MAX}. Linux has ++ * traditionally returned zero for zero segments, so... ++ */ ++ if (nr_segs == 0) ++ goto out; ++ ++ ret = -EINVAL; ++ if (nr_segs > UIO_MAXIOV || nr_segs < 0) ++ goto out; ++ if (nr_segs > fast_segs) { ++ ret = -ENOMEM; ++ iov = kmalloc(nr_segs*sizeof(struct iovec), GFP_KERNEL); ++ if (iov == NULL) { ++ *ret_pointer = fast_pointer; ++ goto out; ++ } ++ } ++ *ret_pointer = iov; ++ ++ /* ++ * Single unix specification: ++ * We should -EINVAL if an element length is not >= 0 and fitting an ++ * ssize_t. The total length is fitting an ssize_t ++ * ++ * Be careful here because iov_len is a size_t not an ssize_t ++ */ ++ tot_len = 0; ++ ret = -EINVAL; ++ for (seg = 0; seg < nr_segs; seg++) { ++ compat_ssize_t tmp = tot_len; ++ compat_uptr_t buf; ++ compat_ssize_t len; ++ ++ if (__get_user(len, &uvector->iov_len) || ++ __get_user(buf, &uvector->iov_base)) { ++ ret = -EFAULT; ++ goto out; ++ } ++ if (len < 0) /* size_t not fitting in compat_ssize_t .. */ ++ goto out; ++ tot_len += len; ++ if (tot_len < tmp) /* maths overflow on the compat_ssize_t */ ++ goto out; ++ if (!access_ok(vrfy_dir(type), buf, len)) { ++ ret = -EFAULT; ++ goto out; ++ } ++ iov->iov_base = compat_ptr(buf); ++ iov->iov_len = (compat_size_t) len; ++ uvector++; ++ iov++; ++ } ++ ret = tot_len; ++ ++out: ++ return ret; ++} ++ + static inline long + copy_iocb(long nr, u32 __user *ptr32, struct iocb __user * __user *ptr64) + { +@@ -1077,70 +1150,21 @@ static ssize_t compat_do_readv_writev(in + { + compat_ssize_t tot_len; + struct iovec iovstack[UIO_FASTIOV]; +- struct iovec *iov=iovstack, *vector; ++ struct iovec *iov; + ssize_t ret; +- int seg; + io_fn_t fn; + iov_fn_t fnv; + +- /* +- * SuS says "The readv() function *may* fail if the iovcnt argument +- * was less than or equal to 0, or greater than {IOV_MAX}. Linux has +- * traditionally returned zero for zero segments, so... +- */ +- ret = 0; +- if (nr_segs == 0) +- goto out; +- +- /* +- * First get the "struct iovec" from user memory and +- * verify all the pointers +- */ + ret = -EINVAL; +- if ((nr_segs > UIO_MAXIOV) || (nr_segs <= 0)) +- goto out; + if (!file->f_op) + goto out; +- if (nr_segs > UIO_FASTIOV) { +- ret = -ENOMEM; +- iov = kmalloc(nr_segs*sizeof(struct iovec), GFP_KERNEL); +- if (!iov) +- goto out; +- } ++ + ret = -EFAULT; + if (!access_ok(VERIFY_READ, uvector, nr_segs*sizeof(*uvector))) + goto out; + +- /* +- * Single unix specification: +- * We should -EINVAL if an element length is not >= 0 and fitting an +- * ssize_t. The total length is fitting an ssize_t +- * +- * Be careful here because iov_len is a size_t not an ssize_t +- */ +- tot_len = 0; +- vector = iov; +- ret = -EINVAL; +- for (seg = 0 ; seg < nr_segs; seg++) { +- compat_ssize_t tmp = tot_len; +- compat_ssize_t len; +- compat_uptr_t buf; +- +- if (__get_user(len, &uvector->iov_len) || +- __get_user(buf, &uvector->iov_base)) { +- ret = -EFAULT; +- goto out; +- } +- if (len < 0) /* size_t not fitting an compat_ssize_t .. */ +- goto out; +- tot_len += len; +- if (tot_len < tmp) /* maths overflow on the compat_ssize_t */ +- goto out; +- vector->iov_base = compat_ptr(buf); +- vector->iov_len = (compat_size_t) len; +- uvector++; +- vector++; +- } ++ tot_len = compat_rw_copy_check_uvector(type, uvector, nr_segs, ++ UIO_FASTIOV, iovstack, &iov); + if (tot_len == 0) { + ret = 0; + goto out; +--- a/include/linux/compat.h ++++ b/include/linux/compat.h +@@ -356,5 +356,9 @@ asmlinkage long compat_sys_newfstatat(un + asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, + int flags, int mode); + ++extern ssize_t compat_rw_copy_check_uvector(int type, ++ const struct compat_iovec __user *uvector, unsigned long nr_segs, ++ unsigned long fast_segs, struct iovec *fast_pointer, ++ struct iovec **ret_pointer); + #endif /* CONFIG_COMPAT */ + #endif /* _LINUX_COMPAT_H */ diff --git a/queue-2.6.34/do_generic_file_read-clear-page-errors-when-issuing-a-fresh-read-of-the-page.patch b/queue-2.6.34/do_generic_file_read-clear-page-errors-when-issuing-a-fresh-read-of-the-page.patch new file mode 100644 index 00000000000..920e2818e1f --- /dev/null +++ b/queue-2.6.34/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 +@@ -1099,6 +1099,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.34/drm-radeon-fix-the-r100-r200-ums-block-0-page-fix.patch b/queue-2.6.34/drm-radeon-fix-the-r100-r200-ums-block-0-page-fix.patch new file mode 100644 index 00000000000..73c81fe0898 --- /dev/null +++ b/queue-2.6.34/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 +@@ -900,9 +900,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.34/fs-compat_rw_copy_check_uvector-add-missing-compat_ptr-call.patch b/queue-2.6.34/fs-compat_rw_copy_check_uvector-add-missing-compat_ptr-call.patch new file mode 100644 index 00000000000..09290af1b48 --- /dev/null +++ b/queue-2.6.34/fs-compat_rw_copy_check_uvector-add-missing-compat_ptr-call.patch @@ -0,0 +1,37 @@ +From 7cbe17701a0379c7b05a79a6df4f24e41d2afde8 Mon Sep 17 00:00:00 2001 +From: Heiko Carstens +Date: Fri, 4 Jun 2010 14:14:47 -0700 +Subject: fs/compat_rw_copy_check_uvector: add missing compat_ptr call + +From: Heiko Carstens + +commit 7cbe17701a0379c7b05a79a6df4f24e41d2afde8 upstream. + +A call to access_ok is missing a compat_ptr conversion. Introduced with +b83733639a494d5f42fa00a2506563fbd2d3015d "compat: factor out +compat_rw_copy_check_uvector from compat_do_readv_writev" + +fs/compat.c: In function 'compat_rw_copy_check_uvector': +fs/compat.c:629: warning: passing argument 1 of '__access_ok' makes pointer from integer without a cast + +Signed-off-by: Heiko Carstens +Reviewed-by: Jeff Moyer +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/compat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/compat.c ++++ b/fs/compat.c +@@ -626,7 +626,7 @@ ssize_t compat_rw_copy_check_uvector(int + tot_len += len; + if (tot_len < tmp) /* maths overflow on the compat_ssize_t */ + goto out; +- if (!access_ok(vrfy_dir(type), buf, len)) { ++ if (!access_ok(vrfy_dir(type), compat_ptr(buf), len)) { + ret = -EFAULT; + goto out; + } diff --git a/queue-2.6.34/gconfig-fix-build-failure-on-fedora-13.patch b/queue-2.6.34/gconfig-fix-build-failure-on-fedora-13.patch new file mode 100644 index 00000000000..dab18cbb0a3 --- /dev/null +++ b/queue-2.6.34/gconfig-fix-build-failure-on-fedora-13.patch @@ -0,0 +1,41 @@ +From cbab05f041a4cff6ca15856bdd35238b282b64eb Mon Sep 17 00:00:00 2001 +From: Richard Kennedy +Date: Thu, 27 May 2010 10:22:28 +0100 +Subject: gconfig: fix build failure on fedora 13 + +From: Richard Kennedy + +commit cbab05f041a4cff6ca15856bdd35238b282b64eb upstream. + +Making gconfig fails on fedora 13 as the linker cannot resolve dlsym. + +Adding libdl to the link command fixes this. + +make shows this error :- + /usr/bin/ld: scripts/kconfig/kconfig_load.o: undefined reference to symbol 'dlsym@@GLIBC_2.2.5' + /usr/bin/ld: note: 'dlsym@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line + /lib64/libdl.so.2: could not read symbols: Invalid operation + +tested on x86_64 fedora 13. + +Signed-off-by: Richard Kennedy +Reviewed-by: WANG Cong +Signed-off-by: Andrew Morton +Signed-off-by: Michal Marek +Signed-off-by: Greg Kroah-Hartman + +--- + scripts/kconfig/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/kconfig/Makefile ++++ b/scripts/kconfig/Makefile +@@ -208,7 +208,7 @@ HOSTCFLAGS_zconf.tab.o := -I$(src) + HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl + HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK + +-HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` ++HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl + HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ + -D LKC_DIRECT_LINK + diff --git a/queue-2.6.34/hwmon-ltc4245-read-only-one-gpio-pin.patch b/queue-2.6.34/hwmon-ltc4245-read-only-one-gpio-pin.patch new file mode 100644 index 00000000000..9bca0473ec7 --- /dev/null +++ b/queue-2.6.34/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.34/ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch b/queue-2.6.34/ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch new file mode 100644 index 00000000000..8cdef7d7774 --- /dev/null +++ b/queue-2.6.34/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 +@@ -314,9 +314,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.34/series b/queue-2.6.34/series index 31bbcbcc964..463678328bd 100644 --- a/queue-2.6.34/series +++ b/queue-2.6.34/series @@ -111,3 +111,29 @@ arm-6144-1-tcm-memory-bug-freeing-bug.patch arm-vfp-fix-vfp_put_double-for-d16-d31.patch aio-fix-the-compat-vectored-operations.patch idr-fix-backtrack-logic-in-idr_remove_all.patch +asoc-update-freescale-i.mx-ssi-driver-dma-parameter-handling.patch +asoc-fix-db-scales-for-wm835x.patch +asoc-fix-db-scales-for-wm8400.patch +asoc-fix-db-scales-for-wm8990.patch +drm-radeon-fix-the-r100-r200-ums-block-0-page-fix.patch +slub-allow-full-duplication-of-kmalloc-array-for-390.patch +slub-move-kmem_cache_node-into-it-s-own-cacheline.patch +hwmon-ltc4245-read-only-one-gpio-pin.patch +signals-check_kill_permission-don-t-check-creds-if-same_thread_group.patch +compat-factor-out-compat_rw_copy_check_uvector-from-compat_do_readv_writev.patch +fs-compat_rw_copy_check_uvector-add-missing-compat_ptr-call.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 +vmware-balloon-clamp-number-of-collected-non-balloonable-pages.patch +staging-comedi-correct-parameter-gainlkup-for-daqcard-6024e-in-driver-ni_mio_cs.c.patch +clocksource-sh_tmu-compute-mult-and-shift-before-registration.patch +clocksource-sh_cmt-compute-mult-and-shift-before-registration.patch +gconfig-fix-build-failure-on-fedora-13.patch +arch-x86-kernel-add-missing-spin_unlock.patch diff --git a/queue-2.6.34/signals-check_kill_permission-don-t-check-creds-if-same_thread_group.patch b/queue-2.6.34/signals-check_kill_permission-don-t-check-creds-if-same_thread_group.patch new file mode 100644 index 00000000000..6566e987216 --- /dev/null +++ b/queue-2.6.34/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 +@@ -642,7 +642,7 @@ static inline bool si_fromuser(const str + 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; + +@@ -656,8 +656,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.34/slub-allow-full-duplication-of-kmalloc-array-for-390.patch b/queue-2.6.34/slub-allow-full-duplication-of-kmalloc-array-for-390.patch new file mode 100644 index 00000000000..7419b378f0a --- /dev/null +++ b/queue-2.6.34/slub-allow-full-duplication-of-kmalloc-array-for-390.patch @@ -0,0 +1,34 @@ +From 0f1f694260e0d35b5ce7d471f6e679c3dd4d7d94 Mon Sep 17 00:00:00 2001 +From: Christoph Lameter +Date: Thu, 27 May 2010 09:17:17 -0500 +Subject: SLUB: Allow full duplication of kmalloc array for 390 + +From: Christoph Lameter + +commit 0f1f694260e0d35b5ce7d471f6e679c3dd4d7d94 upstream. + +Commit 756dee75872a2a764b478e18076360b8a4ec9045 ("SLUB: Get rid of dynamic DMA +kmalloc cache allocation") makes S390 run out of kmalloc caches. Increase the +number of kmalloc caches to a safe size. + +Reported-by: Heiko Carstens +Tested-by: Heiko Carstens +Signed-off-by: Christoph Lameter +Signed-off-by: Pekka Enberg +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/slub_def.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/slub_def.h ++++ b/include/linux/slub_def.h +@@ -132,7 +132,7 @@ struct kmem_cache { + #ifdef CONFIG_ZONE_DMA + #define SLUB_DMA __GFP_DMA + /* Reserve extra caches for potential DMA use */ +-#define KMALLOC_CACHES (2 * SLUB_PAGE_SHIFT - 6) ++#define KMALLOC_CACHES (2 * SLUB_PAGE_SHIFT) + #else + /* Disable DMA functionality */ + #define SLUB_DMA (__force gfp_t)0 diff --git a/queue-2.6.34/slub-move-kmem_cache_node-into-it-s-own-cacheline.patch b/queue-2.6.34/slub-move-kmem_cache_node-into-it-s-own-cacheline.patch new file mode 100644 index 00000000000..1401d77f1d6 --- /dev/null +++ b/queue-2.6.34/slub-move-kmem_cache_node-into-it-s-own-cacheline.patch @@ -0,0 +1,112 @@ +From 73367bd8eef4f4eb311005886aaa916013073265 Mon Sep 17 00:00:00 2001 +From: Alexander Duyck +Date: Fri, 21 May 2010 14:41:35 -0700 +Subject: slub: move kmem_cache_node into it's own cacheline + +From: Alexander Duyck + +commit 73367bd8eef4f4eb311005886aaa916013073265 upstream. + +This patch is meant to improve the performance of SLUB by moving the local +kmem_cache_node lock into it's own cacheline separate from kmem_cache. +This is accomplished by simply removing the local_node when NUMA is enabled. + +On my system with 2 nodes I saw around a 5% performance increase w/ +hackbench times dropping from 6.2 seconds to 5.9 seconds on average. I +suspect the performance gain would increase as the number of nodes +increases, but I do not have the data to currently back that up. + +Bugzilla-Reference: http://bugzilla.kernel.org/show_bug.cgi?id=15713 +Reported-by: Alex Shi +Tested-by: Alex Shi +Acked-by: Yanmin Zhang +Acked-by: Christoph Lameter +Signed-off-by: Alexander Duyck +Signed-off-by: Pekka Enberg +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/slub_def.h | 9 +++------ + mm/slub.c | 33 +++++++++++---------------------- + 2 files changed, 14 insertions(+), 28 deletions(-) + +--- a/include/linux/slub_def.h ++++ b/include/linux/slub_def.h +@@ -75,12 +75,6 @@ struct kmem_cache { + int offset; /* Free pointer offset. */ + struct kmem_cache_order_objects oo; + +- /* +- * Avoid an extra cache line for UP, SMP and for the node local to +- * struct kmem_cache. +- */ +- struct kmem_cache_node local_node; +- + /* Allocation and freeing of slabs */ + struct kmem_cache_order_objects max; + struct kmem_cache_order_objects min; +@@ -102,6 +96,9 @@ struct kmem_cache { + */ + int remote_node_defrag_ratio; + struct kmem_cache_node *node[MAX_NUMNODES]; ++#else ++ /* Avoid an extra cache line for UP */ ++ struct kmem_cache_node local_node; + #endif + }; + +--- a/mm/slub.c ++++ b/mm/slub.c +@@ -2141,7 +2141,7 @@ static void free_kmem_cache_nodes(struct + + for_each_node_state(node, N_NORMAL_MEMORY) { + struct kmem_cache_node *n = s->node[node]; +- if (n && n != &s->local_node) ++ if (n) + kmem_cache_free(kmalloc_caches, n); + s->node[node] = NULL; + } +@@ -2150,33 +2150,22 @@ static void free_kmem_cache_nodes(struct + static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags) + { + int node; +- int local_node; +- +- if (slab_state >= UP && (s < kmalloc_caches || +- s >= kmalloc_caches + KMALLOC_CACHES)) +- local_node = page_to_nid(virt_to_page(s)); +- else +- local_node = 0; + + for_each_node_state(node, N_NORMAL_MEMORY) { + struct kmem_cache_node *n; + +- if (local_node == node) +- n = &s->local_node; +- else { +- if (slab_state == DOWN) { +- early_kmem_cache_node_alloc(gfpflags, node); +- continue; +- } +- n = kmem_cache_alloc_node(kmalloc_caches, +- gfpflags, node); +- +- if (!n) { +- free_kmem_cache_nodes(s); +- return 0; +- } ++ if (slab_state == DOWN) { ++ early_kmem_cache_node_alloc(gfpflags, node); ++ continue; ++ } ++ n = kmem_cache_alloc_node(kmalloc_caches, ++ gfpflags, node); + ++ if (!n) { ++ free_kmem_cache_nodes(s); ++ return 0; + } ++ + s->node[node] = n; + init_kmem_cache_node(n, s); + } diff --git a/queue-2.6.34/staging-comedi-correct-parameter-gainlkup-for-daqcard-6024e-in-driver-ni_mio_cs.c.patch b/queue-2.6.34/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.34/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.34/vmware-balloon-clamp-number-of-collected-non-balloonable-pages.patch b/queue-2.6.34/vmware-balloon-clamp-number-of-collected-non-balloonable-pages.patch new file mode 100644 index 00000000000..7988bd69eb4 --- /dev/null +++ b/queue-2.6.34/vmware-balloon-clamp-number-of-collected-non-balloonable-pages.patch @@ -0,0 +1,86 @@ +From 55adaa495edc429be84399f83df80dfb7f36598b Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Fri, 4 Jun 2010 14:14:52 -0700 +Subject: vmware balloon: clamp number of collected non-balloonable pages + +From: Dmitry Torokhov + +commit 55adaa495edc429be84399f83df80dfb7f36598b upstream. + +Limit number of accumulated non-balloonable pages during inflation cycle, +otherwise there is a chance we will be spinning and growing the list +forever. This happens during torture tests when balloon target changes +while we are in the middle of inflation cycle and monitor starts refusing +to lock pages (since they are not needed anymore). + +Signed-off-by: Dmitry Torokhov +Acked-by: Bhavesh Davda +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/vmware_balloon.c | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +--- a/drivers/misc/vmware_balloon.c ++++ b/drivers/misc/vmware_balloon.c +@@ -45,7 +45,7 @@ + + MODULE_AUTHOR("VMware, Inc."); + MODULE_DESCRIPTION("VMware Memory Control (Balloon) Driver"); +-MODULE_VERSION("1.2.1.0-K"); ++MODULE_VERSION("1.2.1.1-k"); + MODULE_ALIAS("dmi:*:svnVMware*:*"); + MODULE_ALIAS("vmware_vmmemctl"); + MODULE_LICENSE("GPL"); +@@ -101,6 +101,8 @@ MODULE_LICENSE("GPL"); + /* Maximum number of page allocations without yielding processor */ + #define VMW_BALLOON_YIELD_THRESHOLD 1024 + ++/* Maximum number of refused pages we accumulate during inflation cycle */ ++#define VMW_BALLOON_MAX_REFUSED 16 + + /* + * Hypervisor communication port definitions. +@@ -183,6 +185,7 @@ struct vmballoon { + + /* transient list of non-balloonable pages */ + struct list_head refused_pages; ++ unsigned int n_refused_pages; + + /* balloon size in pages */ + unsigned int size; +@@ -428,14 +431,21 @@ static int vmballoon_reserve_page(struct + /* inform monitor */ + locked = vmballoon_send_lock_page(b, page_to_pfn(page)); + if (!locked) { ++ STATS_INC(b->stats.refused_alloc); ++ + if (b->reset_required) { + __free_page(page); + return -EIO; + } + +- /* place on list of non-balloonable pages, retry allocation */ ++ /* ++ * Place page on the list of non-balloonable pages ++ * and retry allocation, unless we already accumulated ++ * too many of them, in which case take a breather. ++ */ + list_add(&page->lru, &b->refused_pages); +- STATS_INC(b->stats.refused_alloc); ++ if (++b->n_refused_pages >= VMW_BALLOON_MAX_REFUSED) ++ return -EIO; + } + } while (!locked); + +@@ -483,6 +493,8 @@ static void vmballoon_release_refused_pa + __free_page(page); + STATS_INC(b->stats.refused_free); + } ++ ++ b->n_refused_pages = 0; + } + + /* diff --git a/queue-2.6.34/x86-setup-phoenix-bios-fixup-is-needed-on-dell-inspiron-mini-1012.patch b/queue-2.6.34/x86-setup-phoenix-bios-fixup-is-needed-on-dell-inspiron-mini-1012.patch new file mode 100644 index 00000000000..c539106559b --- /dev/null +++ b/queue-2.6.34/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 +@@ -676,6 +676,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.34/xen-avoid-allocation-causing-potential-swap-activity-on-the-resume-path.patch b/queue-2.6.34/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.34/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.34/xen-ensure-timer-tick-is-resumed-even-on-cpu-driving-the-resume.patch b/queue-2.6.34/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.34/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); + }