From: Greg Kroah-Hartman Date: Tue, 18 Feb 2014 22:04:21 +0000 (-0800) Subject: 3.13-stable patches X-Git-Tag: v3.4.81~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a54bb5766817cb7de525cff07f244f7d8ecf68c6;p=thirdparty%2Fkernel%2Fstable-queue.git 3.13-stable patches added patches: arm-imx6-initialize-low-power-mode-early-again.patch intel_pstate-take-core-c0-time-into-account-for-core-busy-calculation.patch --- diff --git a/queue-3.13/alsa-hda-realtek-avoid-invalid-coefs-for-alc271x.patch b/queue-3.13/alsa-hda-realtek-avoid-invalid-coefs-for-alc271x.patch deleted file mode 100644 index bb0803d06ef..00000000000 --- a/queue-3.13/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 -@@ -4417,6 +4417,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.13/arm-imx6-initialize-low-power-mode-early-again.patch b/queue-3.13/arm-imx6-initialize-low-power-mode-early-again.patch new file mode 100644 index 00000000000..742676e7dfe --- /dev/null +++ b/queue-3.13/arm-imx6-initialize-low-power-mode-early-again.patch @@ -0,0 +1,71 @@ +From e7c57ecd6019cc6392223605aed18cce257c3eff Mon Sep 17 00:00:00 2001 +From: Philipp Zabel +Date: Wed, 29 Jan 2014 17:10:04 +0100 +Subject: ARM: imx6: Initialize low-power mode early again + +From: Philipp Zabel + +commit e7c57ecd6019cc6392223605aed18cce257c3eff upstream. + +Since commit 9e8147bb5ec5d1dda2141da70f96b98985a306cb +"ARM: imx6q: move low-power code out of clock driver" +the kernel fails to boot on i.MX6Q/D if preemption is +enabled (CONFIG_PREEMPT=y). The kernel just hangs +before the console comes up. + +The above commit moved the initalization of the low-power +mode setting (enabling clocked WAIT states), which was +introduced in commit 83ae20981ae924c37d02a42c829155fc3851260c +"ARM: imx: correct low-power mode setting", from +imx6q_clks_init to imx6q_pm_init. Now it is called +much later, after all cores are enabled. + +This patch moves the low-power mode initialization back +to imx6q_clks_init again (and to imx6sl_clks_init). + +Signed-off-by: Philipp Zabel +Signed-off-by: Shawn Guo +Signed-off-by: Kevin Hilman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-imx/clk-imx6q.c | 3 +++ + arch/arm/mach-imx/clk-imx6sl.c | 3 +++ + arch/arm/mach-imx/pm-imx6q.c | 2 -- + 3 files changed, 6 insertions(+), 2 deletions(-) + +--- a/arch/arm/mach-imx/clk-imx6q.c ++++ b/arch/arm/mach-imx/clk-imx6q.c +@@ -479,6 +479,9 @@ static void __init imx6q_clocks_init(str + if (IS_ENABLED(CONFIG_PCI_IMX6)) + clk_set_parent(clk[lvds1_sel], clk[sata_ref]); + ++ /* Set initial power mode */ ++ imx6q_set_lpm(WAIT_CLOCKED); ++ + np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); + base = of_iomap(np, 0); + WARN_ON(!base); +--- a/arch/arm/mach-imx/clk-imx6sl.c ++++ b/arch/arm/mach-imx/clk-imx6sl.c +@@ -261,6 +261,9 @@ static void __init imx6sl_clocks_init(st + clk_prepare_enable(clks[IMX6SL_CLK_USBPHY2_GATE]); + } + ++ /* Set initial power mode */ ++ imx6q_set_lpm(WAIT_CLOCKED); ++ + np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt"); + base = of_iomap(np, 0); + WARN_ON(!base); +--- a/arch/arm/mach-imx/pm-imx6q.c ++++ b/arch/arm/mach-imx/pm-imx6q.c +@@ -228,8 +228,6 @@ void __init imx6q_pm_init(void) + regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_GINT, + IMX6Q_GPR1_GINT); + +- /* Set initial power mode */ +- imx6q_set_lpm(WAIT_CLOCKED); + + suspend_set_ops(&imx6q_pm_ops); + } diff --git a/queue-3.13/intel_pstate-take-core-c0-time-into-account-for-core-busy-calculation.patch b/queue-3.13/intel_pstate-take-core-c0-time-into-account-for-core-busy-calculation.patch new file mode 100644 index 00000000000..fe094dfb1f7 --- /dev/null +++ b/queue-3.13/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 +@@ -54,6 +54,7 @@ struct sample { + int32_t core_pct_busy; + u64 aperf; + u64 mperf; ++ unsigned long long tsc; + int freq; + }; + +@@ -88,6 +89,7 @@ struct cpudata { + + u64 prev_aperf; + u64 prev_mperf; ++ unsigned long long prev_tsc; + int sample_ptr; + struct sample samples[SAMPLE_COUNT]; + }; +@@ -499,11 +501,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.13/series b/queue-3.13/series index 3e688c15d40..2a2725d9390 100644 --- a/queue-3.13/series +++ b/queue-3.13/series @@ -15,7 +15,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-fix-silent-output-on-toshiba-satellite-l40.patch alsa-hda-add-missing-mixer-widget-for-ad1983.patch @@ -37,3 +36,5 @@ pinctrl-imx27-fix-offset-calculation-in-imx_read_2bit.patch pinctrl-vt8500-change-devicetree-data-parsing.patch pinctrl-protect-pinctrl_list-add.patch bcache-fix-bug_on-due-to-integer-overflow-with-gc_sectors_used.patch +intel_pstate-take-core-c0-time-into-account-for-core-busy-calculation.patch +arm-imx6-initialize-low-power-mode-early-again.patch