From: Greg Kroah-Hartman Date: Mon, 23 Jan 2017 16:08:46 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.45~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0cd916477fdaf03685cf4535f7822f2197cab766;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: arm-8613-1-fix-the-uaccess-crash-on-pb11mpcore.patch arm-dts-imx6qdl-nitrogen6_max-fix-sgtl5000-pinctrl-init.patch arm-ux500-fix-prcmu_is_cpu_in_wfi-calculation.patch blackfin-check-devm_pinctrl_get-for-errors.patch dmaengine-pl330-fix-runtime-pm-support-for-terminated-transfers.patch ite-cir-initialize-use_demodulator-before-using-it.patch selftest-powerpc-wrong-pmc-initialized-in-pmc56_overflow-test.patch --- diff --git a/queue-4.4/arm-8613-1-fix-the-uaccess-crash-on-pb11mpcore.patch b/queue-4.4/arm-8613-1-fix-the-uaccess-crash-on-pb11mpcore.patch new file mode 100644 index 00000000000..4913f1a42d0 --- /dev/null +++ b/queue-4.4/arm-8613-1-fix-the-uaccess-crash-on-pb11mpcore.patch @@ -0,0 +1,70 @@ +From 90f92c631b210c1e97080b53a9d863783281a932 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Tue, 13 Sep 2016 12:31:17 +0100 +Subject: ARM: 8613/1: Fix the uaccess crash on PB11MPCore + +From: Linus Walleij + +commit 90f92c631b210c1e97080b53a9d863783281a932 upstream. + +The following patch was sketched by Russell in response to my +crashes on the PB11MPCore after the patch for software-based +priviledged no access support for ARMv8.1. See this thread: +http://marc.info/?l=linux-arm-kernel&m=144051749807214&w=2 + +I am unsure what is going on, I suspect everyone involved in +the discussion is. I just want to repost this to get the +discussion restarted, as I still have to apply this patch +with every kernel iteration to get my PB11MPCore Realview +running. + +Testing by Neil Armstrong on the Oxnas NAS has revealed that +this bug exist also on that widely deployed hardware, so +we are probably currently regressing all ARM11MPCore systems. + +Cc: Russell King +Cc: Will Deacon +Fixes: a5e090acbf54 ("ARM: software-based priviledged-no-access support") +Tested-by: Neil Armstrong +Signed-off-by: Linus Walleij +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kernel/smp_tlb.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/arch/arm/kernel/smp_tlb.c ++++ b/arch/arm/kernel/smp_tlb.c +@@ -9,6 +9,7 @@ + */ + #include + #include ++#include + + #include + #include +@@ -40,8 +41,11 @@ static inline void ipi_flush_tlb_mm(void + static inline void ipi_flush_tlb_page(void *arg) + { + struct tlb_args *ta = (struct tlb_args *)arg; ++ unsigned int __ua_flags = uaccess_save_and_enable(); + + local_flush_tlb_page(ta->ta_vma, ta->ta_start); ++ ++ uaccess_restore(__ua_flags); + } + + static inline void ipi_flush_tlb_kernel_page(void *arg) +@@ -54,8 +58,11 @@ static inline void ipi_flush_tlb_kernel_ + static inline void ipi_flush_tlb_range(void *arg) + { + struct tlb_args *ta = (struct tlb_args *)arg; ++ unsigned int __ua_flags = uaccess_save_and_enable(); + + local_flush_tlb_range(ta->ta_vma, ta->ta_start, ta->ta_end); ++ ++ uaccess_restore(__ua_flags); + } + + static inline void ipi_flush_tlb_kernel_range(void *arg) diff --git a/queue-4.4/arm-dts-imx6qdl-nitrogen6_max-fix-sgtl5000-pinctrl-init.patch b/queue-4.4/arm-dts-imx6qdl-nitrogen6_max-fix-sgtl5000-pinctrl-init.patch new file mode 100644 index 00000000000..541dc4c1c2e --- /dev/null +++ b/queue-4.4/arm-dts-imx6qdl-nitrogen6_max-fix-sgtl5000-pinctrl-init.patch @@ -0,0 +1,47 @@ +From 6ab5c2b662e2dcbb964099bf7f19e9dbc9ae5a41 Mon Sep 17 00:00:00 2001 +From: Gary Bisson +Date: Tue, 3 Jan 2017 12:22:46 +0100 +Subject: ARM: dts: imx6qdl-nitrogen6_max: fix sgtl5000 pinctrl init + +From: Gary Bisson + +commit 6ab5c2b662e2dcbb964099bf7f19e9dbc9ae5a41 upstream. + +This patch fixes the following error: +sgtl5000 0-000a: Error reading chip id -6 +imx-sgtl5000 sound: ASoC: CODEC DAI sgtl5000 not registered +imx-sgtl5000 sound: snd_soc_register_card failed (-517) + +The problem was that the pinctrl group was linked to the sound driver +instead of the codec node. Since the codec is probed first, the sys_mclk +was missing and it would therefore fail to initialize. + +Fixes: b32e700256bc ("ARM: dts: imx: add Boundary Devices Nitrogen6_Max board") +Signed-off-by: Gary Bisson +Signed-off-by: Shawn Guo +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi +@@ -319,8 +319,6 @@ + compatible = "fsl,imx6q-nitrogen6_max-sgtl5000", + "fsl,imx-audio-sgtl5000"; + model = "imx6q-nitrogen6_max-sgtl5000"; +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_sgtl5000>; + ssi-controller = <&ssi1>; + audio-codec = <&codec>; + audio-routing = +@@ -401,6 +399,8 @@ + + codec: sgtl5000@0a { + compatible = "fsl,sgtl5000"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_sgtl5000>; + reg = <0x0a>; + clocks = <&clks 201>; + VDDA-supply = <®_2p5v>; diff --git a/queue-4.4/arm-ux500-fix-prcmu_is_cpu_in_wfi-calculation.patch b/queue-4.4/arm-ux500-fix-prcmu_is_cpu_in_wfi-calculation.patch new file mode 100644 index 00000000000..eaa8dca9afd --- /dev/null +++ b/queue-4.4/arm-ux500-fix-prcmu_is_cpu_in_wfi-calculation.patch @@ -0,0 +1,42 @@ +From f0e8faa7a5e894b0fc99d24be1b18685a92ea466 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 16 Nov 2016 16:20:37 +0100 +Subject: ARM: ux500: fix prcmu_is_cpu_in_wfi() calculation + +From: Arnd Bergmann + +commit f0e8faa7a5e894b0fc99d24be1b18685a92ea466 upstream. + +This function clearly never worked and always returns true, +as pointed out by gcc-7: + +arch/arm/mach-ux500/pm.c: In function 'prcmu_is_cpu_in_wfi': +arch/arm/mach-ux500/pm.c:137:212: error: ?: +using integer constants in boolean context, the expression +will always evaluate to 'true' [-Werror=int-in-bool-context] + +With the added braces, the condition actually makes sense. + +Fixes: 34fe6f107eab ("mfd : Check if the other db8500 core is in WFI") +Signed-off-by: Arnd Bergmann +Acked-by: Daniel Lezcano +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-ux500/pm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/mach-ux500/pm.c ++++ b/arch/arm/mach-ux500/pm.c +@@ -134,8 +134,8 @@ bool prcmu_pending_irq(void) + */ + bool prcmu_is_cpu_in_wfi(int cpu) + { +- return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : +- PRCM_ARM_WFI_STANDBY_WFI0; ++ return readl(PRCM_ARM_WFI_STANDBY) & ++ (cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : PRCM_ARM_WFI_STANDBY_WFI0); + } + + /* diff --git a/queue-4.4/blackfin-check-devm_pinctrl_get-for-errors.patch b/queue-4.4/blackfin-check-devm_pinctrl_get-for-errors.patch new file mode 100644 index 00000000000..c8928700dd5 --- /dev/null +++ b/queue-4.4/blackfin-check-devm_pinctrl_get-for-errors.patch @@ -0,0 +1,32 @@ +From c9205e18b41a6ef5ad73e1c4b86a78b2ea3ccb9b Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 14 Jul 2016 07:18:14 -0300 +Subject: [media] blackfin: check devm_pinctrl_get() for errors + +From: Dan Carpenter + +commit c9205e18b41a6ef5ad73e1c4b86a78b2ea3ccb9b upstream. + +devm_pinctrl_get() can fail so we should check for that. + +Fixes: 0a6824bc10de ('[media] v4l2: blackfin: select proper pinctrl state in ppi_set_params if CONFIG_PINCTRL is enabled') + +Signed-off-by: Dan Carpenter +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/platform/blackfin/ppi.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/media/platform/blackfin/ppi.c ++++ b/drivers/media/platform/blackfin/ppi.c +@@ -214,6 +214,8 @@ static int ppi_set_params(struct ppi_if + if (params->dlen > 24 || params->dlen <= 0) + return -EINVAL; + pctrl = devm_pinctrl_get(ppi->dev); ++ if (IS_ERR(pctrl)) ++ return PTR_ERR(pctrl); + pstate = pinctrl_lookup_state(pctrl, + pin_state[(params->dlen + 7) / 8 - 1]); + if (pinctrl_select_state(pctrl, pstate)) diff --git a/queue-4.4/dmaengine-pl330-fix-runtime-pm-support-for-terminated-transfers.patch b/queue-4.4/dmaengine-pl330-fix-runtime-pm-support-for-terminated-transfers.patch new file mode 100644 index 00000000000..d7858b5fcc2 --- /dev/null +++ b/queue-4.4/dmaengine-pl330-fix-runtime-pm-support-for-terminated-transfers.patch @@ -0,0 +1,86 @@ +From 5c9e6c2b2ba3ec3a442e2fb5b4286498f8b4dcb7 Mon Sep 17 00:00:00 2001 +From: Marek Szyprowski +Date: Fri, 16 Dec 2016 11:39:11 +0100 +Subject: dmaengine: pl330: Fix runtime PM support for terminated transfers + +From: Marek Szyprowski + +commit 5c9e6c2b2ba3ec3a442e2fb5b4286498f8b4dcb7 upstream. + +PL330 DMA engine driver is leaking a runtime reference after any terminated +DMA transactions. This patch fixes this issue by tracking runtime PM state +of the device and making additional call to pm_runtime_put() in terminate_all +callback if needed. + +Fixes: ae43b3289186 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12") +Signed-off-by: Marek Szyprowski +Reviewed-by: Krzysztof Kozlowski +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/dma/pl330.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/drivers/dma/pl330.c ++++ b/drivers/dma/pl330.c +@@ -445,6 +445,9 @@ struct dma_pl330_chan { + + /* for cyclic capability */ + bool cyclic; ++ ++ /* for runtime pm tracking */ ++ bool active; + }; + + struct pl330_dmac { +@@ -1994,6 +1997,7 @@ static void pl330_tasklet(unsigned long + _stop(pch->thread); + spin_unlock(&pch->thread->dmac->lock); + power_down = true; ++ pch->active = false; + } else { + /* Make sure the PL330 Channel thread is active */ + spin_lock(&pch->thread->dmac->lock); +@@ -2015,6 +2019,7 @@ static void pl330_tasklet(unsigned long + desc->status = PREP; + list_move_tail(&desc->node, &pch->work_list); + if (power_down) { ++ pch->active = true; + spin_lock(&pch->thread->dmac->lock); + _start(pch->thread); + spin_unlock(&pch->thread->dmac->lock); +@@ -2129,6 +2134,7 @@ static int pl330_terminate_all(struct dm + unsigned long flags; + struct pl330_dmac *pl330 = pch->dmac; + LIST_HEAD(list); ++ bool power_down = false; + + pm_runtime_get_sync(pl330->ddma.dev); + spin_lock_irqsave(&pch->lock, flags); +@@ -2139,6 +2145,8 @@ static int pl330_terminate_all(struct dm + pch->thread->req[0].desc = NULL; + pch->thread->req[1].desc = NULL; + pch->thread->req_running = -1; ++ power_down = pch->active; ++ pch->active = false; + + /* Mark all desc done */ + list_for_each_entry(desc, &pch->submitted_list, node) { +@@ -2156,6 +2164,8 @@ static int pl330_terminate_all(struct dm + list_splice_tail_init(&pch->completed_list, &pl330->desc_pool); + spin_unlock_irqrestore(&pch->lock, flags); + pm_runtime_mark_last_busy(pl330->ddma.dev); ++ if (power_down) ++ pm_runtime_put_autosuspend(pl330->ddma.dev); + pm_runtime_put_autosuspend(pl330->ddma.dev); + + return 0; +@@ -2302,6 +2312,7 @@ static void pl330_issue_pending(struct d + * updated on work_list emptiness status. + */ + WARN_ON(list_empty(&pch->submitted_list)); ++ pch->active = true; + pm_runtime_get_sync(pch->dmac->ddma.dev); + } + list_splice_tail_init(&pch->submitted_list, &pch->work_list); diff --git a/queue-4.4/ite-cir-initialize-use_demodulator-before-using-it.patch b/queue-4.4/ite-cir-initialize-use_demodulator-before-using-it.patch new file mode 100644 index 00000000000..e5285085231 --- /dev/null +++ b/queue-4.4/ite-cir-initialize-use_demodulator-before-using-it.patch @@ -0,0 +1,38 @@ +From 7ec03e60ef81c19b5d3a46dd070ee966774b860f Mon Sep 17 00:00:00 2001 +From: Nicolas Iooss +Date: Sat, 10 Sep 2016 13:59:49 -0300 +Subject: [media] ite-cir: initialize use_demodulator before using it + +From: Nicolas Iooss + +commit 7ec03e60ef81c19b5d3a46dd070ee966774b860f upstream. + +Function ite_set_carrier_params() uses variable use_demodulator after +having initialized it to false in some if branches, but this variable is +never set to true otherwise. + +This bug has been found using clang -Wsometimes-uninitialized warning +flag. + +Fixes: 620a32bba4a2 ("[media] rc: New rc-based ite-cir driver for +several ITE CIRs") + +Signed-off-by: Nicolas Iooss +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/rc/ite-cir.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/media/rc/ite-cir.c ++++ b/drivers/media/rc/ite-cir.c +@@ -263,6 +263,8 @@ static void ite_set_carrier_params(struc + + if (allowance > ITE_RXDCR_MAX) + allowance = ITE_RXDCR_MAX; ++ ++ use_demodulator = true; + } + } + diff --git a/queue-4.4/selftest-powerpc-wrong-pmc-initialized-in-pmc56_overflow-test.patch b/queue-4.4/selftest-powerpc-wrong-pmc-initialized-in-pmc56_overflow-test.patch new file mode 100644 index 00000000000..17cca1775c5 --- /dev/null +++ b/queue-4.4/selftest-powerpc-wrong-pmc-initialized-in-pmc56_overflow-test.patch @@ -0,0 +1,32 @@ +From df21d2fa733035e4d414379960f94b2516b41296 Mon Sep 17 00:00:00 2001 +From: Madhavan Srinivasan +Date: Mon, 19 Dec 2016 17:46:53 +0530 +Subject: selftest/powerpc: Wrong PMC initialized in pmc56_overflow test + +From: Madhavan Srinivasan + +commit df21d2fa733035e4d414379960f94b2516b41296 upstream. + +Test uses PMC2 to count the event. But PMC1 is being initialized. +Patch to fix it. + +Fixes: 3752e453f6ba ('selftests/powerpc: Add tests of PMU EBBs') +Signed-off-by: Madhavan Srinivasan +Signed-off-by: Michael Ellerman +Signed-off-by: Greg Kroah-Hartman + +--- + tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c ++++ b/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c +@@ -66,7 +66,7 @@ int pmc56_overflow(void) + + FAIL_IF(ebb_event_enable(&event)); + +- mtspr(SPRN_PMC1, pmc_sample_period(sample_period)); ++ mtspr(SPRN_PMC2, pmc_sample_period(sample_period)); + mtspr(SPRN_PMC5, 0); + mtspr(SPRN_PMC6, 0); + diff --git a/queue-4.4/series b/queue-4.4/series index bafb84d8ade..9ebbdcd1a90 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -32,3 +32,10 @@ arm64-ptrace-preserve-previous-registers-for-short-regset-write-2.patch arm64-ptrace-preserve-previous-registers-for-short-regset-write-3.patch arm64-ptrace-avoid-uninitialised-struct-padding-in-fpr_set.patch arm64-ptrace-reject-attempts-to-set-incomplete-hardware-breakpoint-fields.patch +arm-dts-imx6qdl-nitrogen6_max-fix-sgtl5000-pinctrl-init.patch +arm-ux500-fix-prcmu_is_cpu_in_wfi-calculation.patch +arm-8613-1-fix-the-uaccess-crash-on-pb11mpcore.patch +blackfin-check-devm_pinctrl_get-for-errors.patch +ite-cir-initialize-use_demodulator-before-using-it.patch +dmaengine-pl330-fix-runtime-pm-support-for-terminated-transfers.patch +selftest-powerpc-wrong-pmc-initialized-in-pmc56_overflow-test.patch