--- /dev/null
+From ca3649de026ff95c6f2847e8d096cf2f411c02b3 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 19 Apr 2012 15:15:25 +0200
+Subject: ALSA: hda/conexant - Don't set HP pin-control bit unconditionally
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit ca3649de026ff95c6f2847e8d096cf2f411c02b3 upstream.
+
+Some output pins on Conexant chips have no HP control bit, but the
+auto-parser initializes these pins unconditionally with PIN_HP.
+
+Check the pin-capability and avoid the HP bit if not supported.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_conexant.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/hda/patch_conexant.c
++++ b/sound/pci/hda/patch_conexant.c
+@@ -4003,9 +4003,14 @@ static void cx_auto_init_output(struct h
+ int i;
+
+ mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids);
+- for (i = 0; i < cfg->hp_outs; i++)
++ for (i = 0; i < cfg->hp_outs; i++) {
++ unsigned int val = PIN_OUT;
++ if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) &
++ AC_PINCAP_HP_DRV)
++ val |= AC_PINCTL_HP_EN;
+ snd_hda_codec_write(codec, cfg->hp_pins[i], 0,
+- AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP);
++ AC_VERB_SET_PIN_WIDGET_CONTROL, val);
++ }
+ mute_outputs(codec, cfg->hp_outs, cfg->hp_pins);
+ mute_outputs(codec, cfg->line_outs, cfg->line_out_pins);
+ mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins);
--- /dev/null
+From 7a6fbc9a887193a1e9f8658703881c528040afbc Mon Sep 17 00:00:00 2001
+From: Alexander Shiyan <shc_work@mail.ru>
+Date: Tue, 27 Mar 2012 12:22:49 +0400
+Subject: ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR
+
+From: Alexander Shiyan <shc_work@mail.ru>
+
+commit 7a6fbc9a887193a1e9f8658703881c528040afbc upstream.
+
+Since 2.6.30-rc1 clps711x serial driver hungs system. This is a result
+of call disable_irq from ISR. synchronize_irq waits for end of interrupt
+and goes to infinite loop. This patch fix this problem.
+
+Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/clps711x.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/drivers/tty/serial/clps711x.c
++++ b/drivers/tty/serial/clps711x.c
+@@ -154,10 +154,9 @@ static irqreturn_t clps711xuart_int_tx(i
+ port->x_char = 0;
+ return IRQ_HANDLED;
+ }
+- if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
+- clps711xuart_stop_tx(port);
+- return IRQ_HANDLED;
+- }
++
++ if (uart_circ_empty(xmit) || uart_tx_stopped(port))
++ goto disable_tx_irq;
+
+ count = port->fifosize >> 1;
+ do {
+@@ -171,8 +170,11 @@ static irqreturn_t clps711xuart_int_tx(i
+ if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+ uart_write_wakeup(port);
+
+- if (uart_circ_empty(xmit))
+- clps711xuart_stop_tx(port);
++ if (uart_circ_empty(xmit)) {
++ disable_tx_irq:
++ disable_irq_nosync(TX_IRQ(port));
++ tx_enabled(port) = 0;
++ }
+
+ return IRQ_HANDLED;
+ }
--- /dev/null
+From 25c3d30c918207556ae1d6e663150ebdf902186b Mon Sep 17 00:00:00 2001
+From: Kent Yoder <key@linux.vnet.ibm.com>
+Date: Thu, 5 Apr 2012 20:34:20 +0800
+Subject: crypto: sha512 - Fix byte counter overflow in SHA-512
+
+From: Kent Yoder <key@linux.vnet.ibm.com>
+
+commit 25c3d30c918207556ae1d6e663150ebdf902186b upstream.
+
+The current code only increments the upper 64 bits of the SHA-512 byte
+counter when the number of bytes hashed happens to hit 2^64 exactly.
+
+This patch increments the upper 64 bits whenever the lower 64 bits
+overflows.
+
+Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ crypto/sha512_generic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/crypto/sha512_generic.c
++++ b/crypto/sha512_generic.c
+@@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, c
+ index = sctx->count[0] & 0x7f;
+
+ /* Update number of bytes */
+- if (!(sctx->count[0] += len))
++ if ((sctx->count[0] += len) < len)
+ sctx->count[1]++;
+
+ part_len = 128 - index;
--- /dev/null
+From 00250ec90963b7ef6678438888f3244985ecde14 Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara@amd.com>
+Date: Mon, 9 Apr 2012 18:16:34 -0400
+Subject: hwmon: fam15h_power: fix bogus values with current BIOSes
+
+From: Andre Przywara <andre.przywara@amd.com>
+
+commit 00250ec90963b7ef6678438888f3244985ecde14 upstream.
+
+Newer BKDG[1] versions recommend a different initialization value for
+the running average range register in the northbridge. This improves
+the power reading by avoiding counter saturations resulting in bogus
+values for anything below about 80% of TDP power consumption.
+Updated BIOSes will have this new value set up from the beginning,
+but meanwhile we correct this value ourselves.
+This needs to be done on all northbridges, even on those where the
+driver itself does not register at.
+
+This fixes the driver on all current machines to provide proper
+values for idle load.
+
+[1]
+http://support.amd.com/us/Processor_TechDocs/42301_15h_Mod_00h-0Fh_BKDG.pdf
+Chapter 3.8: D18F5xE0 Processor TDP Running Average (p. 452)
+
+Signed-off-by: Andre Przywara <andre.przywara@amd.com>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+[guenter.roeck@ericsson.com: Removed unnecessary return statement]
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/fam15h_power.c | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+--- a/drivers/hwmon/fam15h_power.c
++++ b/drivers/hwmon/fam15h_power.c
+@@ -122,6 +122,38 @@ static bool __devinit fam15h_power_is_in
+ return true;
+ }
+
++/*
++ * Newer BKDG versions have an updated recommendation on how to properly
++ * initialize the running average range (was: 0xE, now: 0x9). This avoids
++ * counter saturations resulting in bogus power readings.
++ * We correct this value ourselves to cope with older BIOSes.
++ */
++static void __devinit tweak_runavg_range(struct pci_dev *pdev)
++{
++ u32 val;
++ const struct pci_device_id affected_device = {
++ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) };
++
++ /*
++ * let this quirk apply only to the current version of the
++ * northbridge, since future versions may change the behavior
++ */
++ if (!pci_match_id(&affected_device, pdev))
++ return;
++
++ pci_bus_read_config_dword(pdev->bus,
++ PCI_DEVFN(PCI_SLOT(pdev->devfn), 5),
++ REG_TDP_RUNNING_AVERAGE, &val);
++ if ((val & 0xf) != 0xe)
++ return;
++
++ val &= ~0xf;
++ val |= 0x9;
++ pci_bus_write_config_dword(pdev->bus,
++ PCI_DEVFN(PCI_SLOT(pdev->devfn), 5),
++ REG_TDP_RUNNING_AVERAGE, val);
++}
++
+ static void __devinit fam15h_power_init_data(struct pci_dev *f4,
+ struct fam15h_power_data *data)
+ {
+@@ -155,6 +187,13 @@ static int __devinit fam15h_power_probe(
+ struct device *dev;
+ int err;
+
++ /*
++ * though we ignore every other northbridge, we still have to
++ * do the tweaking on _each_ node in MCM processors as the counters
++ * are working hand-in-hand
++ */
++ tweak_runavg_range(pdev);
++
+ if (!fam15h_power_is_internal_node0(pdev)) {
+ err = -ENODEV;
+ goto exit;
perf-fix-build-breakage.patch
+crypto-sha512-fix-byte-counter-overflow-in-sha-512.patch
+hwmon-fam15h_power-fix-bogus-values-with-current-bioses.patch
+alsa-hda-conexant-don-t-set-hp-pin-control-bit.patch
+arm-clps711x-serial-driver-hungs-are-a-result-of-call-disable_irq-within-isr.patch