+++ /dev/null
-From d3c56568f43807135f2c2a09582a69f809f0d8b7 Mon Sep 17 00:00:00 2001
-From: Takashi Iwai <tiwai@suse.de>
-Date: Mon, 3 Feb 2014 09:56:13 +0100
-Subject: ALSA: hda/realtek - Avoid invalid COEFs for ALC271X
-
-From: Takashi Iwai <tiwai@suse.de>
-
-commit d3c56568f43807135f2c2a09582a69f809f0d8b7 upstream.
-
-We've seen often problems after suspend/resume on Acer Aspire One
-AO725 with ALC271X codec as reported in kernel bugzilla, and it turned
-out that some COEFs doesn't work and triggers the codec communication
-stall.
-
-Since these magic COEF setups are specific to ALC269VB for some PLL
-configurations, the machine works even without these manual
-adjustment. So, let's simply avoid applying them for ALC271X.
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52181
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- sound/pci/hda/patch_realtek.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/sound/pci/hda/patch_realtek.c
-+++ b/sound/pci/hda/patch_realtek.c
-@@ -3790,6 +3790,9 @@ static void alc269_fill_coef(struct hda_
-
- if (spec->codec_variant != ALC269_TYPE_ALC269VB)
- return;
-+ /* ALC271X doesn't seem to support these COEFs (bko#52181) */
-+ if (!strcmp(codec->chip_name, "ALC271X"))
-+ return;
-
- if ((alc_get_coef0(codec) & 0x00ff) < 0x015) {
- alc_write_coef_idx(codec, 0xf, 0x960b);
--- /dev/null
+From 603e7729920e42b3c2f4dbfab9eef4878cb6e8fa Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Fri, 4 Oct 2013 09:29:12 -0400
+Subject: IB/qib: Convert qib_user_sdma_pin_pages() to use
+ get_user_pages_fast()
+
+From: Jan Kara <jack@suse.cz>
+
+commit 603e7729920e42b3c2f4dbfab9eef4878cb6e8fa upstream.
+
+qib_user_sdma_queue_pkts() gets called with mmap_sem held for
+writing. Except for get_user_pages() deep down in
+qib_user_sdma_pin_pages() we don't seem to need mmap_sem at all. Even
+more interestingly the function qib_user_sdma_queue_pkts() (and also
+qib_user_sdma_coalesce() called somewhat later) call copy_from_user()
+which can hit a page fault and we deadlock on trying to get mmap_sem
+when handling that fault.
+
+So just make qib_user_sdma_pin_pages() use get_user_pages_fast() and
+leave mmap_sem locking for mm.
+
+This deadlock has actually been observed in the wild when the node
+is under memory pressure.
+
+Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Roland Dreier <roland@purestorage.com>
+[Backported to 3.10: (Thanks to Ben Huthings)
+ - Adjust context
+ - Adjust indentation and nr_pages argument in qib_user_sdma_pin_pages()]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/infiniband/hw/qib/qib_user_sdma.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+--- a/drivers/infiniband/hw/qib/qib_user_sdma.c
++++ b/drivers/infiniband/hw/qib/qib_user_sdma.c
+@@ -284,8 +284,7 @@ static int qib_user_sdma_pin_pages(const
+ int j;
+ int ret;
+
+- ret = get_user_pages(current, current->mm, addr,
+- npages, 0, 1, pages, NULL);
++ ret = get_user_pages_fast(addr, npages, 0, pages);
+
+ if (ret != npages) {
+ int i;
+@@ -830,10 +829,7 @@ int qib_user_sdma_writev(struct qib_ctxt
+ while (dim) {
+ const int mxp = 8;
+
+- down_write(¤t->mm->mmap_sem);
+ ret = qib_user_sdma_queue_pkts(dd, pq, &list, iov, dim, mxp);
+- up_write(¤t->mm->mmap_sem);
+-
+ if (ret <= 0)
+ goto done_unlock;
+ else {
--- /dev/null
+From fcb6a15c2e7e76d493e6f91ea889ab40e1c643a4 Mon Sep 17 00:00:00 2001
+From: Dirk Brandewie <dirk.j.brandewie@intel.com>
+Date: Mon, 3 Feb 2014 08:55:31 -0800
+Subject: intel_pstate: Take core C0 time into account for core busy calculation
+
+From: Dirk Brandewie <dirk.j.brandewie@intel.com>
+
+commit fcb6a15c2e7e76d493e6f91ea889ab40e1c643a4 upstream.
+
+Take non-idle time into account when calculating core busy time.
+This ensures that intel_pstate will notice a decrease in load.
+
+References: https://bugzilla.kernel.org/show_bug.cgi?id=66581
+Cc: 3.10+ <stable@vger.kernel.org> # 3.10+
+Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/cpufreq/intel_pstate.c | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+--- a/drivers/cpufreq/intel_pstate.c
++++ b/drivers/cpufreq/intel_pstate.c
+@@ -51,6 +51,7 @@ struct sample {
+ int32_t core_pct_busy;
+ u64 aperf;
+ u64 mperf;
++ unsigned long long tsc;
+ int freq;
+ };
+
+@@ -86,6 +87,7 @@ struct cpudata {
+
+ u64 prev_aperf;
+ u64 prev_mperf;
++ unsigned long long prev_tsc;
+ int sample_ptr;
+ struct sample samples[SAMPLE_COUNT];
+ };
+@@ -435,11 +437,17 @@ static inline void intel_pstate_calc_bus
+ struct sample *sample)
+ {
+ u64 core_pct;
+- core_pct = div64_u64(int_tofp(sample->aperf * 100),
+- sample->mperf);
+- sample->freq = fp_toint(cpu->pstate.max_pstate * core_pct * 1000);
++ u64 c0_pct;
+
+- sample->core_pct_busy = core_pct;
++ core_pct = div64_u64(sample->aperf * 100, sample->mperf);
++
++ c0_pct = div64_u64(sample->mperf * 100, sample->tsc);
++ sample->freq = fp_toint(
++ mul_fp(int_tofp(cpu->pstate.max_pstate),
++ int_tofp(core_pct * 1000)));
++
++ sample->core_pct_busy = mul_fp(int_tofp(core_pct),
++ div_fp(int_tofp(c0_pct + 1), int_tofp(100)));
+ }
+
+ static inline void intel_pstate_sample(struct cpudata *cpu)
arm64-vdso-fix-coarse-clock-handling.patch
arm64-add-dsb-after-icache-flush-in-__flush_icache_all.patch
alsa-usb-audio-add-missing-kconfig-dependecy.patch
-alsa-hda-realtek-avoid-invalid-coefs-for-alc271x.patch
alsa-hda-fix-missing-vref-setup-for-mac-pro-1-1.patch
alsa-hda-add-missing-mixer-widget-for-ad1983.patch
mm-__set_page_dirty_nobuffers-uses-spin_lock_irqsave-instead-of-spin_lock_irq.patch
pinctrl-vt8500-change-devicetree-data-parsing.patch
pinctrl-protect-pinctrl_list-add.patch
mm-memory-failure.c-fix-memory-leak-in-successful-soft-offlining.patch
+ib-qib-convert-qib_user_sdma_pin_pages-to-use.patch
+intel_pstate-take-core-c0-time-into-account-for-core-busy-calculation.patch