]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.10
authorSasha Levin <sashal@kernel.org>
Sat, 14 Oct 2023 16:41:21 +0000 (12:41 -0400)
committerSasha Levin <sashal@kernel.org>
Sat, 14 Oct 2023 16:41:21 +0000 (12:41 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.10/perf-inject-fix-gen_elf_text_offset-for-jit.patch [new file with mode: 0644]
queue-5.10/revert-spi-spi-zynqmp-gqspi-fix-runtime-pm-imbalance.patch [new file with mode: 0644]
queue-5.10/revert-spi-zynqmp-gqspi-fix-clock-imbalance-on-probe.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/perf-inject-fix-gen_elf_text_offset-for-jit.patch b/queue-5.10/perf-inject-fix-gen_elf_text_offset-for-jit.patch
new file mode 100644 (file)
index 0000000..ef3dcdf
--- /dev/null
@@ -0,0 +1,52 @@
+From 828b08b76bee95e3aff9b5fdd3931854331aaaba Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 14 Oct 2022 20:09:04 +0300
+Subject: perf inject: Fix GEN_ELF_TEXT_OFFSET for jit
+
+From: Adrian Hunter <adrian.hunter@intel.com>
+
+[ Upstream commit 89b15d00527b7825ff19130ed83478e80e3fae99 ]
+
+When a program header was added, it moved the text section but
+GEN_ELF_TEXT_OFFSET was not updated.
+
+Fix by adding the program header size and aligning.
+
+Fixes: babd04386b1df8c3 ("perf jit: Include program header in ELF files")
+Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
+Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Cc: Ian Rogers <irogers@google.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Lieven Hey <lieven.hey@kdab.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Link: https://lore.kernel.org/r/20221014170905.64069-7-adrian.hunter@intel.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/perf/util/genelf.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h
+index ac638945b4cb0..159c69bcc33e6 100644
+--- a/tools/perf/util/genelf.h
++++ b/tools/perf/util/genelf.h
+@@ -2,6 +2,8 @@
+ #ifndef __GENELF_H__
+ #define __GENELF_H__
++#include <linux/math.h>
++
+ /* genelf.c */
+ int jit_write_elf(int fd, uint64_t code_addr, const char *sym,
+                 const void *code, int csize, void *debug, int nr_debug_entries,
+@@ -73,6 +75,6 @@ int jit_add_debug_info(Elf *e, uint64_t code_addr, void *debug, int nr_debug_ent
+ #endif
+ /* The .text section is directly after the ELF header */
+-#define GEN_ELF_TEXT_OFFSET sizeof(Elf_Ehdr)
++#define GEN_ELF_TEXT_OFFSET round_up(sizeof(Elf_Ehdr) + sizeof(Elf_Phdr), 16)
+ #endif
+-- 
+2.40.1
+
diff --git a/queue-5.10/revert-spi-spi-zynqmp-gqspi-fix-runtime-pm-imbalance.patch b/queue-5.10/revert-spi-spi-zynqmp-gqspi-fix-runtime-pm-imbalance.patch
new file mode 100644 (file)
index 0000000..8f11397
--- /dev/null
@@ -0,0 +1,63 @@
+From 3d27c6ceb9ae740ab97b38f64ae84da2719ed115 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 14 Oct 2023 12:40:41 -0400
+Subject: Revert "spi: spi-zynqmp-gqspi: Fix runtime PM imbalance in
+ zynqmp_qspi_probe"
+
+This reverts commit 2cdec9c13f81313dd9f41f09c7cdecbfa4bea91d.
+
+Reported issues with the backport, revert for now.
+
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/spi/spi-zynqmp-gqspi.c | 14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
+index ed68e237314fb..3d3ac48243ebd 100644
+--- a/drivers/spi/spi-zynqmp-gqspi.c
++++ b/drivers/spi/spi-zynqmp-gqspi.c
+@@ -1147,16 +1147,11 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
+       pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
+       pm_runtime_set_active(&pdev->dev);
+       pm_runtime_enable(&pdev->dev);
+-
+-      ret = pm_runtime_get_sync(&pdev->dev);
+-      if (ret < 0) {
+-              dev_err(&pdev->dev, "Failed to pm_runtime_get_sync: %d\n", ret);
+-              goto clk_dis_all;
+-      }
+-
+       /* QSPI controller initializations */
+       zynqmp_qspi_init_hw(xqspi);
++      pm_runtime_mark_last_busy(&pdev->dev);
++      pm_runtime_put_autosuspend(&pdev->dev);
+       xqspi->irq = platform_get_irq(pdev, 0);
+       if (xqspi->irq <= 0) {
+               ret = -ENXIO;
+@@ -1183,7 +1178,6 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
+       ctlr->mode_bits = SPI_CPOL | SPI_CPHA | SPI_RX_DUAL | SPI_RX_QUAD |
+                           SPI_TX_DUAL | SPI_TX_QUAD;
+       ctlr->dev.of_node = np;
+-      ctlr->auto_runtime_pm = true;
+       ret = devm_spi_register_controller(&pdev->dev, ctlr);
+       if (ret) {
+@@ -1191,13 +1185,9 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
+               goto clk_dis_all;
+       }
+-      pm_runtime_mark_last_busy(&pdev->dev);
+-      pm_runtime_put_autosuspend(&pdev->dev);
+-
+       return 0;
+ clk_dis_all:
+-      pm_runtime_put_sync(&pdev->dev);
+       pm_runtime_set_suspended(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
+       clk_disable_unprepare(xqspi->refclk);
+-- 
+2.40.1
+
diff --git a/queue-5.10/revert-spi-zynqmp-gqspi-fix-clock-imbalance-on-probe.patch b/queue-5.10/revert-spi-zynqmp-gqspi-fix-clock-imbalance-on-probe.patch
new file mode 100644 (file)
index 0000000..0b44ab3
--- /dev/null
@@ -0,0 +1,51 @@
+From ff30b340956bdd526b116b60b066473ad8e27bd4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 14 Oct 2023 12:40:26 -0400
+Subject: Revert "spi: zynqmp-gqspi: fix clock imbalance on probe failure"
+
+This reverts commit 19f3d5d13b756b913be582a9e0d0afdeca9c397e.
+
+Reported issues with backport, revert for now.
+
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/spi/spi-zynqmp-gqspi.c | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
+index 12d9c5d6b9e26..ed68e237314fb 100644
+--- a/drivers/spi/spi-zynqmp-gqspi.c
++++ b/drivers/spi/spi-zynqmp-gqspi.c
+@@ -1197,9 +1197,9 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
+       return 0;
+ clk_dis_all:
+-      pm_runtime_disable(&pdev->dev);
+-      pm_runtime_put_noidle(&pdev->dev);
++      pm_runtime_put_sync(&pdev->dev);
+       pm_runtime_set_suspended(&pdev->dev);
++      pm_runtime_disable(&pdev->dev);
+       clk_disable_unprepare(xqspi->refclk);
+ clk_dis_pclk:
+       clk_disable_unprepare(xqspi->pclk);
+@@ -1223,15 +1223,11 @@ static int zynqmp_qspi_remove(struct platform_device *pdev)
+ {
+       struct zynqmp_qspi *xqspi = platform_get_drvdata(pdev);
+-      pm_runtime_get_sync(&pdev->dev);
+-
+       zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, 0x0);
+-
+-      pm_runtime_disable(&pdev->dev);
+-      pm_runtime_put_noidle(&pdev->dev);
+-      pm_runtime_set_suspended(&pdev->dev);
+       clk_disable_unprepare(xqspi->refclk);
+       clk_disable_unprepare(xqspi->pclk);
++      pm_runtime_set_suspended(&pdev->dev);
++      pm_runtime_disable(&pdev->dev);
+       return 0;
+ }
+-- 
+2.40.1
+
index 077e3a5cacafa21b60e81bb2511beb38aba719ce..a6bac10f3b05bc9c71c4ffa48737e73717773ccc 100644 (file)
@@ -26,3 +26,6 @@ ethtool-fix-mod-state-of-verbose-no_mask-bitset.patch
 pinctrl-renesas-rzn1-enable-missing-pinmux.patch
 nfc-nci-assert-requested-protocol-is-valid.patch
 workqueue-override-implicit-ordered-attribute-in-wor.patch
+perf-inject-fix-gen_elf_text_offset-for-jit.patch
+revert-spi-zynqmp-gqspi-fix-clock-imbalance-on-probe.patch
+revert-spi-spi-zynqmp-gqspi-fix-runtime-pm-imbalance.patch