From fb16f6e4ef886dd949fc2c959f069de3f1e5facd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 6 Dec 2023 03:20:22 +0900 Subject: [PATCH] drop some perf patches from older kernels. --- ...ject-fix-gen_elf_text_offset-for-jit.patch | 48 ----------------- ...l-pt-adjust-sample-flags-for-vm-exit.patch | 54 ------------------- ...perf-intel-pt-fix-async-branch-flags.patch | 42 --------------- queue-4.19/series | 3 -- ...ject-fix-gen_elf_text_offset-for-jit.patch | 48 ----------------- ...l-pt-adjust-sample-flags-for-vm-exit.patch | 54 ------------------- ...perf-intel-pt-fix-async-branch-flags.patch | 42 --------------- queue-5.10/series | 3 -- ...ject-fix-gen_elf_text_offset-for-jit.patch | 48 ----------------- queue-5.15/series | 1 - ...ject-fix-gen_elf_text_offset-for-jit.patch | 48 ----------------- ...l-pt-adjust-sample-flags-for-vm-exit.patch | 54 ------------------- ...perf-intel-pt-fix-async-branch-flags.patch | 42 --------------- queue-5.4/series | 3 -- 14 files changed, 490 deletions(-) delete mode 100644 queue-4.19/perf-inject-fix-gen_elf_text_offset-for-jit.patch delete mode 100644 queue-4.19/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch delete mode 100644 queue-4.19/perf-intel-pt-fix-async-branch-flags.patch delete mode 100644 queue-5.10/perf-inject-fix-gen_elf_text_offset-for-jit.patch delete mode 100644 queue-5.10/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch delete mode 100644 queue-5.10/perf-intel-pt-fix-async-branch-flags.patch delete mode 100644 queue-5.15/perf-inject-fix-gen_elf_text_offset-for-jit.patch delete mode 100644 queue-5.4/perf-inject-fix-gen_elf_text_offset-for-jit.patch delete mode 100644 queue-5.4/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch delete mode 100644 queue-5.4/perf-intel-pt-fix-async-branch-flags.patch diff --git a/queue-4.19/perf-inject-fix-gen_elf_text_offset-for-jit.patch b/queue-4.19/perf-inject-fix-gen_elf_text_offset-for-jit.patch deleted file mode 100644 index ae648fe6e32..00000000000 --- a/queue-4.19/perf-inject-fix-gen_elf_text_offset-for-jit.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 89b15d00527b7825ff19130ed83478e80e3fae99 Mon Sep 17 00:00:00 2001 -From: Adrian Hunter -Date: Fri, 14 Oct 2022 20:09:04 +0300 -Subject: perf inject: Fix GEN_ELF_TEXT_OFFSET for jit - -From: Adrian Hunter - -commit 89b15d00527b7825ff19130ed83478e80e3fae99 upstream. - -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 -Tested-by: Arnaldo Carvalho de Melo -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Lieven Hey -Cc: Namhyung Kim -Link: https://lore.kernel.org/r/20221014170905.64069-7-adrian.hunter@intel.com -Signed-off-by: Arnaldo Carvalho de Melo -Cc: Namhyung Kim -Signed-off-by: Greg Kroah-Hartman ---- - tools/perf/util/genelf.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/tools/perf/util/genelf.h -+++ b/tools/perf/util/genelf.h -@@ -2,6 +2,8 @@ - #ifndef __GENELF_H__ - #define __GENELF_H__ - -+#include -+ - /* 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, -@@ -64,6 +66,6 @@ int jit_add_debug_info(Elf *e, uint64_t - #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 diff --git a/queue-4.19/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch b/queue-4.19/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch deleted file mode 100644 index 1d45a21055d..00000000000 --- a/queue-4.19/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 95275d823f85ce83f8ccc47ccc04777c33cac628 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 18 Feb 2021 11:57:59 +0200 -Subject: perf intel-pt: Adjust sample flags for VM-Exit - -From: Adrian Hunter - -[ Upstream commit 695fc4510615f8db40ebaf7a2c011f0a594b5f77 ] - -Use the change of NR to detect whether an asynchronous branch is a VM-Exit. - -Note VM-Entry is determined from the vmlaunch or vmresume instruction, -in which case, sample flags will show "VMentry" even if the VM-Entry fails. - -Signed-off-by: Adrian Hunter -Acked-by: Andi Kleen -Cc: Alexander Shishkin -Cc: Jiri Olsa -Link: https://lore.kernel.org/r/20210218095801.19576-10-adrian.hunter@intel.com -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: f2d87895cbc4 ("perf intel-pt: Fix async branch flags") -Signed-off-by: Sasha Levin ---- - tools/perf/util/intel-pt.c | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c -index e90f1044a8397..e073c7108c6c9 100644 ---- a/tools/perf/util/intel-pt.c -+++ b/tools/perf/util/intel-pt.c -@@ -899,13 +899,16 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) - if (ptq->state->flags & INTEL_PT_ABORT_TX) { - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TX_ABORT; - } else if (ptq->state->flags & INTEL_PT_ASYNC) { -- if (ptq->state->to_ip) -+ if (!ptq->state->to_ip) -+ ptq->flags = PERF_IP_FLAG_BRANCH | -+ PERF_IP_FLAG_TRACE_END; -+ else if (ptq->state->from_nr && !ptq->state->to_nr) -+ ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | -+ PERF_IP_FLAG_VMEXIT; -+ else - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | - PERF_IP_FLAG_ASYNC | - PERF_IP_FLAG_INTERRUPT; -- else -- ptq->flags = PERF_IP_FLAG_BRANCH | -- PERF_IP_FLAG_TRACE_END; - ptq->insn_len = 0; - } else { - if (ptq->state->from_ip) --- -2.42.0 - diff --git a/queue-4.19/perf-intel-pt-fix-async-branch-flags.patch b/queue-4.19/perf-intel-pt-fix-async-branch-flags.patch deleted file mode 100644 index 052f140ffc9..00000000000 --- a/queue-4.19/perf-intel-pt-fix-async-branch-flags.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b379d6abd4b2d4c2bafd5bad39fcc6bc4580500f Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 28 Sep 2023 10:29:53 +0300 -Subject: perf intel-pt: Fix async branch flags - -From: Adrian Hunter - -[ Upstream commit f2d87895cbc4af80649850dcf5da36de6b2ed3dd ] - -Ensure PERF_IP_FLAG_ASYNC is set always for asynchronous branches (i.e. -interrupts etc). - -Fixes: 90e457f7be08 ("perf tools: Add Intel PT support") -Cc: stable@vger.kernel.org -Signed-off-by: Adrian Hunter -Acked-by: Namhyung Kim -Link: https://lore.kernel.org/r/20230928072953.19369-1-adrian.hunter@intel.com -Signed-off-by: Namhyung Kim -Signed-off-by: Sasha Levin ---- - tools/perf/util/intel-pt.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c -index e073c7108c6c9..92b9921568f5d 100644 ---- a/tools/perf/util/intel-pt.c -+++ b/tools/perf/util/intel-pt.c -@@ -901,9 +901,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) - } else if (ptq->state->flags & INTEL_PT_ASYNC) { - if (!ptq->state->to_ip) - ptq->flags = PERF_IP_FLAG_BRANCH | -+ PERF_IP_FLAG_ASYNC | - PERF_IP_FLAG_TRACE_END; - else if (ptq->state->from_nr && !ptq->state->to_nr) - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | -+ PERF_IP_FLAG_ASYNC | - PERF_IP_FLAG_VMEXIT; - else - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | --- -2.42.0 - diff --git a/queue-4.19/series b/queue-4.19/series index 4ce31f5edbb..433b0f98bdb 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -30,7 +30,6 @@ usb-serial-option-don-t-claim-interface-4-for-zte-mf290.patch usb-dwc2-write-hcint-with-intmask-applied.patch usb-dwc3-set-the-dma-max_seg_size.patch usb-dwc3-qcom-fix-wakeup-after-probe-deferral.patch -perf-inject-fix-gen_elf_text_offset-for-jit.patch pinctrl-avoid-reload-of-p-state-in-list-iteration.patch firewire-core-fix-possible-memory-leak-in-create_units.patch mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch @@ -46,8 +45,6 @@ input-xpad-add-hyperx-clutch-gladiate-support.patch ipv4-igmp-fix-refcnt-uaf-issue-when-receiving-igmp-q.patch ravb-fix-races-between-ravb_tx_timeout_work-and-net-.patch net-ravb-start-tx-queues-after-hw-initialization-suc.patch -perf-intel-pt-adjust-sample-flags-for-vm-exit.patch -perf-intel-pt-fix-async-branch-flags.patch smb3-fix-touch-h-of-symlink.patch s390-mm-fix-phys-vs-virt-confusion-in-mark_kernel_px.patch s390-cmma-fix-detection-of-dat-pages.patch 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 deleted file mode 100644 index dcdafcb4f22..00000000000 --- a/queue-5.10/perf-inject-fix-gen_elf_text_offset-for-jit.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 89b15d00527b7825ff19130ed83478e80e3fae99 Mon Sep 17 00:00:00 2001 -From: Adrian Hunter -Date: Fri, 14 Oct 2022 20:09:04 +0300 -Subject: perf inject: Fix GEN_ELF_TEXT_OFFSET for jit - -From: Adrian Hunter - -commit 89b15d00527b7825ff19130ed83478e80e3fae99 upstream. - -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 -Tested-by: Arnaldo Carvalho de Melo -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Lieven Hey -Cc: Namhyung Kim -Link: https://lore.kernel.org/r/20221014170905.64069-7-adrian.hunter@intel.com -Signed-off-by: Arnaldo Carvalho de Melo -Cc: Namhyung Kim -Signed-off-by: Greg Kroah-Hartman ---- - tools/perf/util/genelf.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/tools/perf/util/genelf.h -+++ b/tools/perf/util/genelf.h -@@ -2,6 +2,8 @@ - #ifndef __GENELF_H__ - #define __GENELF_H__ - -+#include -+ - /* 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 - #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 diff --git a/queue-5.10/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch b/queue-5.10/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch deleted file mode 100644 index 21d72a37d6d..00000000000 --- a/queue-5.10/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch +++ /dev/null @@ -1,54 +0,0 @@ -From de73fe90b28cb61ad6d2117ad0d209523ccd04c2 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 18 Feb 2021 11:57:59 +0200 -Subject: perf intel-pt: Adjust sample flags for VM-Exit - -From: Adrian Hunter - -[ Upstream commit 695fc4510615f8db40ebaf7a2c011f0a594b5f77 ] - -Use the change of NR to detect whether an asynchronous branch is a VM-Exit. - -Note VM-Entry is determined from the vmlaunch or vmresume instruction, -in which case, sample flags will show "VMentry" even if the VM-Entry fails. - -Signed-off-by: Adrian Hunter -Acked-by: Andi Kleen -Cc: Alexander Shishkin -Cc: Jiri Olsa -Link: https://lore.kernel.org/r/20210218095801.19576-10-adrian.hunter@intel.com -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: f2d87895cbc4 ("perf intel-pt: Fix async branch flags") -Signed-off-by: Sasha Levin ---- - tools/perf/util/intel-pt.c | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c -index 453773ce6f455..918da9a430c08 100644 ---- a/tools/perf/util/intel-pt.c -+++ b/tools/perf/util/intel-pt.c -@@ -1137,13 +1137,16 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) - if (ptq->state->flags & INTEL_PT_ABORT_TX) { - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TX_ABORT; - } else if (ptq->state->flags & INTEL_PT_ASYNC) { -- if (ptq->state->to_ip) -+ if (!ptq->state->to_ip) -+ ptq->flags = PERF_IP_FLAG_BRANCH | -+ PERF_IP_FLAG_TRACE_END; -+ else if (ptq->state->from_nr && !ptq->state->to_nr) -+ ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | -+ PERF_IP_FLAG_VMEXIT; -+ else - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | - PERF_IP_FLAG_ASYNC | - PERF_IP_FLAG_INTERRUPT; -- else -- ptq->flags = PERF_IP_FLAG_BRANCH | -- PERF_IP_FLAG_TRACE_END; - ptq->insn_len = 0; - } else { - if (ptq->state->from_ip) --- -2.42.0 - diff --git a/queue-5.10/perf-intel-pt-fix-async-branch-flags.patch b/queue-5.10/perf-intel-pt-fix-async-branch-flags.patch deleted file mode 100644 index 939b8a5e30c..00000000000 --- a/queue-5.10/perf-intel-pt-fix-async-branch-flags.patch +++ /dev/null @@ -1,42 +0,0 @@ -From e16bcab90f7503209013ffa4c129b41b82d59fe8 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 28 Sep 2023 10:29:53 +0300 -Subject: perf intel-pt: Fix async branch flags - -From: Adrian Hunter - -[ Upstream commit f2d87895cbc4af80649850dcf5da36de6b2ed3dd ] - -Ensure PERF_IP_FLAG_ASYNC is set always for asynchronous branches (i.e. -interrupts etc). - -Fixes: 90e457f7be08 ("perf tools: Add Intel PT support") -Cc: stable@vger.kernel.org -Signed-off-by: Adrian Hunter -Acked-by: Namhyung Kim -Link: https://lore.kernel.org/r/20230928072953.19369-1-adrian.hunter@intel.com -Signed-off-by: Namhyung Kim -Signed-off-by: Sasha Levin ---- - tools/perf/util/intel-pt.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c -index 918da9a430c08..a4ea962e28d18 100644 ---- a/tools/perf/util/intel-pt.c -+++ b/tools/perf/util/intel-pt.c -@@ -1139,9 +1139,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) - } else if (ptq->state->flags & INTEL_PT_ASYNC) { - if (!ptq->state->to_ip) - ptq->flags = PERF_IP_FLAG_BRANCH | -+ PERF_IP_FLAG_ASYNC | - PERF_IP_FLAG_TRACE_END; - else if (ptq->state->from_nr && !ptq->state->to_nr) - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | -+ PERF_IP_FLAG_ASYNC | - PERF_IP_FLAG_VMEXIT; - else - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | --- -2.42.0 - diff --git a/queue-5.10/series b/queue-5.10/series index f6b7b184ed1..91e38817062 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -66,7 +66,6 @@ usb-dwc3-fix-default-mode-initialization.patch usb-dwc3-set-the-dma-max_seg_size.patch usb-dwc3-qcom-fix-wakeup-after-probe-deferral.patch io_uring-fix-off-by-one-bvec-index.patch -perf-inject-fix-gen_elf_text_offset-for-jit.patch pinctrl-avoid-reload-of-p-state-in-list-iteration.patch firewire-core-fix-possible-memory-leak-in-create_units.patch mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch @@ -99,8 +98,6 @@ r8169-prevent-potential-deadlock-in-rtl8169_close.patch ravb-fix-races-between-ravb_tx_timeout_work-and-net-.patch net-ravb-use-pm_runtime_resume_and_get.patch net-ravb-start-tx-queues-after-hw-initialization-suc.patch -perf-intel-pt-adjust-sample-flags-for-vm-exit.patch -perf-intel-pt-fix-async-branch-flags.patch smb3-fix-touch-h-of-symlink.patch asoc-intel-move-soc_intel_is_foo-helpers-to-a-generi.patch asoc-sof-sof-pci-dev-use-community-key-on-all-up-boa.patch diff --git a/queue-5.15/perf-inject-fix-gen_elf_text_offset-for-jit.patch b/queue-5.15/perf-inject-fix-gen_elf_text_offset-for-jit.patch deleted file mode 100644 index dcdafcb4f22..00000000000 --- a/queue-5.15/perf-inject-fix-gen_elf_text_offset-for-jit.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 89b15d00527b7825ff19130ed83478e80e3fae99 Mon Sep 17 00:00:00 2001 -From: Adrian Hunter -Date: Fri, 14 Oct 2022 20:09:04 +0300 -Subject: perf inject: Fix GEN_ELF_TEXT_OFFSET for jit - -From: Adrian Hunter - -commit 89b15d00527b7825ff19130ed83478e80e3fae99 upstream. - -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 -Tested-by: Arnaldo Carvalho de Melo -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Lieven Hey -Cc: Namhyung Kim -Link: https://lore.kernel.org/r/20221014170905.64069-7-adrian.hunter@intel.com -Signed-off-by: Arnaldo Carvalho de Melo -Cc: Namhyung Kim -Signed-off-by: Greg Kroah-Hartman ---- - tools/perf/util/genelf.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/tools/perf/util/genelf.h -+++ b/tools/perf/util/genelf.h -@@ -2,6 +2,8 @@ - #ifndef __GENELF_H__ - #define __GENELF_H__ - -+#include -+ - /* 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 - #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 diff --git a/queue-5.15/series b/queue-5.15/series index fae6b4860dc..1aed7c160e6 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -1,4 +1,3 @@ -perf-inject-fix-gen_elf_text_offset-for-jit.patch pinctrl-avoid-reload-of-p-state-in-list-iteration.patch firewire-core-fix-possible-memory-leak-in-create_units.patch mmc-cqhci-increase-recovery-halt-timeout.patch diff --git a/queue-5.4/perf-inject-fix-gen_elf_text_offset-for-jit.patch b/queue-5.4/perf-inject-fix-gen_elf_text_offset-for-jit.patch deleted file mode 100644 index dcdafcb4f22..00000000000 --- a/queue-5.4/perf-inject-fix-gen_elf_text_offset-for-jit.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 89b15d00527b7825ff19130ed83478e80e3fae99 Mon Sep 17 00:00:00 2001 -From: Adrian Hunter -Date: Fri, 14 Oct 2022 20:09:04 +0300 -Subject: perf inject: Fix GEN_ELF_TEXT_OFFSET for jit - -From: Adrian Hunter - -commit 89b15d00527b7825ff19130ed83478e80e3fae99 upstream. - -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 -Tested-by: Arnaldo Carvalho de Melo -Cc: Ian Rogers -Cc: Jiri Olsa -Cc: Lieven Hey -Cc: Namhyung Kim -Link: https://lore.kernel.org/r/20221014170905.64069-7-adrian.hunter@intel.com -Signed-off-by: Arnaldo Carvalho de Melo -Cc: Namhyung Kim -Signed-off-by: Greg Kroah-Hartman ---- - tools/perf/util/genelf.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/tools/perf/util/genelf.h -+++ b/tools/perf/util/genelf.h -@@ -2,6 +2,8 @@ - #ifndef __GENELF_H__ - #define __GENELF_H__ - -+#include -+ - /* 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 - #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 diff --git a/queue-5.4/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch b/queue-5.4/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch deleted file mode 100644 index 6837771e063..00000000000 --- a/queue-5.4/perf-intel-pt-adjust-sample-flags-for-vm-exit.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 066b799f813d593968446cf973dd49952030b7a0 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 18 Feb 2021 11:57:59 +0200 -Subject: perf intel-pt: Adjust sample flags for VM-Exit - -From: Adrian Hunter - -[ Upstream commit 695fc4510615f8db40ebaf7a2c011f0a594b5f77 ] - -Use the change of NR to detect whether an asynchronous branch is a VM-Exit. - -Note VM-Entry is determined from the vmlaunch or vmresume instruction, -in which case, sample flags will show "VMentry" even if the VM-Entry fails. - -Signed-off-by: Adrian Hunter -Acked-by: Andi Kleen -Cc: Alexander Shishkin -Cc: Jiri Olsa -Link: https://lore.kernel.org/r/20210218095801.19576-10-adrian.hunter@intel.com -Signed-off-by: Arnaldo Carvalho de Melo -Stable-dep-of: f2d87895cbc4 ("perf intel-pt: Fix async branch flags") -Signed-off-by: Sasha Levin ---- - tools/perf/util/intel-pt.c | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c -index b40832419a279..bead66d65dc0b 100644 ---- a/tools/perf/util/intel-pt.c -+++ b/tools/perf/util/intel-pt.c -@@ -997,13 +997,16 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) - if (ptq->state->flags & INTEL_PT_ABORT_TX) { - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_TX_ABORT; - } else if (ptq->state->flags & INTEL_PT_ASYNC) { -- if (ptq->state->to_ip) -+ if (!ptq->state->to_ip) -+ ptq->flags = PERF_IP_FLAG_BRANCH | -+ PERF_IP_FLAG_TRACE_END; -+ else if (ptq->state->from_nr && !ptq->state->to_nr) -+ ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | -+ PERF_IP_FLAG_VMEXIT; -+ else - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | - PERF_IP_FLAG_ASYNC | - PERF_IP_FLAG_INTERRUPT; -- else -- ptq->flags = PERF_IP_FLAG_BRANCH | -- PERF_IP_FLAG_TRACE_END; - ptq->insn_len = 0; - } else { - if (ptq->state->from_ip) --- -2.42.0 - diff --git a/queue-5.4/perf-intel-pt-fix-async-branch-flags.patch b/queue-5.4/perf-intel-pt-fix-async-branch-flags.patch deleted file mode 100644 index a7d42abdf04..00000000000 --- a/queue-5.4/perf-intel-pt-fix-async-branch-flags.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d20ed623e00c1bb490b735a413de98503691796d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 28 Sep 2023 10:29:53 +0300 -Subject: perf intel-pt: Fix async branch flags - -From: Adrian Hunter - -[ Upstream commit f2d87895cbc4af80649850dcf5da36de6b2ed3dd ] - -Ensure PERF_IP_FLAG_ASYNC is set always for asynchronous branches (i.e. -interrupts etc). - -Fixes: 90e457f7be08 ("perf tools: Add Intel PT support") -Cc: stable@vger.kernel.org -Signed-off-by: Adrian Hunter -Acked-by: Namhyung Kim -Link: https://lore.kernel.org/r/20230928072953.19369-1-adrian.hunter@intel.com -Signed-off-by: Namhyung Kim -Signed-off-by: Sasha Levin ---- - tools/perf/util/intel-pt.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c -index bead66d65dc0b..8da264dd8c286 100644 ---- a/tools/perf/util/intel-pt.c -+++ b/tools/perf/util/intel-pt.c -@@ -999,9 +999,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) - } else if (ptq->state->flags & INTEL_PT_ASYNC) { - if (!ptq->state->to_ip) - ptq->flags = PERF_IP_FLAG_BRANCH | -+ PERF_IP_FLAG_ASYNC | - PERF_IP_FLAG_TRACE_END; - else if (ptq->state->from_nr && !ptq->state->to_nr) - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | -+ PERF_IP_FLAG_ASYNC | - PERF_IP_FLAG_VMEXIT; - else - ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | --- -2.42.0 - diff --git a/queue-5.4/series b/queue-5.4/series index 748b0c91ff7..fca6ced3821 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -48,7 +48,6 @@ usb-dwc3-set-the-dma-max_seg_size.patch usb-dwc3-qcom-fix-resource-leaks-on-probe-deferral.patch usb-dwc3-qcom-fix-wakeup-after-probe-deferral.patch io_uring-fix-off-by-one-bvec-index.patch -perf-inject-fix-gen_elf_text_offset-for-jit.patch pinctrl-avoid-reload-of-p-state-in-list-iteration.patch firewire-core-fix-possible-memory-leak-in-create_units.patch mmc-block-do-not-lose-cache-flush-during-cqe-error-recovery.patch @@ -69,8 +68,6 @@ net-stmmac-xgmac-disable-fpe-mmc-interrupts.patch ravb-fix-races-between-ravb_tx_timeout_work-and-net-.patch net-ravb-use-pm_runtime_resume_and_get.patch net-ravb-start-tx-queues-after-hw-initialization-suc.patch -perf-intel-pt-adjust-sample-flags-for-vm-exit.patch -perf-intel-pt-fix-async-branch-flags.patch smb3-fix-touch-h-of-symlink.patch s390-mm-fix-phys-vs-virt-confusion-in-mark_kernel_px.patch s390-cmma-fix-detection-of-dat-pages.patch -- 2.47.3