]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2024 06:09:02 +0000 (07:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2024 06:09:02 +0000 (07:09 +0100)
added patches:
arm64-dts-imx8ulp-correct-the-flexspi-compatible-string.patch
io_uring-always-lock-__io_cqring_overflow_flush.patch

queue-6.6/arm64-dts-imx8ulp-correct-the-flexspi-compatible-string.patch [new file with mode: 0644]
queue-6.6/io_uring-always-lock-__io_cqring_overflow_flush.patch [new file with mode: 0644]
queue-6.6/series

diff --git a/queue-6.6/arm64-dts-imx8ulp-correct-the-flexspi-compatible-string.patch b/queue-6.6/arm64-dts-imx8ulp-correct-the-flexspi-compatible-string.patch
new file mode 100644 (file)
index 0000000..d2e6af1
--- /dev/null
@@ -0,0 +1,92 @@
+From 409dc5196d5b6eb67468a06bf4d2d07d7225a67b Mon Sep 17 00:00:00 2001
+From: Haibo Chen <haibo.chen@nxp.com>
+Date: Thu, 5 Sep 2024 17:43:38 +0800
+Subject: arm64: dts: imx8ulp: correct the flexspi compatible string
+
+From: Haibo Chen <haibo.chen@nxp.com>
+
+commit 409dc5196d5b6eb67468a06bf4d2d07d7225a67b upstream.
+
+The flexspi on imx8ulp only has 16 LUTs, and imx8mm flexspi has
+32 LUTs, so correct the compatible string here, otherwise will
+meet below error:
+
+[    1.119072] ------------[ cut here ]------------
+[    1.123926] WARNING: CPU: 0 PID: 1 at drivers/spi/spi-nxp-fspi.c:855 nxp_fspi_exec_op+0xb04/0xb64
+[    1.133239] Modules linked in:
+[    1.136448] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.11.0-rc6-next-20240902-00001-g131bf9439dd9 #69
+[    1.146821] Hardware name: NXP i.MX8ULP EVK (DT)
+[    1.151647] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
+[    1.158931] pc : nxp_fspi_exec_op+0xb04/0xb64
+[    1.163496] lr : nxp_fspi_exec_op+0xa34/0xb64
+[    1.168060] sp : ffff80008002b2a0
+[    1.171526] x29: ffff80008002b2d0 x28: 0000000000000000 x27: 0000000000000000
+[    1.179002] x26: ffff2eb645542580 x25: ffff800080610014 x24: ffff800080610000
+[    1.186480] x23: ffff2eb645548080 x22: 0000000000000006 x21: ffff2eb6455425e0
+[    1.193956] x20: 0000000000000000 x19: ffff80008002b5e0 x18: ffffffffffffffff
+[    1.201432] x17: ffff2eb644467508 x16: 0000000000000138 x15: 0000000000000002
+[    1.208907] x14: 0000000000000000 x13: ffff2eb6400d8080 x12: 00000000ffffff00
+[    1.216378] x11: 0000000000000000 x10: ffff2eb6400d8080 x9 : ffff2eb697adca80
+[    1.223850] x8 : ffff2eb697ad3cc0 x7 : 0000000100000000 x6 : 0000000000000001
+[    1.231324] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 00000000000007a6
+[    1.238795] x2 : 0000000000000000 x1 : 00000000000001ce x0 : 00000000ffffff92
+[    1.246267] Call trace:
+[    1.248824]  nxp_fspi_exec_op+0xb04/0xb64
+[    1.253031]  spi_mem_exec_op+0x3a0/0x430
+[    1.257139]  spi_nor_read_id+0x80/0xcc
+[    1.261065]  spi_nor_scan+0x1ec/0xf10
+[    1.264901]  spi_nor_probe+0x108/0x2fc
+[    1.268828]  spi_mem_probe+0x6c/0xbc
+[    1.272574]  spi_probe+0x84/0xe4
+[    1.275958]  really_probe+0xbc/0x29c
+[    1.279713]  __driver_probe_device+0x78/0x12c
+[    1.284277]  driver_probe_device+0xd8/0x15c
+[    1.288660]  __device_attach_driver+0xb8/0x134
+[    1.293316]  bus_for_each_drv+0x88/0xe8
+[    1.297337]  __device_attach+0xa0/0x190
+[    1.301353]  device_initial_probe+0x14/0x20
+[    1.305734]  bus_probe_device+0xac/0xb0
+[    1.309752]  device_add+0x5d0/0x790
+[    1.313408]  __spi_add_device+0x134/0x204
+[    1.317606]  of_register_spi_device+0x3b4/0x590
+[    1.322348]  spi_register_controller+0x47c/0x754
+[    1.327181]  devm_spi_register_controller+0x4c/0xa4
+[    1.332289]  nxp_fspi_probe+0x1cc/0x2b0
+[    1.336307]  platform_probe+0x68/0xc4
+[    1.340145]  really_probe+0xbc/0x29c
+[    1.343893]  __driver_probe_device+0x78/0x12c
+[    1.348457]  driver_probe_device+0xd8/0x15c
+[    1.352838]  __driver_attach+0x90/0x19c
+[    1.356857]  bus_for_each_dev+0x7c/0xdc
+[    1.360877]  driver_attach+0x24/0x30
+[    1.364624]  bus_add_driver+0xe4/0x208
+[    1.368552]  driver_register+0x5c/0x124
+[    1.372573]  __platform_driver_register+0x28/0x34
+[    1.377497]  nxp_fspi_driver_init+0x1c/0x28
+[    1.381888]  do_one_initcall+0x80/0x1c8
+[    1.385908]  kernel_init_freeable+0x1c4/0x28c
+[    1.390472]  kernel_init+0x20/0x1d8
+[    1.394138]  ret_from_fork+0x10/0x20
+[    1.397885] ---[ end trace 0000000000000000 ]---
+[    1.407908] ------------[ cut here ]------------
+
+Fixes: ef89fd56bdfc ("arm64: dts: imx8ulp: add flexspi node")
+Cc: stable@kernel.org
+Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
+Signed-off-by: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/freescale/imx8ulp.dtsi |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
++++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
+@@ -352,7 +352,7 @@
+                       };
+                       flexspi2: spi@29810000 {
+-                              compatible = "nxp,imx8mm-fspi";
++                              compatible = "nxp,imx8ulp-fspi";
+                               reg = <0x29810000 0x10000>, <0x60000000 0x10000000>;
+                               reg-names = "fspi_base", "fspi_mmap";
+                               #address-cells = <1>;
diff --git a/queue-6.6/io_uring-always-lock-__io_cqring_overflow_flush.patch b/queue-6.6/io_uring-always-lock-__io_cqring_overflow_flush.patch
new file mode 100644 (file)
index 0000000..54aaf53
--- /dev/null
@@ -0,0 +1,66 @@
+From 8d09a88ef9d3cb7d21d45c39b7b7c31298d23998 Mon Sep 17 00:00:00 2001
+From: Pavel Begunkov <asml.silence@gmail.com>
+Date: Wed, 10 Apr 2024 02:26:54 +0100
+Subject: io_uring: always lock __io_cqring_overflow_flush
+
+From: Pavel Begunkov <asml.silence@gmail.com>
+
+commit 8d09a88ef9d3cb7d21d45c39b7b7c31298d23998 upstream.
+
+Conditional locking is never great, in case of
+__io_cqring_overflow_flush(), which is a slow path, it's not justified.
+Don't handle IOPOLL separately, always grab uring_lock for overflow
+flushing.
+
+Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
+Link: https://lore.kernel.org/r/162947df299aa12693ac4b305dacedab32ec7976.1712708261.git.asml.silence@gmail.com
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ io_uring/io_uring.c |   13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/io_uring/io_uring.c
++++ b/io_uring/io_uring.c
+@@ -667,6 +667,8 @@ static void io_cqring_overflow_kill(stru
+       struct io_overflow_cqe *ocqe;
+       LIST_HEAD(list);
++      lockdep_assert_held(&ctx->uring_lock);
++
+       spin_lock(&ctx->completion_lock);
+       list_splice_init(&ctx->cq_overflow_list, &list);
+       clear_bit(IO_CHECK_CQ_OVERFLOW_BIT, &ctx->check_cq);
+@@ -683,6 +685,8 @@ static void __io_cqring_overflow_flush(s
+ {
+       size_t cqe_size = sizeof(struct io_uring_cqe);
++      lockdep_assert_held(&ctx->uring_lock);
++
+       if (__io_cqring_events(ctx) == ctx->cq_entries)
+               return;
+@@ -727,12 +731,9 @@ static void __io_cqring_overflow_flush(s
+ static void io_cqring_do_overflow_flush(struct io_ring_ctx *ctx)
+ {
+-      /* iopoll syncs against uring_lock, not completion_lock */
+-      if (ctx->flags & IORING_SETUP_IOPOLL)
+-              mutex_lock(&ctx->uring_lock);
++      mutex_lock(&ctx->uring_lock);
+       __io_cqring_overflow_flush(ctx);
+-      if (ctx->flags & IORING_SETUP_IOPOLL)
+-              mutex_unlock(&ctx->uring_lock);
++      mutex_unlock(&ctx->uring_lock);
+ }
+ static void io_cqring_overflow_flush(struct io_ring_ctx *ctx)
+@@ -1611,6 +1612,8 @@ static int io_iopoll_check(struct io_rin
+       unsigned int nr_events = 0;
+       unsigned long check_cq;
++      lockdep_assert_held(&ctx->uring_lock);
++
+       if (!io_allowed_run_tw(ctx))
+               return -EEXIST;
index bd27ca27e96573afe8ebd38aaa134b8b90789564..cfdf7aa1fabb5db43fd72d6e7e5f1bc3d6674e3e 100644 (file)
@@ -135,3 +135,5 @@ nvmet-auth-assign-dh_key-to-null-after-kfree_sensiti.patch
 kasan-remove-vmalloc_percpu-test.patch
 io_uring-rw-fix-missing-nowait-check-for-o_direct-st.patch
 vmscan-migrate-fix-page-count-imbalance-on-node-stat.patch
+arm64-dts-imx8ulp-correct-the-flexspi-compatible-string.patch
+io_uring-always-lock-__io_cqring_overflow_flush.patch