From: Greg Kroah-Hartman Date: Wed, 22 Nov 2023 19:46:01 +0000 (+0000) Subject: 5.10-stable patches X-Git-Tag: v4.14.331~114 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68e450086a93249a8827ea909ba699fe28f428fa;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: arm64-restrict-cpu_big_endian-to-gnu-as-or-llvm-ias-15.x-or-newer.patch clk-qcom-ipq6018-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch clk-qcom-ipq8074-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch mmc-sdhci_am654-fix-start-loop-index-for-tap-value-parsing.patch mmc-vub300-fix-an-error-code.patch parisc-pdc-add-width-field-to-struct-pdc_model.patch parisc-power-add-power-soft-off-when-running-on-qemu.patch --- diff --git a/queue-5.10/arm64-restrict-cpu_big_endian-to-gnu-as-or-llvm-ias-15.x-or-newer.patch b/queue-5.10/arm64-restrict-cpu_big_endian-to-gnu-as-or-llvm-ias-15.x-or-newer.patch new file mode 100644 index 00000000000..25840e6cf2e --- /dev/null +++ b/queue-5.10/arm64-restrict-cpu_big_endian-to-gnu-as-or-llvm-ias-15.x-or-newer.patch @@ -0,0 +1,89 @@ +From 146a15b873353f8ac28dc281c139ff611a3c4848 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Wed, 25 Oct 2023 10:21:28 -0700 +Subject: arm64: Restrict CPU_BIG_ENDIAN to GNU as or LLVM IAS 15.x or newer + +From: Nathan Chancellor + +commit 146a15b873353f8ac28dc281c139ff611a3c4848 upstream. + +Prior to LLVM 15.0.0, LLVM's integrated assembler would incorrectly +byte-swap NOP when compiling for big-endian, and the resulting series of +bytes happened to match the encoding of FNMADD S21, S30, S0, S0. + +This went unnoticed until commit: + + 34f66c4c4d5518c1 ("arm64: Use a positive cpucap for FP/SIMD") + +Prior to that commit, the kernel would always enable the use of FPSIMD +early in boot when __cpu_setup() initialized CPACR_EL1, and so usage of +FNMADD within the kernel was not detected, but could result in the +corruption of user or kernel FPSIMD state. + +After that commit, the instructions happen to trap during boot prior to +FPSIMD being detected and enabled, e.g. + +| Unhandled 64-bit el1h sync exception on CPU0, ESR 0x000000001fe00000 -- ASIMD +| CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.0-rc3-00013-g34f66c4c4d55 #1 +| Hardware name: linux,dummy-virt (DT) +| pstate: 400000c9 (nZcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) +| pc : __pi_strcmp+0x1c/0x150 +| lr : populate_properties+0xe4/0x254 +| sp : ffffd014173d3ad0 +| x29: ffffd014173d3af0 x28: fffffbfffddffcb8 x27: 0000000000000000 +| x26: 0000000000000058 x25: fffffbfffddfe054 x24: 0000000000000008 +| x23: fffffbfffddfe000 x22: fffffbfffddfe000 x21: fffffbfffddfe044 +| x20: ffffd014173d3b70 x19: 0000000000000001 x18: 0000000000000005 +| x17: 0000000000000010 x16: 0000000000000000 x15: 00000000413e7000 +| x14: 0000000000000000 x13: 0000000000001bcc x12: 0000000000000000 +| x11: 00000000d00dfeed x10: ffffd414193f2cd0 x9 : 0000000000000000 +| x8 : 0101010101010101 x7 : ffffffffffffffc0 x6 : 0000000000000000 +| x5 : 0000000000000000 x4 : 0101010101010101 x3 : 000000000000002a +| x2 : 0000000000000001 x1 : ffffd014171f2988 x0 : fffffbfffddffcb8 +| Kernel panic - not syncing: Unhandled exception +| CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.0-rc3-00013-g34f66c4c4d55 #1 +| Hardware name: linux,dummy-virt (DT) +| Call trace: +| dump_backtrace+0xec/0x108 +| show_stack+0x18/0x2c +| dump_stack_lvl+0x50/0x68 +| dump_stack+0x18/0x24 +| panic+0x13c/0x340 +| el1t_64_irq_handler+0x0/0x1c +| el1_abort+0x0/0x5c +| el1h_64_sync+0x64/0x68 +| __pi_strcmp+0x1c/0x150 +| unflatten_dt_nodes+0x1e8/0x2d8 +| __unflatten_device_tree+0x5c/0x15c +| unflatten_device_tree+0x38/0x50 +| setup_arch+0x164/0x1e0 +| start_kernel+0x64/0x38c +| __primary_switched+0xbc/0xc4 + +Restrict CONFIG_CPU_BIG_ENDIAN to a known good assembler, which is +either GNU as or LLVM's IAS 15.0.0 and newer, which contains the linked +commit. + +Closes: https://github.com/ClangBuiltLinux/linux/issues/1948 +Link: https://github.com/llvm/llvm-project/commit/1379b150991f70a5782e9a143c2ba5308da1161c +Signed-off-by: Nathan Chancellor +Cc: stable@vger.kernel.org +Acked-by: Mark Rutland +Link: https://lore.kernel.org/r/20231025-disable-arm64-be-ias-b4-llvm-15-v1-1-b25263ed8b23@kernel.org +Signed-off-by: Catalin Marinas +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/Kconfig | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm64/Kconfig ++++ b/arch/arm64/Kconfig +@@ -986,6 +986,8 @@ choice + config CPU_BIG_ENDIAN + bool "Build big-endian kernel" + depends on !LD_IS_LLD || LLD_VERSION >= 130000 ++ # https://github.com/llvm/llvm-project/commit/1379b150991f70a5782e9a143c2ba5308da1161c ++ depends on AS_IS_GNU || AS_VERSION >= 150000 + help + Say Y if you plan on running a kernel with a big-endian userspace. + diff --git a/queue-5.10/clk-qcom-ipq6018-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch b/queue-5.10/clk-qcom-ipq6018-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch new file mode 100644 index 00000000000..9aa444f1e1e --- /dev/null +++ b/queue-5.10/clk-qcom-ipq6018-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch @@ -0,0 +1,75 @@ +From 99cd4935cb972d0aafb16838bb2aeadbcaf196ce Mon Sep 17 00:00:00 2001 +From: Kathiravan Thirumoorthy +Date: Thu, 14 Sep 2023 12:29:52 +0530 +Subject: clk: qcom: ipq6018: drop the CLK_SET_RATE_PARENT flag from PLL clocks + +From: Kathiravan Thirumoorthy + +commit 99cd4935cb972d0aafb16838bb2aeadbcaf196ce upstream. + +GPLL, NSS crypto PLL clock rates are fixed and shouldn't be scaled based +on the request from dependent clocks. Doing so will result in the +unexpected behaviour. So drop the CLK_SET_RATE_PARENT flag from the PLL +clocks. + +Cc: stable@vger.kernel.org +Fixes: d9db07f088af ("clk: qcom: Add ipq6018 Global Clock Controller support") +Signed-off-by: Kathiravan Thirumoorthy +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20230913-gpll_cleanup-v2-2-c8ceb1a37680@quicinc.com +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/clk/qcom/gcc-ipq6018.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/drivers/clk/qcom/gcc-ipq6018.c ++++ b/drivers/clk/qcom/gcc-ipq6018.c +@@ -75,7 +75,6 @@ static struct clk_fixed_factor gpll0_out + &gpll0_main.clkr.hw }, + .num_parents = 1, + .ops = &clk_fixed_factor_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -89,7 +88,6 @@ static struct clk_alpha_pll_postdiv gpll + &gpll0_main.clkr.hw }, + .num_parents = 1, + .ops = &clk_alpha_pll_postdiv_ro_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -164,7 +162,6 @@ static struct clk_alpha_pll_postdiv gpll + &gpll6_main.clkr.hw }, + .num_parents = 1, + .ops = &clk_alpha_pll_postdiv_ro_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -195,7 +192,6 @@ static struct clk_alpha_pll_postdiv gpll + &gpll4_main.clkr.hw }, + .num_parents = 1, + .ops = &clk_alpha_pll_postdiv_ro_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -246,7 +242,6 @@ static struct clk_alpha_pll_postdiv gpll + &gpll2_main.clkr.hw }, + .num_parents = 1, + .ops = &clk_alpha_pll_postdiv_ro_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -277,7 +272,6 @@ static struct clk_alpha_pll_postdiv nss_ + &nss_crypto_pll_main.clkr.hw }, + .num_parents = 1, + .ops = &clk_alpha_pll_postdiv_ro_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + diff --git a/queue-5.10/clk-qcom-ipq8074-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch b/queue-5.10/clk-qcom-ipq8074-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch new file mode 100644 index 00000000000..f05ebc1f496 --- /dev/null +++ b/queue-5.10/clk-qcom-ipq8074-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch @@ -0,0 +1,77 @@ +From e641a070137dd959932c7c222e000d9d941167a2 Mon Sep 17 00:00:00 2001 +From: Kathiravan Thirumoorthy +Date: Thu, 14 Sep 2023 12:29:51 +0530 +Subject: clk: qcom: ipq8074: drop the CLK_SET_RATE_PARENT flag from PLL clocks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Kathiravan Thirumoorthy + +commit e641a070137dd959932c7c222e000d9d941167a2 upstream. + +GPLL, NSS crypto PLL clock rates are fixed and shouldn't be scaled based +on the request from dependent clocks. Doing so will result in the +unexpected behaviour. So drop the CLK_SET_RATE_PARENT flag from the PLL +clocks. + +Cc: stable@vger.kernel.org +Fixes: b8e7e519625f ("clk: qcom: ipq8074: add remaining PLL’s") +Signed-off-by: Kathiravan Thirumoorthy +Link: https://lore.kernel.org/r/20230913-gpll_cleanup-v2-1-c8ceb1a37680@quicinc.com +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/clk/qcom/gcc-ipq8074.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/drivers/clk/qcom/gcc-ipq8074.c ++++ b/drivers/clk/qcom/gcc-ipq8074.c +@@ -418,7 +418,6 @@ static struct clk_fixed_factor gpll0_out + }, + .num_parents = 1, + .ops = &clk_fixed_factor_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -465,7 +464,6 @@ static struct clk_alpha_pll_postdiv gpll + }, + .num_parents = 1, + .ops = &clk_alpha_pll_postdiv_ro_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -498,7 +496,6 @@ static struct clk_alpha_pll_postdiv gpll + }, + .num_parents = 1, + .ops = &clk_alpha_pll_postdiv_ro_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -532,7 +529,6 @@ static struct clk_alpha_pll_postdiv gpll + }, + .num_parents = 1, + .ops = &clk_alpha_pll_postdiv_ro_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -546,7 +542,6 @@ static struct clk_fixed_factor gpll6_out + }, + .num_parents = 1, + .ops = &clk_fixed_factor_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + +@@ -611,7 +606,6 @@ static struct clk_alpha_pll_postdiv nss_ + }, + .num_parents = 1, + .ops = &clk_alpha_pll_postdiv_ro_ops, +- .flags = CLK_SET_RATE_PARENT, + }, + }; + diff --git a/queue-5.10/mmc-sdhci_am654-fix-start-loop-index-for-tap-value-parsing.patch b/queue-5.10/mmc-sdhci_am654-fix-start-loop-index-for-tap-value-parsing.patch new file mode 100644 index 00000000000..a15b0309f5b --- /dev/null +++ b/queue-5.10/mmc-sdhci_am654-fix-start-loop-index-for-tap-value-parsing.patch @@ -0,0 +1,35 @@ +From 71956d0cb56c1e5f9feeb4819db87a076418e930 Mon Sep 17 00:00:00 2001 +From: Nitin Yadav +Date: Thu, 26 Oct 2023 11:44:58 +0530 +Subject: mmc: sdhci_am654: fix start loop index for TAP value parsing + +From: Nitin Yadav + +commit 71956d0cb56c1e5f9feeb4819db87a076418e930 upstream. + +ti,otap-del-sel-legacy/ti,itap-del-sel-legacy passed from DT +are currently ignored for all SD/MMC and eMMC modes. Fix this +by making start loop index to MMC_TIMING_LEGACY. + +Fixes: 8ee5fc0e0b3b ("mmc: sdhci_am654: Update OTAPDLY writes") +Signed-off-by: Nitin Yadav +Acked-by: Adrian Hunter +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20231026061458.1116276-1-n-yadav@ti.com +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/sdhci_am654.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/mmc/host/sdhci_am654.c ++++ b/drivers/mmc/host/sdhci_am654.c +@@ -600,7 +600,7 @@ static int sdhci_am654_get_otap_delay(st + return 0; + } + +- for (i = MMC_TIMING_MMC_HS; i <= MMC_TIMING_MMC_HS400; i++) { ++ for (i = MMC_TIMING_LEGACY; i <= MMC_TIMING_MMC_HS400; i++) { + + ret = device_property_read_u32(dev, td[i].otap_binding, + &sdhci_am654->otap_del_sel[i]); diff --git a/queue-5.10/mmc-vub300-fix-an-error-code.patch b/queue-5.10/mmc-vub300-fix-an-error-code.patch new file mode 100644 index 00000000000..3b533e384e5 --- /dev/null +++ b/queue-5.10/mmc-vub300-fix-an-error-code.patch @@ -0,0 +1,31 @@ +From b44f9da81783fda72632ef9b0d05ea3f3ca447a5 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 2 Nov 2023 10:51:06 +0300 +Subject: mmc: vub300: fix an error code + +From: Dan Carpenter + +commit b44f9da81783fda72632ef9b0d05ea3f3ca447a5 upstream. + +This error path should return -EINVAL instead of success. + +Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver") +Signed-off-by: Dan Carpenter +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/0769d30c-ad80-421b-bf5d-7d6f5d85604e@moroto.mountain +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/vub300.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/mmc/host/vub300.c ++++ b/drivers/mmc/host/vub300.c +@@ -2311,6 +2311,7 @@ static int vub300_probe(struct usb_inter + vub300->read_only = + (0x0010 & vub300->system_port_status.port_flags) ? 1 : 0; + } else { ++ retval = -EINVAL; + goto error5; + } + usb_set_intfdata(interface, vub300); diff --git a/queue-5.10/parisc-pdc-add-width-field-to-struct-pdc_model.patch b/queue-5.10/parisc-pdc-add-width-field-to-struct-pdc_model.patch new file mode 100644 index 00000000000..f1f12324e5e --- /dev/null +++ b/queue-5.10/parisc-pdc-add-width-field-to-struct-pdc_model.patch @@ -0,0 +1,28 @@ +From 6240553b52c475d9fc9674de0521b77e692f3764 Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Sun, 22 Oct 2023 11:48:11 +0200 +Subject: parisc/pdc: Add width field to struct pdc_model + +From: Helge Deller + +commit 6240553b52c475d9fc9674de0521b77e692f3764 upstream. + +PDC2.0 specifies the additional PSW-bit field. + +Signed-off-by: Helge Deller +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/parisc/include/uapi/asm/pdc.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/parisc/include/uapi/asm/pdc.h ++++ b/arch/parisc/include/uapi/asm/pdc.h +@@ -465,6 +465,7 @@ struct pdc_model { /* for PDC_MODEL */ + unsigned long arch_rev; + unsigned long pot_key; + unsigned long curr_key; ++ unsigned long width; /* default of PSW_W bit (1=enabled) */ + }; + + struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ diff --git a/queue-5.10/parisc-power-add-power-soft-off-when-running-on-qemu.patch b/queue-5.10/parisc-power-add-power-soft-off-when-running-on-qemu.patch new file mode 100644 index 00000000000..db7d7ecb7e9 --- /dev/null +++ b/queue-5.10/parisc-power-add-power-soft-off-when-running-on-qemu.patch @@ -0,0 +1,48 @@ +From d0c219472980d15f5cbc5c8aec736848bda3f235 Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Tue, 17 Oct 2023 22:19:53 +0200 +Subject: parisc/power: Add power soft-off when running on qemu + +From: Helge Deller + +commit d0c219472980d15f5cbc5c8aec736848bda3f235 upstream. + +Signed-off-by: Helge Deller +Cc: stable@vger.kernel.org # v6.0+ +Signed-off-by: Greg Kroah-Hartman +--- + drivers/parisc/power.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +--- a/drivers/parisc/power.c ++++ b/drivers/parisc/power.c +@@ -192,6 +192,14 @@ static struct notifier_block parisc_pani + .priority = INT_MAX, + }; + ++/* qemu soft power-off function */ ++static int qemu_power_off(struct sys_off_data *data) ++{ ++ /* this turns the system off via SeaBIOS */ ++ *(int *)data->cb_data = 0; ++ pdc_soft_power_button(1); ++ return NOTIFY_DONE; ++} + + static int __init power_init(void) + { +@@ -221,7 +229,13 @@ static int __init power_init(void) + soft_power_reg); + } + +- power_task = kthread_run(kpowerswd, (void*)soft_power_reg, KTHREAD_NAME); ++ power_task = NULL; ++ if (running_on_qemu && soft_power_reg) ++ register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_DEFAULT, ++ qemu_power_off, (void *)soft_power_reg); ++ else ++ power_task = kthread_run(kpowerswd, (void*)soft_power_reg, ++ KTHREAD_NAME); + if (IS_ERR(power_task)) { + printk(KERN_ERR DRIVER_NAME ": thread creation failed. Driver not loaded.\n"); + pdc_soft_power_button(0); diff --git a/queue-5.10/series b/queue-5.10/series index d7fb0d0bf7c..79a30408e85 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -104,6 +104,13 @@ hvc-xen-fix-error-path-in-xen_hvc_init-to-always-register-frontend-driver.patch pci-sysfs-protect-driver-s-d3cold-preference-from-user-space.patch watchdog-move-softlockup_panic-back-to-early_param.patch acpi-resource-do-irq-override-on-tongfang-gmxxgxx.patch +arm64-restrict-cpu_big_endian-to-gnu-as-or-llvm-ias-15.x-or-newer.patch +parisc-pdc-add-width-field-to-struct-pdc_model.patch +parisc-power-add-power-soft-off-when-running-on-qemu.patch +clk-qcom-ipq8074-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch +clk-qcom-ipq6018-drop-the-clk_set_rate_parent-flag-from-pll-clocks.patch +mmc-vub300-fix-an-error-code.patch +mmc-sdhci_am654-fix-start-loop-index-for-tap-value-parsing.patch wifi-ath11k-fix-temperature-event-locking.patch wifi-ath11k-fix-dfs-radar-event-locking.patch wifi-ath11k-fix-htt-pktlog-locking.patch