From: Sasha Levin Date: Wed, 20 Oct 2021 21:21:31 +0000 (-0400) Subject: Fixes for 5.4 X-Git-Tag: v4.4.290~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ec29b7ecf883d4bbea8d994566355ae9e0fff5e;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/arm-config-mutli-v7-reenable-fb-dependency.patch b/queue-5.4/arm-config-mutli-v7-reenable-fb-dependency.patch new file mode 100644 index 00000000000..5926195f8aa --- /dev/null +++ b/queue-5.4/arm-config-mutli-v7-reenable-fb-dependency.patch @@ -0,0 +1,44 @@ +From 18a10dca9f75336e6285015aea55a4a55220df52 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 15 Jun 2021 10:44:34 +0930 +Subject: ARM: config: mutli v7: Reenable FB dependency + +From: Joel Stanley + +[ Upstream commit 8c1768967e2733d55abf449d8abd6f1915ba3539 ] + +DRM_FBDEV_EMULATION previously selected FB and was default y as long as DRM +was enabled. In commit f611b1e7624c ("drm: Avoid circular dependencies for +CONFIG_FB") the select was replaced with a depends on FB, disabling the +drivers that depended on it. + +Renable FB so we get back FB_EFI, FB_WM8505, FB_SH_MOBILE_LCDC, FB_SIMPLE and +VIDEO_VIVID. + +It must be set to y and not a module as the test driver VIDEO_VIVID +requires it to be built in. + +Link: https://lore.kernel.org/r/CAK8P3a18EdBKQdGDOZc9cPKsf=hY8==v2cO0DBE_tyd82Uq-Ng@mail.gmail.com +Signed-off-by: Joel Stanley +Reviewed-by: Arnd Bergmann +Signed-off-by: Arnd Bergmann +Signed-off-by: Sasha Levin +--- + arch/arm/configs/multi_v7_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig +index e4c8def9a0a5..32dfc736a4b1 100644 +--- a/arch/arm/configs/multi_v7_defconfig ++++ b/arch/arm/configs/multi_v7_defconfig +@@ -677,6 +677,7 @@ CONFIG_DRM_PL111=m + CONFIG_DRM_LIMA=m + CONFIG_DRM_PANFROST=m + CONFIG_DRM_ASPEED_GFX=m ++CONFIG_FB=y + CONFIG_FB_EFI=y + CONFIG_FB_WM8505=y + CONFIG_FB_SH_MOBILE_LCDC=y +-- +2.33.0 + diff --git a/queue-5.4/arm-dts-at91-sama5d2_som1_ek-disable-isc-node-by-def.patch b/queue-5.4/arm-dts-at91-sama5d2_som1_ek-disable-isc-node-by-def.patch new file mode 100644 index 00000000000..76f2f182cb7 --- /dev/null +++ b/queue-5.4/arm-dts-at91-sama5d2_som1_ek-disable-isc-node-by-def.patch @@ -0,0 +1,37 @@ +From 68e7369bb21a304bdb04bc7f8223c1a6af5bd9ea Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 2 Sep 2021 15:13:58 +0300 +Subject: ARM: dts: at91: sama5d2_som1_ek: disable ISC node by default + +From: Eugen Hristev + +[ Upstream commit 4348cc10da6377a86940beb20ad357933b8f91bb ] + +Without a sensor node, the ISC will simply fail to probe, as the +corresponding port node is missing. +It is then logical to disable the node in the devicetree. +If we add a port with a connection to a sensor endpoint, ISC can be enabled. + +Signed-off-by: Eugen Hristev +Signed-off-by: Nicolas Ferre +Link: https://lore.kernel.org/r/20210902121358.503589-1-eugen.hristev@microchip.com +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts +index 89f0c9979b89..4f63158d6b9b 100644 +--- a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts ++++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts +@@ -69,7 +69,6 @@ + isc: isc@f0008000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>; +- status = "okay"; + }; + + qspi1: spi@f0024000 { +-- +2.33.0 + diff --git a/queue-5.4/nfsd-keep-existing-listeners-on-portlist-error.patch b/queue-5.4/nfsd-keep-existing-listeners-on-portlist-error.patch new file mode 100644 index 00000000000..8ee2f7300ad --- /dev/null +++ b/queue-5.4/nfsd-keep-existing-listeners-on-portlist-error.patch @@ -0,0 +1,42 @@ +From a72c070a49678d4d4169185524c1a996d034e37a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 6 Oct 2021 13:20:44 -0400 +Subject: NFSD: Keep existing listeners on portlist error + +From: Benjamin Coddington + +[ Upstream commit c20106944eb679fa3ab7e686fe5f6ba30fbc51e5 ] + +If nfsd has existing listening sockets without any processes, then an error +returned from svc_create_xprt() for an additional transport will remove +those existing listeners. We're seeing this in practice when userspace +attempts to create rpcrdma transports without having the rpcrdma modules +present before creating nfsd kernel processes. Fix this by checking for +existing sockets before calling nfsd_destroy(). + +Signed-off-by: Benjamin Coddington +Signed-off-by: Chuck Lever +Signed-off-by: Sasha Levin +--- + fs/nfsd/nfsctl.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c +index 8e03d6c25097..730386c130e0 100644 +--- a/fs/nfsd/nfsctl.c ++++ b/fs/nfsd/nfsctl.c +@@ -792,7 +792,10 @@ out_close: + svc_xprt_put(xprt); + } + out_err: +- nfsd_destroy(net); ++ if (!list_empty(&nn->nfsd_serv->sv_permsocks)) ++ nn->nfsd_serv->sv_nrthreads--; ++ else ++ nfsd_destroy(net); + return err; + } + +-- +2.33.0 + diff --git a/queue-5.4/series b/queue-5.4/series index 5d41042cde1..823b1407dbb 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -1,3 +1,8 @@ parisc-math-emu-fix-fall-through-warnings.patch net-switchdev-do-not-propagate-bridge-updates-across-bridges.patch tee-optee-fix-missing-devices-unregister-during-optee_remove.patch +arm-config-mutli-v7-reenable-fb-dependency.patch +arm-dts-at91-sama5d2_som1_ek-disable-isc-node-by-def.patch +xtensa-xtfpga-use-config_use_of-instead-of-config_of.patch +xtensa-xtfpga-try-software-restart-before-simulating.patch +nfsd-keep-existing-listeners-on-portlist-error.patch diff --git a/queue-5.4/xtensa-xtfpga-try-software-restart-before-simulating.patch b/queue-5.4/xtensa-xtfpga-try-software-restart-before-simulating.patch new file mode 100644 index 00000000000..cc0ce50229f --- /dev/null +++ b/queue-5.4/xtensa-xtfpga-try-software-restart-before-simulating.patch @@ -0,0 +1,56 @@ +From f2926a8669954e7af6f1dbe24ef50ec057c26006 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 1 Aug 2021 10:36:59 -0700 +Subject: xtensa: xtfpga: Try software restart before simulating CPU reset + +From: Guenter Roeck + +[ Upstream commit 012e974501a270d8dfd4ee2039e1fdf7579c907e ] + +Rebooting xtensa images loaded with the '-kernel' option in qemu does +not work. When executing a reboot command, the qemu session either hangs +or experiences an endless sequence of error messages. + + Kernel panic - not syncing: Unrecoverable error in exception handler + +Reset code jumps to the CPU restart address, but Linux can not recover +from there because code and data in the kernel init sections have been +discarded and overwritten at this point. + +XTFPGA platforms have a means to reset the CPU by writing 0xdead into a +specific FPGA IO address. When used in QEMU the kernel image loaded with +the '-kernel' option gets restored to its original state allowing the +machine to boot successfully. + +Use that mechanism to attempt a platform reset. If it does not work, +fall back to the existing mechanism. + +Signed-off-by: Guenter Roeck +Signed-off-by: Max Filippov +Signed-off-by: Sasha Levin +--- + arch/xtensa/platforms/xtfpga/setup.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c +index 61c5e2c45439..4edccb4d4a5f 100644 +--- a/arch/xtensa/platforms/xtfpga/setup.c ++++ b/arch/xtensa/platforms/xtfpga/setup.c +@@ -50,8 +50,12 @@ void platform_power_off(void) + + void platform_restart(void) + { +- /* Flush and reset the mmu, simulate a processor reset, and +- * jump to the reset vector. */ ++ /* Try software reset first. */ ++ WRITE_ONCE(*(u32 *)XTFPGA_SWRST_VADDR, 0xdead); ++ ++ /* If software reset did not work, flush and reset the mmu, ++ * simulate a processor reset, and jump to the reset vector. ++ */ + cpu_reset(); + /* control never gets here */ + } +-- +2.33.0 + diff --git a/queue-5.4/xtensa-xtfpga-use-config_use_of-instead-of-config_of.patch b/queue-5.4/xtensa-xtfpga-use-config_use_of-instead-of-config_of.patch new file mode 100644 index 00000000000..38073340307 --- /dev/null +++ b/queue-5.4/xtensa-xtfpga-use-config_use_of-instead-of-config_of.patch @@ -0,0 +1,41 @@ +From 39139e7f23edeff38694b7a75217c70436b64a77 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 Oct 2021 11:36:01 -0700 +Subject: xtensa: xtfpga: use CONFIG_USE_OF instead of CONFIG_OF + +From: Max Filippov + +[ Upstream commit f3d7c2cdf6dc0d5402ec29c3673893b3542c5ad1 ] + +Use platform data to initialize xtfpga device drivers when CONFIG_USE_OF +is not selected. This fixes xtfpga networking when CONFIG_USE_OF is not +selected but CONFIG_OF is. + +Signed-off-by: Max Filippov +Signed-off-by: Sasha Levin +--- + arch/xtensa/platforms/xtfpga/setup.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c +index 829115bb381f..61c5e2c45439 100644 +--- a/arch/xtensa/platforms/xtfpga/setup.c ++++ b/arch/xtensa/platforms/xtfpga/setup.c +@@ -81,7 +81,7 @@ void __init platform_calibrate_ccount(void) + + #endif + +-#ifdef CONFIG_OF ++#ifdef CONFIG_USE_OF + + static void __init xtfpga_clk_setup(struct device_node *np) + { +@@ -299,4 +299,4 @@ static int __init xtavnet_init(void) + */ + arch_initcall(xtavnet_init); + +-#endif /* CONFIG_OF */ ++#endif /* CONFIG_USE_OF */ +-- +2.33.0 +