From: Greg Kroah-Hartman Date: Tue, 18 Feb 2014 22:04:16 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v3.4.81~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3e040e1aff289197d87ce14680ae7385e7d1d97;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: ib-qib-convert-qib_user_sdma_pin_pages-to-use.patch intel_pstate-take-core-c0-time-into-account-for-core-busy-calculation.patch --- diff --git a/queue-3.10/alsa-hda-realtek-avoid-invalid-coefs-for-alc271x.patch b/queue-3.10/alsa-hda-realtek-avoid-invalid-coefs-for-alc271x.patch deleted file mode 100644 index 7fb1256ffde..00000000000 --- a/queue-3.10/alsa-hda-realtek-avoid-invalid-coefs-for-alc271x.patch +++ /dev/null @@ -1,38 +0,0 @@ -From d3c56568f43807135f2c2a09582a69f809f0d8b7 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai -Date: Mon, 3 Feb 2014 09:56:13 +0100 -Subject: ALSA: hda/realtek - Avoid invalid COEFs for ALC271X - -From: Takashi Iwai - -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 -Signed-off-by: Greg Kroah-Hartman - ---- - 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); diff --git a/queue-3.10/ib-qib-convert-qib_user_sdma_pin_pages-to-use.patch b/queue-3.10/ib-qib-convert-qib_user_sdma_pin_pages-to-use.patch new file mode 100644 index 00000000000..2cbeeb2d94d --- /dev/null +++ b/queue-3.10/ib-qib-convert-qib_user_sdma_pin_pages-to-use.patch @@ -0,0 +1,61 @@ +From 603e7729920e42b3c2f4dbfab9eef4878cb6e8fa Mon Sep 17 00:00:00 2001 +From: Jan Kara +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 + +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 +Signed-off-by: Jan Kara +Signed-off-by: Roland Dreier +[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 +Signed-off-by: Mike Marciniszyn +Signed-off-by: Greg Kroah-Hartman + +--- + 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 { diff --git a/queue-3.10/intel_pstate-take-core-c0-time-into-account-for-core-busy-calculation.patch b/queue-3.10/intel_pstate-take-core-c0-time-into-account-for-core-busy-calculation.patch new file mode 100644 index 00000000000..d3c6d9de24a --- /dev/null +++ b/queue-3.10/intel_pstate-take-core-c0-time-into-account-for-core-busy-calculation.patch @@ -0,0 +1,62 @@ +From fcb6a15c2e7e76d493e6f91ea889ab40e1c643a4 Mon Sep 17 00:00:00 2001 +From: Dirk Brandewie +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 + +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+ # 3.10+ +Signed-off-by: Dirk Brandewie +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + 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) diff --git a/queue-3.10/series b/queue-3.10/series index 36d3aa21498..0024a953650 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -10,7 +10,6 @@ arm64-invalidate-the-tlb-when-replacing-pmd-entries-during-boot.patch 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 @@ -22,3 +21,5 @@ x86-hweight-fix-bug-when-booting-with-config_gcov_profile_all-y.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