From 4070578723d0146882fdb96ca40a5d3d4f39e5d5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 18 Sep 2015 20:33:48 -0700 Subject: [PATCH] 3.14-stable patches added patches: arm-omap2-dra7-clockdomain-change-l4per2_7xx_clkdm-to-sw_wkup.patch auxdisplay-ks0108-fix-refcount.patch devres-fix-devres_get.patch doc-abi-testing-configfs-usb-gadget-loopback.patch doc-abi-testing-configfs-usb-gadget-sourcesink.patch of-address-don-t-loop-forever-in-of_find_matching_node_by_address.patch xtensa-fix-kernel-register-spilling.patch xtensa-fix-threadptr-reload-on-return-to-userspace.patch --- ...n-change-l4per2_7xx_clkdm-to-sw_wkup.patch | 34 +++++++ .../auxdisplay-ks0108-fix-refcount.patch | 33 +++++++ queue-3.14/devres-fix-devres_get.patch | 36 +++++++ ...testing-configfs-usb-gadget-loopback.patch | 27 +++++ ...sting-configfs-usb-gadget-sourcesink.patch | 27 +++++ ...-in-of_find_matching_node_by_address.patch | 41 ++++++++ queue-3.14/series | 8 ++ .../xtensa-fix-kernel-register-spilling.patch | 98 +++++++++++++++++++ ...eadptr-reload-on-return-to-userspace.patch | 39 ++++++++ 9 files changed, 343 insertions(+) create mode 100644 queue-3.14/arm-omap2-dra7-clockdomain-change-l4per2_7xx_clkdm-to-sw_wkup.patch create mode 100644 queue-3.14/auxdisplay-ks0108-fix-refcount.patch create mode 100644 queue-3.14/devres-fix-devres_get.patch create mode 100644 queue-3.14/doc-abi-testing-configfs-usb-gadget-loopback.patch create mode 100644 queue-3.14/doc-abi-testing-configfs-usb-gadget-sourcesink.patch create mode 100644 queue-3.14/of-address-don-t-loop-forever-in-of_find_matching_node_by_address.patch create mode 100644 queue-3.14/xtensa-fix-kernel-register-spilling.patch create mode 100644 queue-3.14/xtensa-fix-threadptr-reload-on-return-to-userspace.patch diff --git a/queue-3.14/arm-omap2-dra7-clockdomain-change-l4per2_7xx_clkdm-to-sw_wkup.patch b/queue-3.14/arm-omap2-dra7-clockdomain-change-l4per2_7xx_clkdm-to-sw_wkup.patch new file mode 100644 index 00000000000..56770fe7c15 --- /dev/null +++ b/queue-3.14/arm-omap2-dra7-clockdomain-change-l4per2_7xx_clkdm-to-sw_wkup.patch @@ -0,0 +1,34 @@ +From b9e23f321940d2db2c9def8ff723b8464fb86343 Mon Sep 17 00:00:00 2001 +From: Vignesh R +Date: Wed, 3 Jun 2015 17:21:20 +0530 +Subject: ARM: OMAP2+: DRA7: clockdomain: change l4per2_7xx_clkdm to SW_WKUP + +From: Vignesh R + +commit b9e23f321940d2db2c9def8ff723b8464fb86343 upstream. + +Legacy IPs like PWMSS, present under l4per2_7xx_clkdm, cannot support +smart-idle when its clock domain is in HW_AUTO on DRA7 SoCs. Hence, +program clock domain to SW_WKUP. + +Signed-off-by: Vignesh R +Acked-by: Tero Kristo +Reviewed-by: Paul Walmsley +Signed-off-by: Paul Walmsley +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/mach-omap2/clockdomains7xx_data.c ++++ b/arch/arm/mach-omap2/clockdomains7xx_data.c +@@ -331,7 +331,7 @@ static struct clockdomain l4per2_7xx_clk + .dep_bit = DRA7XX_L4PER2_STATDEP_SHIFT, + .wkdep_srcs = l4per2_wkup_sleep_deps, + .sleepdep_srcs = l4per2_wkup_sleep_deps, +- .flags = CLKDM_CAN_HWSUP_SWSUP, ++ .flags = CLKDM_CAN_SWSUP, + }; + + static struct clockdomain mpu0_7xx_clkdm = { diff --git a/queue-3.14/auxdisplay-ks0108-fix-refcount.patch b/queue-3.14/auxdisplay-ks0108-fix-refcount.patch new file mode 100644 index 00000000000..6017934a96b --- /dev/null +++ b/queue-3.14/auxdisplay-ks0108-fix-refcount.patch @@ -0,0 +1,33 @@ +From bab383de3b84e584b0f09227151020b2a43dc34c Mon Sep 17 00:00:00 2001 +From: Sudip Mukherjee +Date: Mon, 20 Jul 2015 17:27:21 +0530 +Subject: auxdisplay: ks0108: fix refcount + +From: Sudip Mukherjee + +commit bab383de3b84e584b0f09227151020b2a43dc34c upstream. + +parport_find_base() will implicitly do parport_get_port() which +increases the refcount. Then parport_register_device() will again +increment the refcount. But while unloading the module we are only +doing parport_unregister_device() decrementing the refcount only once. +We add an parport_put_port() to neutralize the effect of +parport_get_port(). + +Signed-off-by: Sudip Mukherjee +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/auxdisplay/ks0108.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/auxdisplay/ks0108.c ++++ b/drivers/auxdisplay/ks0108.c +@@ -139,6 +139,7 @@ static int __init ks0108_init(void) + + ks0108_pardevice = parport_register_device(ks0108_parport, KS0108_NAME, + NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL); ++ parport_put_port(ks0108_parport); + if (ks0108_pardevice == NULL) { + printk(KERN_ERR KS0108_NAME ": ERROR: " + "parport didn't register new device\n"); diff --git a/queue-3.14/devres-fix-devres_get.patch b/queue-3.14/devres-fix-devres_get.patch new file mode 100644 index 00000000000..27fc57a7be2 --- /dev/null +++ b/queue-3.14/devres-fix-devres_get.patch @@ -0,0 +1,36 @@ +From 64526370d11ce8868ca495723d595b61e8697fbf Mon Sep 17 00:00:00 2001 +From: Masahiro Yamada +Date: Wed, 15 Jul 2015 10:29:00 +0900 +Subject: devres: fix devres_get() + +From: Masahiro Yamada + +commit 64526370d11ce8868ca495723d595b61e8697fbf upstream. + +Currently, devres_get() passes devres_free() the pointer to devres, +but devres_free() should be given with the pointer to resource data. + +Fixes: 9ac7849e35f7 ("devres: device resource management") +Signed-off-by: Masahiro Yamada +Acked-by: Tejun Heo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/base/devres.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/base/devres.c ++++ b/drivers/base/devres.c +@@ -297,10 +297,10 @@ void * devres_get(struct device *dev, vo + if (!dr) { + add_dr(dev, &new_dr->node); + dr = new_dr; +- new_dr = NULL; ++ new_res = NULL; + } + spin_unlock_irqrestore(&dev->devres_lock, flags); +- devres_free(new_dr); ++ devres_free(new_res); + + return dr->data; + } diff --git a/queue-3.14/doc-abi-testing-configfs-usb-gadget-loopback.patch b/queue-3.14/doc-abi-testing-configfs-usb-gadget-loopback.patch new file mode 100644 index 00000000000..18cb9f5ee52 --- /dev/null +++ b/queue-3.14/doc-abi-testing-configfs-usb-gadget-loopback.patch @@ -0,0 +1,27 @@ +From 8cd50626823c00ca7472b2f61cb8c0eb9798ddc0 Mon Sep 17 00:00:00 2001 +From: Peter Chen +Date: Fri, 31 Jul 2015 16:36:28 +0800 +Subject: Doc: ABI: testing: configfs-usb-gadget-loopback + +From: Peter Chen + +commit 8cd50626823c00ca7472b2f61cb8c0eb9798ddc0 upstream. + +Fix the name of attribute + +Signed-off-by: Peter Chen +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/ABI/testing/configfs-usb-gadget-loopback | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Documentation/ABI/testing/configfs-usb-gadget-loopback ++++ b/Documentation/ABI/testing/configfs-usb-gadget-loopback +@@ -5,4 +5,4 @@ Description: + The attributes: + + qlen - depth of loopback queue +- bulk_buflen - buffer length ++ buflen - buffer length diff --git a/queue-3.14/doc-abi-testing-configfs-usb-gadget-sourcesink.patch b/queue-3.14/doc-abi-testing-configfs-usb-gadget-sourcesink.patch new file mode 100644 index 00000000000..83b95511292 --- /dev/null +++ b/queue-3.14/doc-abi-testing-configfs-usb-gadget-sourcesink.patch @@ -0,0 +1,27 @@ +From 4bc58eb16bb2352854b9c664cc36c1c68d2bfbb7 Mon Sep 17 00:00:00 2001 +From: Peter Chen +Date: Fri, 31 Jul 2015 16:36:29 +0800 +Subject: Doc: ABI: testing: configfs-usb-gadget-sourcesink + +From: Peter Chen + +commit 4bc58eb16bb2352854b9c664cc36c1c68d2bfbb7 upstream. + +Fix the name of attribute + +Signed-off-by: Peter Chen +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/ABI/testing/configfs-usb-gadget-sourcesink | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Documentation/ABI/testing/configfs-usb-gadget-sourcesink ++++ b/Documentation/ABI/testing/configfs-usb-gadget-sourcesink +@@ -9,4 +9,4 @@ Description: + isoc_maxpacket - 0 - 1023 (fs), 0 - 1024 (hs/ss) + isoc_mult - 0..2 (hs/ss only) + isoc_maxburst - 0..15 (ss only) +- qlen - buffer length ++ buflen - buffer length diff --git a/queue-3.14/of-address-don-t-loop-forever-in-of_find_matching_node_by_address.patch b/queue-3.14/of-address-don-t-loop-forever-in-of_find_matching_node_by_address.patch new file mode 100644 index 00000000000..197cf8fde39 --- /dev/null +++ b/queue-3.14/of-address-don-t-loop-forever-in-of_find_matching_node_by_address.patch @@ -0,0 +1,41 @@ +From 3a496b00b6f90c41bd21a410871dfc97d4f3c7ab Mon Sep 17 00:00:00 2001 +From: David Daney +Date: Wed, 19 Aug 2015 13:17:47 -0700 +Subject: of/address: Don't loop forever in of_find_matching_node_by_address(). + +From: David Daney + +commit 3a496b00b6f90c41bd21a410871dfc97d4f3c7ab upstream. + +If the internal call to of_address_to_resource() fails, we end up +looping forever in of_find_matching_node_by_address(). This can be +caused by a defective device tree, or calling with an incorrect +matches argument. + +Fix by calling of_find_matching_node() unconditionally at the end of +the loop. + +Signed-off-by: David Daney +Signed-off-by: Rob Herring +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/of/address.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/of/address.c ++++ b/drivers/of/address.c +@@ -704,10 +704,10 @@ struct device_node *of_find_matching_nod + struct resource res; + + while (dn) { +- if (of_address_to_resource(dn, 0, &res)) +- continue; +- if (res.start == base_address) ++ if (!of_address_to_resource(dn, 0, &res) && ++ res.start == base_address) + return dn; ++ + dn = of_find_matching_node(dn, matches); + } + diff --git a/queue-3.14/series b/queue-3.14/series index c4ad779534d..976cf23b21a 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -17,3 +17,11 @@ serial-8250-don-t-bind-to-smsc-ircc-ir-port.patch crypto-ghash-clmulni-specify-context-size-for-ghash-async-algorithm.patch hid-usbhid-fix-the-check-for-hid_reset_pending-in-hid_io_error.patch kvm-mmu-fix-validation-of-mmio-page-fault.patch +xtensa-fix-threadptr-reload-on-return-to-userspace.patch +xtensa-fix-kernel-register-spilling.patch +devres-fix-devres_get.patch +doc-abi-testing-configfs-usb-gadget-loopback.patch +doc-abi-testing-configfs-usb-gadget-sourcesink.patch +auxdisplay-ks0108-fix-refcount.patch +of-address-don-t-loop-forever-in-of_find_matching_node_by_address.patch +arm-omap2-dra7-clockdomain-change-l4per2_7xx_clkdm-to-sw_wkup.patch diff --git a/queue-3.14/xtensa-fix-kernel-register-spilling.patch b/queue-3.14/xtensa-fix-kernel-register-spilling.patch new file mode 100644 index 00000000000..80cfe1b44fb --- /dev/null +++ b/queue-3.14/xtensa-fix-kernel-register-spilling.patch @@ -0,0 +1,98 @@ +From 77d6273e79e3a86552fcf10cdd31a69b46ed2ce6 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 16 Jul 2015 10:41:02 +0300 +Subject: xtensa: fix kernel register spilling + +From: Max Filippov + +commit 77d6273e79e3a86552fcf10cdd31a69b46ed2ce6 upstream. + +call12 can't be safely used as the first call in the inline function, +because the compiler does not extend the stack frame of the bounding +function accordingly, which may result in corruption of local variables. + +If a call needs to be done, do call8 first followed by call12. + +For pure assembly code in _switch_to increase stack frame size of the +bounding function. + +Signed-off-by: Max Filippov +Signed-off-by: Greg Kroah-Hartman + +--- + arch/xtensa/include/asm/traps.h | 29 +++++++++++++++++++---------- + arch/xtensa/kernel/entry.S | 4 ++-- + 2 files changed, 21 insertions(+), 12 deletions(-) + +--- a/arch/xtensa/include/asm/traps.h ++++ b/arch/xtensa/include/asm/traps.h +@@ -25,30 +25,39 @@ static inline void spill_registers(void) + { + #if XCHAL_NUM_AREGS > 16 + __asm__ __volatile__ ( +- " call12 1f\n" ++ " call8 1f\n" + " _j 2f\n" + " retw\n" + " .align 4\n" + "1:\n" ++#if XCHAL_NUM_AREGS == 32 ++ " _entry a1, 32\n" ++ " addi a8, a0, 3\n" ++ " _entry a1, 16\n" ++ " mov a12, a12\n" ++ " retw\n" ++#else + " _entry a1, 48\n" +- " addi a12, a0, 3\n" +-#if XCHAL_NUM_AREGS > 32 +- " .rept (" __stringify(XCHAL_NUM_AREGS) " - 32) / 12\n" ++ " call12 1f\n" ++ " retw\n" ++ " .align 4\n" ++ "1:\n" ++ " .rept (" __stringify(XCHAL_NUM_AREGS) " - 16) / 12\n" + " _entry a1, 48\n" + " mov a12, a0\n" + " .endr\n" +-#endif +- " _entry a1, 48\n" ++ " _entry a1, 16\n" + #if XCHAL_NUM_AREGS % 12 == 0 +- " mov a8, a8\n" +-#elif XCHAL_NUM_AREGS % 12 == 4 + " mov a12, a12\n" +-#elif XCHAL_NUM_AREGS % 12 == 8 ++#elif XCHAL_NUM_AREGS % 12 == 4 + " mov a4, a4\n" ++#elif XCHAL_NUM_AREGS % 12 == 8 ++ " mov a8, a8\n" + #endif + " retw\n" ++#endif + "2:\n" +- : : : "a12", "a13", "memory"); ++ : : : "a8", "a9", "memory"); + #else + __asm__ __volatile__ ( + " mov a12, a12\n" +--- a/arch/xtensa/kernel/entry.S ++++ b/arch/xtensa/kernel/entry.S +@@ -1793,7 +1793,7 @@ ENDPROC(system_call) + mov a12, a0 + .endr + #endif +- _entry a1, 48 ++ _entry a1, 16 + #if XCHAL_NUM_AREGS % 12 == 0 + mov a8, a8 + #elif XCHAL_NUM_AREGS % 12 == 4 +@@ -1817,7 +1817,7 @@ ENDPROC(system_call) + + ENTRY(_switch_to) + +- entry a1, 16 ++ entry a1, 48 + + mov a11, a3 # and 'next' (a3) + diff --git a/queue-3.14/xtensa-fix-threadptr-reload-on-return-to-userspace.patch b/queue-3.14/xtensa-fix-threadptr-reload-on-return-to-userspace.patch new file mode 100644 index 00000000000..82dd7a6a08c --- /dev/null +++ b/queue-3.14/xtensa-fix-threadptr-reload-on-return-to-userspace.patch @@ -0,0 +1,39 @@ +From 4229fb12a03e5da5882b420b0aa4a02e77447b86 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 4 Jul 2015 15:27:39 +0300 +Subject: xtensa: fix threadptr reload on return to userspace + +From: Max Filippov + +commit 4229fb12a03e5da5882b420b0aa4a02e77447b86 upstream. + +Userspace return code may skip restoring THREADPTR register if there are +no registers that need to be zeroed. This leads to spurious failures in +libc NPTL tests. + +Always restore THREADPTR on return to userspace. + +Signed-off-by: Max Filippov +Signed-off-by: Greg Kroah-Hartman + +--- + arch/xtensa/kernel/entry.S | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/xtensa/kernel/entry.S ++++ b/arch/xtensa/kernel/entry.S +@@ -568,12 +568,13 @@ user_exception_exit: + * (if we have restored WSBITS-1 frames). + */ + ++2: + #if XCHAL_HAVE_THREADPTR + l32i a3, a1, PT_THREADPTR + wur a3, threadptr + #endif + +-2: j common_exception_exit ++ j common_exception_exit + + /* This is the kernel exception exit. + * We avoided to do a MOVSP when we entered the exception, but we -- 2.47.2