]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Aug 2021 04:34:53 +0000 (06:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Aug 2021 04:34:53 +0000 (06:34 +0200)
added patches:
drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch
revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch
revert-spi-mediatek-fix-fifo-rx-mode.patch

queue-4.19/drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch [new file with mode: 0644]
queue-4.19/revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch [new file with mode: 0644]
queue-4.19/revert-spi-mediatek-fix-fifo-rx-mode.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch b/queue-4.19/drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch
new file mode 100644 (file)
index 0000000..b7b8e25
--- /dev/null
@@ -0,0 +1,48 @@
+From 410ed5731a6566498a3aa904420aa2e49ba0ba90 Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Tue, 16 Oct 2018 15:29:38 +0300
+Subject: drm/i915: Ensure intel_engine_init_execlist() builds with Clang
+
+From: Jani Nikula <jani.nikula@intel.com>
+
+commit 410ed5731a6566498a3aa904420aa2e49ba0ba90 upstream.
+
+Clang build with UBSAN enabled leads to the following build error:
+
+drivers/gpu/drm/i915/intel_engine_cs.o: In function `intel_engine_init_execlist':
+drivers/gpu/drm/i915/intel_engine_cs.c:411: undefined reference to `__compiletime_assert_411'
+
+Again, for this to work the code would first need to be inlined and then
+constant folded, which doesn't work for Clang because semantic analysis
+happens before optimization/inlining.
+
+Use GEM_BUG_ON() instead of BUILD_BUG_ON().
+
+v2: Use is_power_of_2() from log2.h (Chris)
+
+References: http://mid.mail-archive.com/20181015203410.155997-1-swboyd@chromium.org
+Reported-by: Stephen Boyd <swboyd@chromium.org>
+Cc: Stephen Boyd <swboyd@chromium.org>
+Cc: Chris Wilson <chris@chris-wilson.co.uk>
+Tested-by: Nathan Chancellor <natechancellor@gmail.com>
+Tested-by: Stephen Boyd <swboyd@chromium.org>
+Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20181016122938.18757-2-jani.nikula@intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/i915/intel_engine_cs.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/intel_engine_cs.c
++++ b/drivers/gpu/drm/i915/intel_engine_cs.c
+@@ -463,7 +463,7 @@ static void intel_engine_init_execlist(s
+       struct intel_engine_execlists * const execlists = &engine->execlists;
+       execlists->port_mask = 1;
+-      BUILD_BUG_ON_NOT_POWER_OF_2(execlists_num_ports(execlists));
++      GEM_BUG_ON(!is_power_of_2(execlists_num_ports(execlists)));
+       GEM_BUG_ON(execlists_num_ports(execlists) > EXECLIST_MAX_PORTS);
+       execlists->queue_priority = INT_MIN;
diff --git a/queue-4.19/revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch b/queue-4.19/revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch
new file mode 100644 (file)
index 0000000..d9403d0
--- /dev/null
@@ -0,0 +1,55 @@
+From 78eb5695f0139bf453dd43885238994aeb9c09b1 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Thu, 5 Aug 2021 20:58:57 +0200
+Subject: Revert "Bluetooth: Shutdown controller after workqueues are flushed or cancelled"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit 78b03389d2773255ceaf051f2dca134b816d96f2 which is
+commit 0ea9fd001a14ebc294f112b0361a4e601551d508 upstream.
+
+It has been reported to have problems:
+       https://lore.kernel.org/linux-bluetooth/8735ryk0o7.fsf@baylibre.com/
+
+Reported-by: Guenter Roeck <linux@roeck-us.net>
+Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Cc: Marcel Holtmann <marcel@holtmann.org>
+Cc: Sasha Levin <sashal@kernel.org>
+Link: https://lore.kernel.org/r/efee3a58-a4d2-af22-0931-e81b877ab539@roeck-us.net
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/hci_core.c |   16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/net/bluetooth/hci_core.c
++++ b/net/bluetooth/hci_core.c
+@@ -1609,6 +1609,14 @@ int hci_dev_do_close(struct hci_dev *hde
+       BT_DBG("%s %p", hdev->name, hdev);
++      if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
++          !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
++          test_bit(HCI_UP, &hdev->flags)) {
++              /* Execute vendor specific shutdown routine */
++              if (hdev->shutdown)
++                      hdev->shutdown(hdev);
++      }
++
+       cancel_delayed_work(&hdev->power_off);
+       hci_request_cancel_all(hdev);
+@@ -1682,14 +1690,6 @@ int hci_dev_do_close(struct hci_dev *hde
+               clear_bit(HCI_INIT, &hdev->flags);
+       }
+-      if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
+-          !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
+-          test_bit(HCI_UP, &hdev->flags)) {
+-              /* Execute vendor specific shutdown routine */
+-              if (hdev->shutdown)
+-                      hdev->shutdown(hdev);
+-      }
+-
+       /* flush cmd  work */
+       flush_work(&hdev->cmd_work);
diff --git a/queue-4.19/revert-spi-mediatek-fix-fifo-rx-mode.patch b/queue-4.19/revert-spi-mediatek-fix-fifo-rx-mode.patch
new file mode 100644 (file)
index 0000000..41acc07
--- /dev/null
@@ -0,0 +1,52 @@
+From 568f12594bc88a1b8f9e697c9bf6a3a5b6b6d134 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Thu, 5 Aug 2021 20:53:50 +0200
+Subject: Revert "spi: mediatek: fix fifo rx mode"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit bd0447f72de0963129612bf18202204d5b25e133 which is
+commit 3a70dd2d050331ee4cf5ad9d5c0a32d83ead9a43 upstream.
+
+It has been found to have problems.
+
+Reported-by: Guenter Roeck <linux@roeck-us.net>
+Cc: Peter Hess <peter.hess@ph-home.de>
+Cc: Frank Wunderlich <frank-w@public-files.de>
+Cc: Mark Brown <broonie@kernel.org>
+Cc: Sasha Levin <sashal@kernel.org>
+Link: https://lore.kernel.org/r/efee3a58-a4d2-af22-0931-e81b877ab539@roeck-us.net
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/spi/spi-mt65xx.c |   16 +++-------------
+ 1 file changed, 3 insertions(+), 13 deletions(-)
+
+--- a/drivers/spi/spi-mt65xx.c
++++ b/drivers/spi/spi-mt65xx.c
+@@ -392,23 +392,13 @@ static int mtk_spi_fifo_transfer(struct
+       mtk_spi_setup_packet(master);
+       cnt = xfer->len / 4;
+-      if (xfer->tx_buf)
+-              iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt);
+-
+-      if (xfer->rx_buf)
+-              ioread32_rep(mdata->base + SPI_RX_DATA_REG, xfer->rx_buf, cnt);
++      iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt);
+       remainder = xfer->len % 4;
+       if (remainder > 0) {
+               reg_val = 0;
+-              if (xfer->tx_buf) {
+-                      memcpy(&reg_val, xfer->tx_buf + (cnt * 4), remainder);
+-                      writel(reg_val, mdata->base + SPI_TX_DATA_REG);
+-              }
+-              if (xfer->rx_buf) {
+-                      reg_val = readl(mdata->base + SPI_RX_DATA_REG);
+-                      memcpy(xfer->rx_buf + (cnt * 4), &reg_val, remainder);
+-              }
++              memcpy(&reg_val, xfer->tx_buf + (cnt * 4), remainder);
++              writel(reg_val, mdata->base + SPI_TX_DATA_REG);
+       }
+       mtk_spi_enable_transfer(master);
index f9414c2673465b751e13ebb09d9b20ba55310efd..b49bc918c904038088251e55c94109fb8c35915c 100644 (file)
@@ -7,3 +7,6 @@ net-fix-zero-copy-head-len-calculation.patch
 bdi-move-bdi_dev_name-out-of-line.patch
 bdi-use-bdi_dev_name-to-get-device-name.patch
 bdi-add-a-dev_name-field-to-struct-backing_dev_info.patch
+revert-spi-mediatek-fix-fifo-rx-mode.patch
+revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch
+drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch