Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- tools/perf/util/machine.c | 17 +++++++++++++++--
- tools/perf/util/thread.c | 4 ++++
- tools/perf/util/thread.h | 1 +
+ tools/perf/util/machine.c | 17 +++++++++++++++--
+ tools/perf/util/thread.c | 4 ++++
+ tools/perf/util/thread.h | 1 +
3 files changed, 20 insertions(+), 2 deletions(-)
-diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
-index 8477edefc2997..706be5e4a0761 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
-@@ -2270,8 +2270,12 @@ static void save_lbr_cursor_node(struct thread *thread,
+@@ -2270,8 +2270,12 @@ static void save_lbr_cursor_node(struct
cursor->curr = cursor->first;
else
cursor->curr = cursor->curr->next;
lbr_stitch->prev_lbr_cursor[idx].valid = true;
cursor->pos++;
-@@ -2482,6 +2486,9 @@ static bool has_stitched_lbr(struct thread *thread,
+@@ -2482,6 +2486,9 @@ static bool has_stitched_lbr(struct thre
memcpy(&stitch_node->cursor, &lbr_stitch->prev_lbr_cursor[i],
sizeof(struct callchain_cursor_node));
if (callee)
list_add(&stitch_node->node, &lbr_stitch->lists);
else
-@@ -2505,6 +2512,8 @@ static bool alloc_lbr_stitch(struct thread *thread, unsigned int max_lbr)
+@@ -2505,6 +2512,8 @@ static bool alloc_lbr_stitch(struct thre
if (!thread__lbr_stitch(thread)->prev_lbr_cursor)
goto free_lbr_stitch;
INIT_LIST_HEAD(&thread__lbr_stitch(thread)->lists);
INIT_LIST_HEAD(&thread__lbr_stitch(thread)->free_lists);
-@@ -2560,8 +2569,12 @@ static int resolve_lbr_callchain_sample(struct thread *thread,
+@@ -2560,8 +2569,12 @@ static int resolve_lbr_callchain_sample(
max_lbr, callee);
if (!stitched_lbr && !list_empty(&lbr_stitch->lists)) {
}
memcpy(&lbr_stitch->prev_sample, sample, sizeof(*sample));
}
-diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
-index 87c59aa9fe38b..0ffdd52d86d70 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
-@@ -476,6 +476,7 @@ void thread__free_stitch_list(struct thread *thread)
+@@ -476,6 +476,7 @@ void thread__free_stitch_list(struct thr
return;
list_for_each_entry_safe(pos, tmp, &lbr_stitch->lists, node) {
list_del_init(&pos->node);
free(pos);
}
-@@ -485,6 +486,9 @@ void thread__free_stitch_list(struct thread *thread)
+@@ -485,6 +486,9 @@ void thread__free_stitch_list(struct thr
free(pos);
}
zfree(&lbr_stitch->prev_lbr_cursor);
free(thread__lbr_stitch(thread));
thread__set_lbr_stitch(thread, NULL);
-diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
-index 8b4a3c69bad19..6cbf6eb2812e0 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -26,6 +26,7 @@ struct lbr_stitch {
};
DECLARE_RC_STRUCT(thread) {
---
-2.43.0
-
--- /dev/null
+From 162d9b5d2308c7e48efbc97d36babbf4d73b2c61 Mon Sep 17 00:00:00 2001
+From: Alexander Dahl <ada@thorsis.com>
+Date: Thu, 26 Sep 2024 11:03:56 +0200
+Subject: spi: atmel-quadspi: Fix wrong register value written to MR
+
+From: Alexander Dahl <ada@thorsis.com>
+
+commit 162d9b5d2308c7e48efbc97d36babbf4d73b2c61 upstream.
+
+aq->mr should go to MR, nothing else.
+
+Fixes: 329ca3eed4a9 ("spi: atmel-quadspi: Avoid overwriting delay register settings")
+Signed-off-by: Alexander Dahl <ada@thorsis.com>
+Link: https://lore.kernel.org/linux-spi/20240926-macarena-wincing-7c4995487a29@thorsis.com/T/#u
+Link: https://patch.msgid.link/20240926090356.105789-1-ada@thorsis.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/spi/atmel-quadspi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/spi/atmel-quadspi.c
++++ b/drivers/spi/atmel-quadspi.c
+@@ -377,7 +377,7 @@ static int atmel_qspi_set_cfg(struct atm
+ */
+ if (!(aq->mr & QSPI_MR_SMM)) {
+ aq->mr |= QSPI_MR_SMM;
+- atmel_qspi_write(aq->scr, aq, QSPI_MR);
++ atmel_qspi_write(aq->mr, aq, QSPI_MR);
+ }
+
+ /* Clear pending interrupts */