From 9bd7197d04197b887c839ca0ea530a3b3fd1ed76 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 14 Jul 2014 11:20:48 -0700 Subject: [PATCH] 3.15-stable patches added patches: arm64-implement-task_size_of.patch clk-qcom-hdmi-source-sel-is-3-not-2.patch clk-s2mps11-fix-double-free-corruption-during-driver-unbind.patch clk-spear3xx-use-proper-control-register-offset.patch cpufreq-makefile-fix-compilation-for-davinci-platform.patch crypto-caam-fix-memleak-in-caam_jr-module.patch crypto-sha512_ssse3-fix-byte-count-to-bit-count-conversion.patch dm-allocate-a-special-workqueue-for-deferred-device-removal.patch dm-io-fix-a-race-condition-in-the-wake-up-code-for-sync_io.patch dm-mpath-fix-io-hang-due-to-logic-bug-in-multipath_busy.patch drivers-hv-vmbus-fix-a-bug-in-the-channel-callback-dispatch-code.patch intel_pstate-don-t-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch intel_pstate-fix-setting-vid.patch intel_pstate-set-cpu-number-before-accessing-msrs.patch intel_pstate-update-documentation-of-max-min-_perf_pct-sysfs-files.patch pci-fix-unaligned-access-in-af-transaction-pending-test.patch phy-core-fix-error-path-in-phy_create.patch --- queue-3.15/arm64-implement-task_size_of.patch | 39 +++++++ .../clk-qcom-hdmi-source-sel-is-3-not-2.patch | 33 ++++++ ...free-corruption-during-driver-unbind.patch | 109 ++++++++++++++++++ ...x-use-proper-control-register-offset.patch | 32 +++++ ...fix-compilation-for-davinci-platform.patch | 40 +++++++ ...o-caam-fix-memleak-in-caam_jr-module.patch | 44 +++++++ ...x-byte-count-to-bit-count-conversion.patch | 38 ++++++ ...orkqueue-for-deferred-device-removal.patch | 94 +++++++++++++++ ...tion-in-the-wake-up-code-for-sync_io.patch | 100 ++++++++++++++++ ...g-due-to-logic-bug-in-multipath_busy.patch | 62 ++++++++++ ...n-the-channel-callback-dispatch-code.patch | 41 +++++++ ...bit-if-turbo-disabled-or-unavailable.patch | 104 +++++++++++++++++ queue-3.15/intel_pstate-fix-setting-vid.patch | 72 ++++++++++++ ...set-cpu-number-before-accessing-msrs.patch | 39 +++++++ ...ion-of-max-min-_perf_pct-sysfs-files.patch | 38 ++++++ ...ccess-in-af-transaction-pending-test.patch | 43 +++++++ ...hy-core-fix-error-path-in-phy_create.patch | 44 +++++++ queue-3.15/series | 17 +++ 18 files changed, 989 insertions(+) create mode 100644 queue-3.15/arm64-implement-task_size_of.patch create mode 100644 queue-3.15/clk-qcom-hdmi-source-sel-is-3-not-2.patch create mode 100644 queue-3.15/clk-s2mps11-fix-double-free-corruption-during-driver-unbind.patch create mode 100644 queue-3.15/clk-spear3xx-use-proper-control-register-offset.patch create mode 100644 queue-3.15/cpufreq-makefile-fix-compilation-for-davinci-platform.patch create mode 100644 queue-3.15/crypto-caam-fix-memleak-in-caam_jr-module.patch create mode 100644 queue-3.15/crypto-sha512_ssse3-fix-byte-count-to-bit-count-conversion.patch create mode 100644 queue-3.15/dm-allocate-a-special-workqueue-for-deferred-device-removal.patch create mode 100644 queue-3.15/dm-io-fix-a-race-condition-in-the-wake-up-code-for-sync_io.patch create mode 100644 queue-3.15/dm-mpath-fix-io-hang-due-to-logic-bug-in-multipath_busy.patch create mode 100644 queue-3.15/drivers-hv-vmbus-fix-a-bug-in-the-channel-callback-dispatch-code.patch create mode 100644 queue-3.15/intel_pstate-don-t-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch create mode 100644 queue-3.15/intel_pstate-fix-setting-vid.patch create mode 100644 queue-3.15/intel_pstate-set-cpu-number-before-accessing-msrs.patch create mode 100644 queue-3.15/intel_pstate-update-documentation-of-max-min-_perf_pct-sysfs-files.patch create mode 100644 queue-3.15/pci-fix-unaligned-access-in-af-transaction-pending-test.patch create mode 100644 queue-3.15/phy-core-fix-error-path-in-phy_create.patch diff --git a/queue-3.15/arm64-implement-task_size_of.patch b/queue-3.15/arm64-implement-task_size_of.patch new file mode 100644 index 00000000000..cdf005547eb --- /dev/null +++ b/queue-3.15/arm64-implement-task_size_of.patch @@ -0,0 +1,39 @@ +From fa2ec3ea10bd377f9d55772b1dab65178425a1a2 Mon Sep 17 00:00:00 2001 +From: Colin Cross +Date: Wed, 18 Jun 2014 21:10:09 +0100 +Subject: arm64: implement TASK_SIZE_OF + +From: Colin Cross + +commit fa2ec3ea10bd377f9d55772b1dab65178425a1a2 upstream. + +include/linux/sched.h implements TASK_SIZE_OF as TASK_SIZE if it +is not set by the architecture headers. TASK_SIZE uses the +current task to determine the size of the virtual address space. +On a 64-bit kernel this will cause reading /proc/pid/pagemap of a +64-bit process from a 32-bit process to return EOF when it reads +past 0xffffffff. + +Implement TASK_SIZE_OF exactly the same as TASK_SIZE with +test_tsk_thread_flag instead of test_thread_flag. + +Signed-off-by: Colin Cross +Acked-by: Will Deacon +Signed-off-by: Catalin Marinas +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/include/asm/memory.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm64/include/asm/memory.h ++++ b/arch/arm64/include/asm/memory.h +@@ -56,6 +56,8 @@ + #define TASK_SIZE_32 UL(0x100000000) + #define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ + TASK_SIZE_32 : TASK_SIZE_64) ++#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ ++ TASK_SIZE_32 : TASK_SIZE_64) + #else + #define TASK_SIZE TASK_SIZE_64 + #endif /* CONFIG_COMPAT */ diff --git a/queue-3.15/clk-qcom-hdmi-source-sel-is-3-not-2.patch b/queue-3.15/clk-qcom-hdmi-source-sel-is-3-not-2.patch new file mode 100644 index 00000000000..32d0cbae025 --- /dev/null +++ b/queue-3.15/clk-qcom-hdmi-source-sel-is-3-not-2.patch @@ -0,0 +1,33 @@ +From c556bcddc78096caeb46dbe3ad0314dd951f1665 Mon Sep 17 00:00:00 2001 +From: Stephen Boyd +Date: Wed, 25 Jun 2014 14:44:19 -0700 +Subject: clk: qcom: HDMI source sel is 3 not 2 + +From: Stephen Boyd + +commit c556bcddc78096caeb46dbe3ad0314dd951f1665 upstream. + +The HDMI PLL input to the tv mux is supposed to be 3, not 2. Fix +the code so that we can properly select the HDMI PLL. + +Fixes: 6d00b56fe "clk: qcom: Add support for MSM8960's multimedia clock controller (MMCC)" +Reported-by: Rob Clark +Signed-off-by: Stephen Boyd +Signed-off-by: Mike Turquette +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/qcom/mmcc-msm8960.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/clk/qcom/mmcc-msm8960.c ++++ b/drivers/clk/qcom/mmcc-msm8960.c +@@ -1208,7 +1208,7 @@ static struct clk_branch rot_clk = { + + static u8 mmcc_pxo_hdmi_map[] = { + [P_PXO] = 0, +- [P_HDMI_PLL] = 2, ++ [P_HDMI_PLL] = 3, + }; + + static const char *mmcc_pxo_hdmi[] = { diff --git a/queue-3.15/clk-s2mps11-fix-double-free-corruption-during-driver-unbind.patch b/queue-3.15/clk-s2mps11-fix-double-free-corruption-during-driver-unbind.patch new file mode 100644 index 00000000000..4e5d395f966 --- /dev/null +++ b/queue-3.15/clk-s2mps11-fix-double-free-corruption-during-driver-unbind.patch @@ -0,0 +1,109 @@ +From 2a96dfa49c83a2a7cbdb11382976aaa6b2636764 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 27 Jun 2014 14:21:10 +0200 +Subject: clk: s2mps11: Fix double free corruption during driver unbind + +From: Krzysztof Kozlowski + +commit 2a96dfa49c83a2a7cbdb11382976aaa6b2636764 upstream. + +After unbinding the driver memory was corrupted by double free of +clk_lookup structure. This lead to OOPS when re-binding the driver +again. + +The driver allocated memory for 'clk_lookup' with devm_kzalloc. During +driver removal this memory was freed twice: once by clkdev_drop() and +second by devm code. + +Kernel panic log: +[ 30.839284] Unable to handle kernel paging request at virtual address 5f343173 +[ 30.846476] pgd = dee14000 +[ 30.849165] [5f343173] *pgd=00000000 +[ 30.852703] Internal error: Oops: 805 [#1] PREEMPT SMP ARM +[ 30.858166] Modules linked in: +[ 30.861208] CPU: 0 PID: 1 Comm: bash Not tainted 3.16.0-rc2-00239-g94bdf617b07e-dirty #40 +[ 30.869364] task: df478000 ti: df480000 task.ti: df480000 +[ 30.874752] PC is at clkdev_add+0x2c/0x38 +[ 30.878738] LR is at clkdev_add+0x18/0x38 +[ 30.882732] pc : [] lr : [] psr: 60000013 +[ 30.882732] sp : df481e78 ip : 00000001 fp : c0700ed8 +[ 30.894187] r10: 0000000c r9 : 00000000 r8 : c07b0e3c +[ 30.899396] r7 : 00000002 r6 : df45f9d0 r5 : df421390 r4 : c0700d6c +[ 30.905906] r3 : 5f343173 r2 : c0700d84 r1 : 60000013 r0 : c0700d6c +[ 30.912417] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user +[ 30.919534] Control: 10c53c7d Table: 5ee1406a DAC: 00000015 +[ 30.925262] Process bash (pid: 1, stack limit = 0xdf480240) +[ 30.930817] Stack: (0xdf481e78 to 0xdf482000) +[ 30.935159] 1e60: 00001000 df6de610 +[ 30.943321] 1e80: df7f4558 c0355650 c05ec6ec c0700eb0 df6de600 df7f4510 dec9d69c 00000014 +[ 30.951480] 1ea0: 00167b48 df6de610 c0700e30 c0713518 00000000 c0700e30 dec9d69c 00000006 +[ 30.959639] 1ec0: 00167b48 c02c1b7c c02c1b64 df6de610 c07aff48 c02c0420 c06fb150 c047cc20 +[ 30.967798] 1ee0: df6de610 df6de610 c0700e30 df6de644 c06fb150 0000000c dec9d690 c02bef90 +[ 30.975957] 1f00: dec9c6c0 dece4c00 df481f80 dece4c00 0000000c c02be73c 0000000c c016ca8c +[ 30.984116] 1f20: c016ca48 00000000 00000000 c016c1f4 00000000 00000000 b6f18000 df481f80 +[ 30.992276] 1f40: df7f66c0 0000000c df480000 df480000 b6f18000 c011094c df47839c 60000013 +[ 31.000435] 1f60: 00000000 00000000 df7f66c0 df7f66c0 0000000c df480000 b6f18000 c0110dd4 +[ 31.008594] 1f80: 00000000 00000000 0000000c b6ec05d8 0000000c b6f18000 00000004 c000f2a8 +[ 31.016753] 1fa0: 00001000 c000f0e0 b6ec05d8 0000000c 00000001 b6f18000 0000000c 00000000 +[ 31.024912] 1fc0: b6ec05d8 0000000c b6f18000 00000004 0000000c 00000001 00000000 00167b48 +[ 31.033071] 1fe0: 00000000 bed83a80 b6e004f0 b6e5122c 60000010 00000001 ffffffff ffffffff +[ 31.041248] [] (clkdev_add) from [] (s2mps11_clk_probe+0x2b4/0x3b4) +[ 31.049223] [] (s2mps11_clk_probe) from [] (platform_drv_probe+0x18/0x48) +[ 31.057728] [] (platform_drv_probe) from [] (driver_probe_device+0x13c/0x384) +[ 31.066579] [] (driver_probe_device) from [] (bind_store+0x88/0xd8) +[ 31.074564] [] (bind_store) from [] (drv_attr_store+0x20/0x2c) +[ 31.082118] [] (drv_attr_store) from [] (sysfs_kf_write+0x44/0x48) +[ 31.090016] [] (sysfs_kf_write) from [] (kernfs_fop_write+0xc0/0x17c) +[ 31.098176] [] (kernfs_fop_write) from [] (vfs_write+0xa0/0x1c4) +[ 31.105899] [] (vfs_write) from [] (SyS_write+0x40/0x8c) +[ 31.112931] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x3c) +[ 31.120481] Code: e2842018 e584501c e1a00004 e885000c (e5835000) +[ 31.126596] ---[ end trace efad45bfa3a61b05 ]--- +[ 31.131181] Kernel panic - not syncing: Fatal exception +[ 31.136368] CPU1: stopping +[ 31.139054] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 3.16.0-rc2-00239-g94bdf617b07e-dirty #40 +[ 31.148697] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) +[ 31.156419] [] (show_stack) from [] (dump_stack+0x80/0xcc) +[ 31.163622] [] (dump_stack) from [] (handle_IPI+0x130/0x15c) +[ 31.170998] [] (handle_IPI) from [] (gic_handle_irq+0x60/0x68) +[ 31.178549] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x70) +[ 31.186009] Exception stack(0xdf4bdf88 to 0xdf4bdfd0) +[ 31.191046] df80: ffffffed 00000000 00000000 00000000 df4bc000 c06d042c +[ 31.199207] dfa0: 00000000 ffffffed c06d03c0 00000000 c070c288 00000000 00000000 df4bdfd0 +[ 31.207363] dfc0: c0010324 c0010328 60000013 ffffffff +[ 31.212402] [] (__irq_svc) from [] (arch_cpu_idle+0x28/0x30) +[ 31.219783] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x2c4/0x3f0) +[ 31.228027] [] (cpu_startup_entry) from [<400086c4>] (0x400086c4) +[ 31.234968] ---[ end Kernel panic - not syncing: Fatal exception + +Fixes: 7cc560dea415 ("clk: s2mps11: Add support for s2mps11") +Signed-off-by: Krzysztof Kozlowski +Reviewed-by: Yadwinder Singh Brar +Signed-off-by: Mike Turquette +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/clk-s2mps11.c | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +--- a/drivers/clk/clk-s2mps11.c ++++ b/drivers/clk/clk-s2mps11.c +@@ -206,16 +206,13 @@ static int s2mps11_clk_probe(struct plat + goto err_reg; + } + +- s2mps11_clk->lookup = devm_kzalloc(&pdev->dev, +- sizeof(struct clk_lookup), GFP_KERNEL); ++ s2mps11_clk->lookup = clkdev_alloc(s2mps11_clk->clk, ++ s2mps11_name(s2mps11_clk), NULL); + if (!s2mps11_clk->lookup) { + ret = -ENOMEM; + goto err_lup; + } + +- s2mps11_clk->lookup->con_id = s2mps11_name(s2mps11_clk); +- s2mps11_clk->lookup->clk = s2mps11_clk->clk; +- + clkdev_add(s2mps11_clk->lookup); + } + diff --git a/queue-3.15/clk-spear3xx-use-proper-control-register-offset.patch b/queue-3.15/clk-spear3xx-use-proper-control-register-offset.patch new file mode 100644 index 00000000000..3bb12169282 --- /dev/null +++ b/queue-3.15/clk-spear3xx-use-proper-control-register-offset.patch @@ -0,0 +1,32 @@ +From 15ebb05248d025534773c9ef64915bd888f04e4b Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Thu, 19 Jun 2014 21:52:23 +0000 +Subject: clk: spear3xx: Use proper control register offset + +From: Thomas Gleixner + +commit 15ebb05248d025534773c9ef64915bd888f04e4b upstream. + +The control register is at offset 0x10, not 0x0. This is wreckaged +since commit 5df33a62c (SPEAr: Switch to common clock framework). + +Signed-off-by: Thomas Gleixner +Acked-by: Viresh Kumar +Signed-off-by: Mike Turquette +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/spear/spear3xx_clock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/clk/spear/spear3xx_clock.c ++++ b/drivers/clk/spear/spear3xx_clock.c +@@ -211,7 +211,7 @@ static inline void spear310_clk_init(voi + /* array of all spear 320 clock lookups */ + #ifdef CONFIG_MACH_SPEAR320 + +-#define SPEAR320_CONTROL_REG (soc_config_base + 0x0000) ++#define SPEAR320_CONTROL_REG (soc_config_base + 0x0010) + #define SPEAR320_EXT_CTRL_REG (soc_config_base + 0x0018) + + #define SPEAR320_UARTX_PCLK_MASK 0x1 diff --git a/queue-3.15/cpufreq-makefile-fix-compilation-for-davinci-platform.patch b/queue-3.15/cpufreq-makefile-fix-compilation-for-davinci-platform.patch new file mode 100644 index 00000000000..164a4d17734 --- /dev/null +++ b/queue-3.15/cpufreq-makefile-fix-compilation-for-davinci-platform.patch @@ -0,0 +1,40 @@ +From 5a90af67c2126fe1d04ebccc1f8177e6ca70d3a9 Mon Sep 17 00:00:00 2001 +From: Prabhakar Lad +Date: Tue, 8 Jul 2014 16:25:38 +0100 +Subject: cpufreq: Makefile: fix compilation for davinci platform + +From: Prabhakar Lad + +commit 5a90af67c2126fe1d04ebccc1f8177e6ca70d3a9 upstream. + +Since commtit 8a7b1227e303 (cpufreq: davinci: move cpufreq driver to +drivers/cpufreq) this added dependancy only for CONFIG_ARCH_DAVINCI_DA850 +where as davinci_cpufreq_init() call is used by all davinci platform. + +This patch fixes following build error: + +arch/arm/mach-davinci/built-in.o: In function `davinci_init_late': +:(.init.text+0x928): undefined reference to `davinci_cpufreq_init' +make: *** [vmlinux] Error 1 + +Fixes: 8a7b1227e303 (cpufreq: davinci: move cpufreq driver to drivers/cpufreq) +Signed-off-by: Lad, Prabhakar +Acked-by: Viresh Kumar +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/cpufreq/Makefile ++++ b/drivers/cpufreq/Makefile +@@ -47,7 +47,7 @@ obj-$(CONFIG_ARM_BIG_LITTLE_CPUFREQ) += + # LITTLE drivers, so that it is probed last. + obj-$(CONFIG_ARM_DT_BL_CPUFREQ) += arm_big_little_dt.o + +-obj-$(CONFIG_ARCH_DAVINCI_DA850) += davinci-cpufreq.o ++obj-$(CONFIG_ARCH_DAVINCI) += davinci-cpufreq.o + obj-$(CONFIG_UX500_SOC_DB8500) += dbx500-cpufreq.o + obj-$(CONFIG_ARM_EXYNOS_CPUFREQ) += exynos-cpufreq.o + obj-$(CONFIG_ARM_EXYNOS4210_CPUFREQ) += exynos4210-cpufreq.o diff --git a/queue-3.15/crypto-caam-fix-memleak-in-caam_jr-module.patch b/queue-3.15/crypto-caam-fix-memleak-in-caam_jr-module.patch new file mode 100644 index 00000000000..d1359670fa5 --- /dev/null +++ b/queue-3.15/crypto-caam-fix-memleak-in-caam_jr-module.patch @@ -0,0 +1,44 @@ +From 0378c9a855bfa395f595fbfb049707093e270f69 Mon Sep 17 00:00:00 2001 +From: Cristian Stoica +Date: Mon, 7 Jul 2014 11:52:41 +0300 +Subject: crypto: caam - fix memleak in caam_jr module + +From: Cristian Stoica + +commit 0378c9a855bfa395f595fbfb049707093e270f69 upstream. + +This patch fixes a memory leak that appears when caam_jr module is unloaded. + +Signed-off-by: Cristian Stoica +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/crypto/caam/jr.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +--- a/drivers/crypto/caam/jr.c ++++ b/drivers/crypto/caam/jr.c +@@ -453,8 +453,8 @@ static int caam_jr_probe(struct platform + int error; + + jrdev = &pdev->dev; +- jrpriv = kmalloc(sizeof(struct caam_drv_private_jr), +- GFP_KERNEL); ++ jrpriv = devm_kmalloc(jrdev, sizeof(struct caam_drv_private_jr), ++ GFP_KERNEL); + if (!jrpriv) + return -ENOMEM; + +@@ -487,10 +487,8 @@ static int caam_jr_probe(struct platform + + /* Now do the platform independent part */ + error = caam_jr_init(jrdev); /* now turn on hardware */ +- if (error) { +- kfree(jrpriv); ++ if (error) + return error; +- } + + jrpriv->dev = jrdev; + spin_lock(&driver_data.jr_alloc_lock); diff --git a/queue-3.15/crypto-sha512_ssse3-fix-byte-count-to-bit-count-conversion.patch b/queue-3.15/crypto-sha512_ssse3-fix-byte-count-to-bit-count-conversion.patch new file mode 100644 index 00000000000..f1678f479f4 --- /dev/null +++ b/queue-3.15/crypto-sha512_ssse3-fix-byte-count-to-bit-count-conversion.patch @@ -0,0 +1,38 @@ +From cfe82d4f45c7cc39332a2be7c4c1d3bf279bbd3d Mon Sep 17 00:00:00 2001 +From: Jussi Kivilinna +Date: Mon, 23 Jun 2014 19:41:05 +0300 +Subject: crypto: sha512_ssse3 - fix byte count to bit count conversion + +From: Jussi Kivilinna + +commit cfe82d4f45c7cc39332a2be7c4c1d3bf279bbd3d upstream. + +Byte-to-bit-count computation is only partly converted to big-endian and is +mixing in CPU-endian values. Problem was noticed by sparce with warning: + + CHECK arch/x86/crypto/sha512_ssse3_glue.c +arch/x86/crypto/sha512_ssse3_glue.c:144:19: warning: restricted __be64 degrades to integer +arch/x86/crypto/sha512_ssse3_glue.c:144:17: warning: incorrect type in assignment (different base types) +arch/x86/crypto/sha512_ssse3_glue.c:144:17: expected restricted __be64 +arch/x86/crypto/sha512_ssse3_glue.c:144:17: got unsigned long long + +Signed-off-by: Jussi Kivilinna +Acked-by: Tim Chen +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/crypto/sha512_ssse3_glue.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/crypto/sha512_ssse3_glue.c ++++ b/arch/x86/crypto/sha512_ssse3_glue.c +@@ -141,7 +141,7 @@ static int sha512_ssse3_final(struct sha + + /* save number of bits */ + bits[1] = cpu_to_be64(sctx->count[0] << 3); +- bits[0] = cpu_to_be64(sctx->count[1] << 3) | sctx->count[0] >> 61; ++ bits[0] = cpu_to_be64(sctx->count[1] << 3 | sctx->count[0] >> 61); + + /* Pad out to 112 mod 128 and append length */ + index = sctx->count[0] & 0x7f; diff --git a/queue-3.15/dm-allocate-a-special-workqueue-for-deferred-device-removal.patch b/queue-3.15/dm-allocate-a-special-workqueue-for-deferred-device-removal.patch new file mode 100644 index 00000000000..4ffa7c58430 --- /dev/null +++ b/queue-3.15/dm-allocate-a-special-workqueue-for-deferred-device-removal.patch @@ -0,0 +1,94 @@ +From acfe0ad74d2e1bfc81d1d7bf5e15b043985d3650 Mon Sep 17 00:00:00 2001 +From: Mikulas Patocka +Date: Sat, 14 Jun 2014 13:44:31 -0400 +Subject: dm: allocate a special workqueue for deferred device removal + +From: Mikulas Patocka + +commit acfe0ad74d2e1bfc81d1d7bf5e15b043985d3650 upstream. + +The commit 2c140a246dc ("dm: allow remove to be deferred") introduced a +deferred removal feature for the device mapper. When this feature is +used (by passing a flag DM_DEFERRED_REMOVE to DM_DEV_REMOVE_CMD ioctl) +and the user tries to remove a device that is currently in use, the +device will be removed automatically in the future when the last user +closes it. + +Device mapper used the system workqueue to perform deferred removals. +However, some targets (dm-raid1, dm-mpath, dm-stripe) flush work items +scheduled for the system workqueue from their destructor. If the +destructor itself is called from the system workqueue during deferred +removal, it introduces a possible deadlock - the workqueue tries to flush +itself. + +Fix this possible deadlock by introducing a new workqueue for deferred +removals. We allocate just one workqueue for all dm targets. The +ability of dm targets to process IOs isn't dependent on deferred removal +of unused targets, so a deadlock due to shared workqueue isn't possible. + +Also, cleanup local_init() to eliminate potential for returning success +on failure. + +Signed-off-by: Mikulas Patocka +Signed-off-by: Dan Carpenter +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/dm.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +--- a/drivers/md/dm.c ++++ b/drivers/md/dm.c +@@ -54,6 +54,8 @@ static void do_deferred_remove(struct wo + + static DECLARE_WORK(deferred_remove_work, do_deferred_remove); + ++static struct workqueue_struct *deferred_remove_workqueue; ++ + /* + * For bio-based dm. + * One of these is allocated per bio. +@@ -276,16 +278,24 @@ static int __init local_init(void) + if (r) + goto out_free_rq_tio_cache; + ++ deferred_remove_workqueue = alloc_workqueue("kdmremove", WQ_UNBOUND, 1); ++ if (!deferred_remove_workqueue) { ++ r = -ENOMEM; ++ goto out_uevent_exit; ++ } ++ + _major = major; + r = register_blkdev(_major, _name); + if (r < 0) +- goto out_uevent_exit; ++ goto out_free_workqueue; + + if (!_major) + _major = r; + + return 0; + ++out_free_workqueue: ++ destroy_workqueue(deferred_remove_workqueue); + out_uevent_exit: + dm_uevent_exit(); + out_free_rq_tio_cache: +@@ -299,6 +309,7 @@ out_free_io_cache: + static void local_exit(void) + { + flush_scheduled_work(); ++ destroy_workqueue(deferred_remove_workqueue); + + kmem_cache_destroy(_rq_tio_cache); + kmem_cache_destroy(_io_cache); +@@ -407,7 +418,7 @@ static void dm_blk_close(struct gendisk + + if (atomic_dec_and_test(&md->open_count) && + (test_bit(DMF_DEFERRED_REMOVE, &md->flags))) +- schedule_work(&deferred_remove_work); ++ queue_work(deferred_remove_workqueue, &deferred_remove_work); + + dm_put(md); + diff --git a/queue-3.15/dm-io-fix-a-race-condition-in-the-wake-up-code-for-sync_io.patch b/queue-3.15/dm-io-fix-a-race-condition-in-the-wake-up-code-for-sync_io.patch new file mode 100644 index 00000000000..6947f6e2b96 --- /dev/null +++ b/queue-3.15/dm-io-fix-a-race-condition-in-the-wake-up-code-for-sync_io.patch @@ -0,0 +1,100 @@ +From 10f1d5d111e8aed46a0f1179faf9a3cf422f689e Mon Sep 17 00:00:00 2001 +From: Joe Thornber +Date: Fri, 27 Jun 2014 15:29:04 -0400 +Subject: dm io: fix a race condition in the wake up code for sync_io + +From: Joe Thornber + +commit 10f1d5d111e8aed46a0f1179faf9a3cf422f689e upstream. + +There's a race condition between the atomic_dec_and_test(&io->count) +in dec_count() and the waking of the sync_io() thread. If the thread +is spuriously woken immediately after the decrement it may exit, +making the on stack io struct invalid, yet the dec_count could still +be using it. + +Fix this race by using a completion in sync_io() and dec_count(). + +Reported-by: Minfei Huang +Signed-off-by: Joe Thornber +Signed-off-by: Mike Snitzer +Acked-by: Mikulas Patocka +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/dm-io.c | 22 ++++++++-------------- + 1 file changed, 8 insertions(+), 14 deletions(-) + +--- a/drivers/md/dm-io.c ++++ b/drivers/md/dm-io.c +@@ -10,6 +10,7 @@ + #include + + #include ++#include + #include + #include + #include +@@ -32,7 +33,7 @@ struct dm_io_client { + struct io { + unsigned long error_bits; + atomic_t count; +- struct task_struct *sleeper; ++ struct completion *wait; + struct dm_io_client *client; + io_notify_fn callback; + void *context; +@@ -121,8 +122,8 @@ static void dec_count(struct io *io, uns + invalidate_kernel_vmap_range(io->vma_invalidate_address, + io->vma_invalidate_size); + +- if (io->sleeper) +- wake_up_process(io->sleeper); ++ if (io->wait) ++ complete(io->wait); + + else { + unsigned long r = io->error_bits; +@@ -387,6 +388,7 @@ static int sync_io(struct dm_io_client * + */ + volatile char io_[sizeof(struct io) + __alignof__(struct io) - 1]; + struct io *io = (struct io *)PTR_ALIGN(&io_, __alignof__(struct io)); ++ DECLARE_COMPLETION_ONSTACK(wait); + + if (num_regions > 1 && (rw & RW_MASK) != WRITE) { + WARN_ON(1); +@@ -395,7 +397,7 @@ static int sync_io(struct dm_io_client * + + io->error_bits = 0; + atomic_set(&io->count, 1); /* see dispatch_io() */ +- io->sleeper = current; ++ io->wait = &wait; + io->client = client; + + io->vma_invalidate_address = dp->vma_invalidate_address; +@@ -403,15 +405,7 @@ static int sync_io(struct dm_io_client * + + dispatch_io(rw, num_regions, where, dp, io, 1); + +- while (1) { +- set_current_state(TASK_UNINTERRUPTIBLE); +- +- if (!atomic_read(&io->count)) +- break; +- +- io_schedule(); +- } +- set_current_state(TASK_RUNNING); ++ wait_for_completion_io(&wait); + + if (error_bits) + *error_bits = io->error_bits; +@@ -434,7 +428,7 @@ static int async_io(struct dm_io_client + io = mempool_alloc(client->pool, GFP_NOIO); + io->error_bits = 0; + atomic_set(&io->count, 1); /* see dispatch_io() */ +- io->sleeper = NULL; ++ io->wait = NULL; + io->client = client; + io->callback = fn; + io->context = context; diff --git a/queue-3.15/dm-mpath-fix-io-hang-due-to-logic-bug-in-multipath_busy.patch b/queue-3.15/dm-mpath-fix-io-hang-due-to-logic-bug-in-multipath_busy.patch new file mode 100644 index 00000000000..46290fa8600 --- /dev/null +++ b/queue-3.15/dm-mpath-fix-io-hang-due-to-logic-bug-in-multipath_busy.patch @@ -0,0 +1,62 @@ +From 7a7a3b45fed9a144dbf766ee842a4c5d0632b81d Mon Sep 17 00:00:00 2001 +From: Jun'ichi Nomura +Date: Tue, 8 Jul 2014 00:55:14 +0000 +Subject: dm mpath: fix IO hang due to logic bug in multipath_busy + +From: Jun'ichi Nomura + +commit 7a7a3b45fed9a144dbf766ee842a4c5d0632b81d upstream. + +Commit e80991773 ("dm mpath: push back requests instead of queueing") +modified multipath_busy() to return true if !pg_ready(). pg_ready() +checks the current state of the multipath device and may return false +even if a new IO is needed to change the state. + +Bart Van Assche reported that he had multipath IO lockup when he was +performing cable pull tests. Analysis showed that the multipath +device had a single path group with both paths active, but that the +path group itself was not active. During the multipath device state +transitions 'queue_io' got set but nothing could clear it. Clearing +'queue_io' only happens in __choose_pgpath(), but it won't be called +if multipath_busy() returns true due to pg_ready() returning false +when 'queue_io' is set. + +As such the !pg_ready() check in multipath_busy() is wrong because new +IO will not be sent to multipath target and the multipath state change +won't happen. That results in multipath IO lockup. + +The intent of multipath_busy() is to avoid unnecessary cycles of +dequeue + request_fn + requeue if it is known that the multipath +device will requeue. + +Such "busy" situations would be: + - path group is being activated + - there is no path and the multipath is setup to requeue if no path + +Fix multipath_busy() to return "busy" early only for these specific +situations. + +Reported-by: Bart Van Assche +Tested-by: Bart Van Assche +Signed-off-by: Jun'ichi Nomura +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/dm-mpath.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/md/dm-mpath.c ++++ b/drivers/md/dm-mpath.c +@@ -1620,8 +1620,9 @@ static int multipath_busy(struct dm_targ + + spin_lock_irqsave(&m->lock, flags); + +- /* pg_init in progress, requeue until done */ +- if (!pg_ready(m)) { ++ /* pg_init in progress or no paths available */ ++ if (m->pg_init_in_progress || ++ (!m->nr_valid_paths && m->queue_if_no_path)) { + busy = 1; + goto out; + } diff --git a/queue-3.15/drivers-hv-vmbus-fix-a-bug-in-the-channel-callback-dispatch-code.patch b/queue-3.15/drivers-hv-vmbus-fix-a-bug-in-the-channel-callback-dispatch-code.patch new file mode 100644 index 00000000000..d914352af07 --- /dev/null +++ b/queue-3.15/drivers-hv-vmbus-fix-a-bug-in-the-channel-callback-dispatch-code.patch @@ -0,0 +1,41 @@ +From affb1aff300ddee54df307812b38f166e8a865ef Mon Sep 17 00:00:00 2001 +From: "K. Y. Srinivasan" +Date: Mon, 7 Jul 2014 16:34:24 -0700 +Subject: Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code + +From: "K. Y. Srinivasan" + +commit affb1aff300ddee54df307812b38f166e8a865ef upstream. + +Starting with Win8, we have implemented several optimizations to improve the +scalability and performance of the VMBUS transport between the Host and the +Guest. Some of the non-performance critical services cannot leverage these +optimization since they only read and process one message at a time. +Make adjustments to the callback dispatch code to account for the way +non-performance critical drivers handle reading of the channel. + +Signed-off-by: K. Y. Srinivasan +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hv/connection.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/hv/connection.c ++++ b/drivers/hv/connection.c +@@ -319,9 +319,13 @@ static void process_chn_event(u32 relid) + */ + + do { +- hv_begin_read(&channel->inbound); ++ if (read_state) ++ hv_begin_read(&channel->inbound); + channel->onchannel_callback(arg); +- bytes_to_read = hv_end_read(&channel->inbound); ++ if (read_state) ++ bytes_to_read = hv_end_read(&channel->inbound); ++ else ++ bytes_to_read = 0; + } while (read_state && (bytes_to_read != 0)); + } else { + pr_err("no channel callback for relid - %u\n", relid); diff --git a/queue-3.15/intel_pstate-don-t-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch b/queue-3.15/intel_pstate-don-t-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch new file mode 100644 index 00000000000..94decdfa540 --- /dev/null +++ b/queue-3.15/intel_pstate-don-t-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch @@ -0,0 +1,104 @@ +From dd5fbf70f96dbfd7ee432096a1f979b2b3267856 Mon Sep 17 00:00:00 2001 +From: Dirk Brandewie +Date: Fri, 20 Jun 2014 07:27:59 -0700 +Subject: intel_pstate: don't touch turbo bit if turbo disabled or unavailable. + +From: Dirk Brandewie + +commit dd5fbf70f96dbfd7ee432096a1f979b2b3267856 upstream. + +If turbo is disabled in the BIOS bit 38 should be set in +MSR_IA32_MISC_ENABLE register per section 14.3.2.1 of the SDM Vol 3 +document 325384-050US Feb 2014. If this bit is set do *not* attempt +to disable trubo via the MSR_IA32_PERF_CTL register. On some systems +trying to disable turbo via MSR_IA32_PERF_CTL will cause subsequent +writes to MSR_IA32_PERF_CTL not take affect, in fact reading +MSR_IA32_PERF_CTL will not show the IDA/Turbo DISENGAGE bit(32) as +set. A write of bit 32 to zero returns to normal operation. + +Also deal with the case where the processor does not support +turbo and the BIOS does not report the fact in MSR_IA32_MISC_ENABLE +but does report the max and turbo P states as the same value. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=64251 +Signed-off-by: Dirk Brandewie +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/intel_pstate.c | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) + +--- a/drivers/cpufreq/intel_pstate.c ++++ b/drivers/cpufreq/intel_pstate.c +@@ -132,6 +132,7 @@ static struct pstate_funcs pstate_funcs; + + struct perf_limits { + int no_turbo; ++ int turbo_disabled; + int max_perf_pct; + int min_perf_pct; + int32_t max_perf; +@@ -291,7 +292,10 @@ static ssize_t store_no_turbo(struct kob + if (ret != 1) + return -EINVAL; + limits.no_turbo = clamp_t(int, input, 0 , 1); +- ++ if (limits.turbo_disabled) { ++ pr_warn("Turbo disabled by BIOS or unavailable on processor\n"); ++ limits.no_turbo = limits.turbo_disabled; ++ } + return count; + } + +@@ -385,7 +389,7 @@ static void byt_set_pstate(struct cpudat + u32 vid; + + val = pstate << 8; +- if (limits.no_turbo) ++ if (limits.no_turbo && !limits.turbo_disabled) + val |= (u64)1 << 32; + + vid_fp = cpudata->vid.min + mul_fp( +@@ -452,7 +456,7 @@ static void core_set_pstate(struct cpuda + u64 val; + + val = pstate << 8; +- if (limits.no_turbo) ++ if (limits.no_turbo && !limits.turbo_disabled) + val |= (u64)1 << 32; + + wrmsrl_on_cpu(cpudata->cpu, MSR_IA32_PERF_CTL, val); +@@ -750,7 +754,7 @@ static int intel_pstate_set_policy(struc + limits.min_perf = int_tofp(1); + limits.max_perf_pct = 100; + limits.max_perf = int_tofp(1); +- limits.no_turbo = 0; ++ limits.no_turbo = limits.turbo_disabled; + return 0; + } + limits.min_perf_pct = (policy->min * 100) / policy->cpuinfo.max_freq; +@@ -793,6 +797,7 @@ static int intel_pstate_cpu_init(struct + { + struct cpudata *cpu; + int rc; ++ u64 misc_en; + + rc = intel_pstate_init_cpu(policy->cpu); + if (rc) +@@ -800,8 +805,13 @@ static int intel_pstate_cpu_init(struct + + cpu = all_cpu_data[policy->cpu]; + +- if (!limits.no_turbo && +- limits.min_perf_pct == 100 && limits.max_perf_pct == 100) ++ rdmsrl(MSR_IA32_MISC_ENABLE, misc_en); ++ if (misc_en & MSR_IA32_MISC_ENABLE_TURBO_DISABLE || ++ cpu->pstate.max_pstate == cpu->pstate.turbo_pstate) { ++ limits.turbo_disabled = 1; ++ limits.no_turbo = 1; ++ } ++ if (limits.min_perf_pct == 100 && limits.max_perf_pct == 100) + policy->policy = CPUFREQ_POLICY_PERFORMANCE; + else + policy->policy = CPUFREQ_POLICY_POWERSAVE; diff --git a/queue-3.15/intel_pstate-fix-setting-vid.patch b/queue-3.15/intel_pstate-fix-setting-vid.patch new file mode 100644 index 00000000000..c2df1ee683a --- /dev/null +++ b/queue-3.15/intel_pstate-fix-setting-vid.patch @@ -0,0 +1,72 @@ +From c16ed06024a6e699c332831dd50d8276744e3de8 Mon Sep 17 00:00:00 2001 +From: Dirk Brandewie +Date: Fri, 20 Jun 2014 07:27:58 -0700 +Subject: intel_pstate: Fix setting VID + +From: Dirk Brandewie + +commit c16ed06024a6e699c332831dd50d8276744e3de8 upstream. + +Commit 21855ff5 (intel_pstate: Set turbo VID for BayTrail) introduced +setting the turbo VID which is required to prevent a machine check on +some Baytrail SKUs under heavy graphics based workloads. The +docmumentation update that brought the requirement to light also +changed the bit mask used for enumerating P state and VID values from +0x7f to 0x3f. + +This change returns the mask value to 0x7f. + +Tested with the Intel NUC DN2820FYK, +BIOS version FYBYT10H.86A.0034.2014.0513.1413 with v3.16-rc1 and +v3.14.8 kernel versions. + +Fixes: 21855ff5 (intel_pstate: Set turbo VID for BayTrail) +Link: https://bugzilla.kernel.org/show_bug.cgi?id=77951 +Reported-and-tested-by: Rune Reterson +Reported-and-tested-by: Eric Eickmeyer +Signed-off-by: Dirk Brandewie +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/intel_pstate.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/drivers/cpufreq/intel_pstate.c ++++ b/drivers/cpufreq/intel_pstate.c +@@ -361,21 +361,21 @@ static int byt_get_min_pstate(void) + { + u64 value; + rdmsrl(BYT_RATIOS, value); +- return (value >> 8) & 0x3F; ++ return (value >> 8) & 0x7F; + } + + static int byt_get_max_pstate(void) + { + u64 value; + rdmsrl(BYT_RATIOS, value); +- return (value >> 16) & 0x3F; ++ return (value >> 16) & 0x7F; + } + + static int byt_get_turbo_pstate(void) + { + u64 value; + rdmsrl(BYT_TURBO_RATIOS, value); +- return value & 0x3F; ++ return value & 0x7F; + } + + static void byt_set_pstate(struct cpudata *cpudata, int pstate) +@@ -409,8 +409,8 @@ static void byt_get_vid(struct cpudata * + + + rdmsrl(BYT_VIDS, value); +- cpudata->vid.min = int_tofp((value >> 8) & 0x3f); +- cpudata->vid.max = int_tofp((value >> 16) & 0x3f); ++ cpudata->vid.min = int_tofp((value >> 8) & 0x7f); ++ cpudata->vid.max = int_tofp((value >> 16) & 0x7f); + cpudata->vid.ratio = div_fp( + cpudata->vid.max - cpudata->vid.min, + int_tofp(cpudata->pstate.max_pstate - diff --git a/queue-3.15/intel_pstate-set-cpu-number-before-accessing-msrs.patch b/queue-3.15/intel_pstate-set-cpu-number-before-accessing-msrs.patch new file mode 100644 index 00000000000..879326f32e9 --- /dev/null +++ b/queue-3.15/intel_pstate-set-cpu-number-before-accessing-msrs.patch @@ -0,0 +1,39 @@ +From 179e8471673ce0249cd4ecda796008f7757e5bad Mon Sep 17 00:00:00 2001 +From: Vincent Minet +Date: Sat, 5 Jul 2014 01:51:33 +0200 +Subject: intel_pstate: Set CPU number before accessing MSRs + +From: Vincent Minet + +commit 179e8471673ce0249cd4ecda796008f7757e5bad upstream. + +Ensure that cpu->cpu is set before writing MSR_IA32_PERF_CTL during CPU +initialization. Otherwise only cpu0 has its P-state set and all other +cores are left with their values unchanged. + +In most cases, this is not too serious because the P-states will be set +correctly when the timer function is run. But when the default governor +is set to performance, the per-CPU current_pstate stays the same forever +and no attempts are made to write the MSRs again. + +Signed-off-by: Vincent Minet +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/intel_pstate.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/cpufreq/intel_pstate.c ++++ b/drivers/cpufreq/intel_pstate.c +@@ -709,9 +709,8 @@ static int intel_pstate_init_cpu(unsigne + + cpu = all_cpu_data[cpunum]; + +- intel_pstate_get_cpu_pstates(cpu); +- + cpu->cpu = cpunum; ++ intel_pstate_get_cpu_pstates(cpu); + + init_timer_deferrable(&cpu->timer); + cpu->timer.function = intel_pstate_timer_func; diff --git a/queue-3.15/intel_pstate-update-documentation-of-max-min-_perf_pct-sysfs-files.patch b/queue-3.15/intel_pstate-update-documentation-of-max-min-_perf_pct-sysfs-files.patch new file mode 100644 index 00000000000..af1b644f145 --- /dev/null +++ b/queue-3.15/intel_pstate-update-documentation-of-max-min-_perf_pct-sysfs-files.patch @@ -0,0 +1,38 @@ +From 41629a8233470325bfbb60377f555f9e8acc879f Mon Sep 17 00:00:00 2001 +From: Dirk Brandewie +Date: Fri, 20 Jun 2014 07:28:00 -0700 +Subject: intel_pstate: Update documentation of {max,min}_perf_pct sysfs files + +From: Dirk Brandewie + +commit 41629a8233470325bfbb60377f555f9e8acc879f upstream. + +Update documentation to make the interpretation of the values clearer + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=64251 +Signed-off-by: Dirk Brandewie +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/cpu-freq/intel-pstate.txt | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/Documentation/cpu-freq/intel-pstate.txt ++++ b/Documentation/cpu-freq/intel-pstate.txt +@@ -15,10 +15,13 @@ New sysfs files for controlling P state + /sys/devices/system/cpu/intel_pstate/ + + max_perf_pct: limits the maximum P state that will be requested by +- the driver stated as a percentage of the available performance. ++ the driver stated as a percentage of the available performance. The ++ available (P states) performance may be reduced by the no_turbo ++ setting described below. + + min_perf_pct: limits the minimum P state that will be requested by +- the driver stated as a percentage of the available performance. ++ the driver stated as a percentage of the max (non-turbo) ++ performance level. + + no_turbo: limits the driver to selecting P states below the turbo + frequency range. diff --git a/queue-3.15/pci-fix-unaligned-access-in-af-transaction-pending-test.patch b/queue-3.15/pci-fix-unaligned-access-in-af-transaction-pending-test.patch new file mode 100644 index 00000000000..9bb65e9118f --- /dev/null +++ b/queue-3.15/pci-fix-unaligned-access-in-af-transaction-pending-test.patch @@ -0,0 +1,43 @@ +From d066c946a866268c14a120b33e7226e899981998 Mon Sep 17 00:00:00 2001 +From: Alex Williamson +Date: Tue, 17 Jun 2014 15:40:13 -0600 +Subject: PCI: Fix unaligned access in AF transaction pending test + +From: Alex Williamson + +commit d066c946a866268c14a120b33e7226e899981998 upstream. + +pci_wait_for_pending() uses word access, so we shouldn't be passing +an offset that is only byte aligned. Use the control register offset +instead, shifting the mask to match. + +Fixes: d0b4cc4e3270 ("PCI: Wrong register used to check pending traffic") +Fixes: 157e876ffe0b ("PCI: Add pci_wait_for_pending() (refactor pci_wait_for_pending_transaction()) +Reported-by: Ben Hutchings +Signed-off-by: Alex Williamson +Signed-off-by: Bjorn Helgaas +Acked-by: Gavin Shan +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/pci.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- a/drivers/pci/pci.c ++++ b/drivers/pci/pci.c +@@ -3109,8 +3109,13 @@ static int pci_af_flr(struct pci_dev *de + if (probe) + return 0; + +- /* Wait for Transaction Pending bit clean */ +- if (pci_wait_for_pending(dev, pos + PCI_AF_STATUS, PCI_AF_STATUS_TP)) ++ /* ++ * Wait for Transaction Pending bit to clear. A word-aligned test ++ * is used, so we use the conrol offset rather than status and shift ++ * the test bit to match. ++ */ ++ if (pci_wait_for_pending(dev, pos + PCI_AF_CTRL, ++ PCI_AF_STATUS_TP << 8)) + goto clear; + + dev_err(&dev->dev, "transaction is not cleared; " diff --git a/queue-3.15/phy-core-fix-error-path-in-phy_create.patch b/queue-3.15/phy-core-fix-error-path-in-phy_create.patch new file mode 100644 index 00000000000..409b6c2f709 --- /dev/null +++ b/queue-3.15/phy-core-fix-error-path-in-phy_create.patch @@ -0,0 +1,44 @@ +From e73b49f1c4e75c44d62585cc3e5b9c7894b61c32 Mon Sep 17 00:00:00 2001 +From: Roger Quadros +Date: Thu, 10 Jul 2014 11:55:02 +0530 +Subject: phy: core: Fix error path in phy_create() + +From: Roger Quadros + +commit e73b49f1c4e75c44d62585cc3e5b9c7894b61c32 upstream. + +Prevent resources from being freed twice in case device_add() call +fails within phy_create(). Also use ida_simple_remove() instead of +ida_remove() as we had used ida_simple_get() to allocate the ida. + +Signed-off-by: Roger Quadros +Signed-off-by: Kishon Vijay Abraham I +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/phy/phy-core.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/drivers/phy/phy-core.c ++++ b/drivers/phy/phy-core.c +@@ -614,8 +614,9 @@ struct phy *phy_create(struct device *de + return phy; + + put_dev: +- put_device(&phy->dev); +- ida_remove(&phy_ida, phy->id); ++ put_device(&phy->dev); /* calls phy_release() which frees resources */ ++ return ERR_PTR(ret); ++ + free_phy: + kfree(phy); + return ERR_PTR(ret); +@@ -799,7 +800,7 @@ static void phy_release(struct device *d + + phy = to_phy(dev); + dev_vdbg(dev, "releasing '%s'\n", dev_name(dev)); +- ida_remove(&phy_ida, phy->id); ++ ida_simple_remove(&phy_ida, phy->id); + kfree(phy); + } + diff --git a/queue-3.15/series b/queue-3.15/series index 28775fc2b50..03c23473e2c 100644 --- a/queue-3.15/series +++ b/queue-3.15/series @@ -29,3 +29,20 @@ powerpc-kvm-remove-redundant-save-of-sier-and-mmcr2.patch powerpc-perf-never-program-book3s-pmcs-with-values-0x80000000.patch powerpc-perf-add-ppmu_arch_207s-define.patch powerpc-perf-clear-mmcr2-when-enabling-pmu.patch +cpufreq-makefile-fix-compilation-for-davinci-platform.patch +crypto-sha512_ssse3-fix-byte-count-to-bit-count-conversion.patch +crypto-caam-fix-memleak-in-caam_jr-module.patch +arm64-implement-task_size_of.patch +phy-core-fix-error-path-in-phy_create.patch +clk-spear3xx-use-proper-control-register-offset.patch +clk-s2mps11-fix-double-free-corruption-during-driver-unbind.patch +clk-qcom-hdmi-source-sel-is-3-not-2.patch +drivers-hv-vmbus-fix-a-bug-in-the-channel-callback-dispatch-code.patch +dm-mpath-fix-io-hang-due-to-logic-bug-in-multipath_busy.patch +dm-io-fix-a-race-condition-in-the-wake-up-code-for-sync_io.patch +dm-allocate-a-special-workqueue-for-deferred-device-removal.patch +intel_pstate-fix-setting-vid.patch +intel_pstate-don-t-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch +intel_pstate-update-documentation-of-max-min-_perf_pct-sysfs-files.patch +intel_pstate-set-cpu-number-before-accessing-msrs.patch +pci-fix-unaligned-access-in-af-transaction-pending-test.patch -- 2.47.3