]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jun 2024 11:20:07 +0000 (13:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jun 2024 11:20:07 +0000 (13:20 +0200)
added patches:
remoteproc-k3-r5-jump-to-error-handling-labels-in-start-stop-errors.patch

queue-6.9/remoteproc-k3-r5-jump-to-error-handling-labels-in-start-stop-errors.patch [new file with mode: 0644]
queue-6.9/series

diff --git a/queue-6.9/remoteproc-k3-r5-jump-to-error-handling-labels-in-start-stop-errors.patch b/queue-6.9/remoteproc-k3-r5-jump-to-error-handling-labels-in-start-stop-errors.patch
new file mode 100644 (file)
index 0000000..8f7b22f
--- /dev/null
@@ -0,0 +1,47 @@
+From 1dc7242f6ee0c99852cb90676d7fe201cf5de422 Mon Sep 17 00:00:00 2001
+From: Beleswar Padhi <b-padhi@ti.com>
+Date: Mon, 6 May 2024 19:48:49 +0530
+Subject: remoteproc: k3-r5: Jump to error handling labels in start/stop errors
+
+From: Beleswar Padhi <b-padhi@ti.com>
+
+commit 1dc7242f6ee0c99852cb90676d7fe201cf5de422 upstream.
+
+In case of errors during core start operation from sysfs, the driver
+directly returns with the -EPERM error code. Fix this to ensure that
+mailbox channels are freed on error before returning by jumping to the
+'put_mbox' error handling label. Similarly, jump to the 'out' error
+handling label to return with required -EPERM error code during the
+core stop operation from sysfs.
+
+Fixes: 3c8a9066d584 ("remoteproc: k3-r5: Do not allow core1 to power up before core0 via sysfs")
+Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
+Link: https://lore.kernel.org/r/20240506141849.1735679-1-b-padhi@ti.com
+Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/remoteproc/ti_k3_r5_remoteproc.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/remoteproc/ti_k3_r5_remoteproc.c
++++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c
+@@ -580,7 +580,8 @@ static int k3_r5_rproc_start(struct rpro
+               if (core != core0 && core0->rproc->state == RPROC_OFFLINE) {
+                       dev_err(dev, "%s: can not start core 1 before core 0\n",
+                               __func__);
+-                      return -EPERM;
++                      ret = -EPERM;
++                      goto put_mbox;
+               }
+               ret = k3_r5_core_run(core);
+@@ -648,7 +649,8 @@ static int k3_r5_rproc_stop(struct rproc
+               if (core != core1 && core1->rproc->state != RPROC_OFFLINE) {
+                       dev_err(dev, "%s: can not stop core 0 before core 1\n",
+                               __func__);
+-                      return -EPERM;
++                      ret = -EPERM;
++                      goto out;
+               }
+               ret = k3_r5_core_halt(core);
index 683ce0d408d5bab7f9407976f7335ed1c92be4e2..d2d8a0b533db3455d5924721a1306eea7ffa9f45 100644 (file)
@@ -268,3 +268,4 @@ btrfs-zoned-fix-use-after-free-due-to-race-with-dev-replace.patch
 wifi-iwlwifi-mvm-support-iwl_dev_tx_power_cmd_v8.patch
 wifi-iwlwifi-mvm-fix-a-crash-on-7265.patch
 mm-huge_memory-don-t-unpoison-huge_zero_folio.patch
+remoteproc-k3-r5-jump-to-error-handling-labels-in-start-stop-errors.patch