linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf arch events: Fix duplicate RISC-V SBI firmware event name
@ 2024-07-18 15:22 Eric Lin
  2024-07-19  8:51 ` Nikita Shubin
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Lin @ 2024-07-18 15:22 UTC (permalink / raw)
  To: peterz, mingo, acme, namhyung, mark.rutland, alexander.shishkin,
	jolsa, irogers, adrian.hunter, kan.liang, palmer, aou, peterlin,
	dminus, locus84, jisheng.teoh, inochiama, n.shubin,
	linux-perf-users, linux-kernel, linux-riscv
  Cc: Eric Lin, Samuel Holland

Currently, the RISC-V firmware JSON file has duplicate event name
"FW_SFENCE_VMA_RECEIVED". According to the RISC-V SBI PMU extension[1],
the event name should be "FW_SFENCE_VMA_ASID_SENT".

Before this patch:
$ perf list

firmware:
  fw_access_load
       [Load access trap event. Unit: cpu]
  fw_access_store
       [Store access trap event. Unit: cpu]
....
 fw_set_timer
       [Set timer event. Unit: cpu]
  fw_sfence_vma_asid_received
       [Received SFENCE.VMA with ASID request from other HART event. Unit: cpu]
  fw_sfence_vma_received
       [Sent SFENCE.VMA with ASID request to other HART event. Unit: cpu]

After this patch:
$ perf list

firmware:
  fw_access_load
       [Load access trap event. Unit: cpu]
  fw_access_store
       [Store access trap event. Unit: cpu]
.....
  fw_set_timer
       [Set timer event. Unit: cpu]
  fw_sfence_vma_asid_received
       [Received SFENCE.VMA with ASID request from other HART event. Unit: cpu]
  fw_sfence_vma_asid_sent
       [Sent SFENCE.VMA with ASID request to other HART event. Unit: cpu]
  fw_sfence_vma_received
       [Received SFENCE.VMA request from other HART event. Unit: cpu]

Link: https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/src/ext-pmu.adoc#event-firmware-events-type-15 [1]
Fixes: 8f0dcb4e7364 ("perf arch events: riscv sbi firmware std event files")
Signed-off-by: Eric Lin <eric.lin@sifive.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
---
 tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json       | 2 +-
 tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json        | 2 +-
 tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json       | 2 +-
 .../perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json  | 2 +-
 .../perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json b/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
index 9b4a032186a7..7149caec4f80 100644
--- a/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
+++ b/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
@@ -36,7 +36,7 @@
     "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
   },
   {
-    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
+    "ArchStdEvent": "FW_SFENCE_VMA_ASID_SENT"
   },
   {
     "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
diff --git a/tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json b/tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json
index a9939823b14b..0c9b9a2d2958 100644
--- a/tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json
+++ b/tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json
@@ -74,7 +74,7 @@
   {
     "PublicDescription": "Sent SFENCE.VMA with ASID request to other HART event",
     "ConfigCode": "0x800000000000000c",
-    "EventName": "FW_SFENCE_VMA_RECEIVED",
+    "EventName": "FW_SFENCE_VMA_ASID_SENT",
     "BriefDescription": "Sent SFENCE.VMA with ASID request to other HART event"
   },
   {
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
index 9b4a032186a7..7149caec4f80 100644
--- a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
+++ b/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
@@ -36,7 +36,7 @@
     "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
   },
   {
-    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
+    "ArchStdEvent": "FW_SFENCE_VMA_ASID_SENT"
   },
   {
     "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
diff --git a/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json b/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json
index 9b4a032186a7..7149caec4f80 100644
--- a/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json
+++ b/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json
@@ -36,7 +36,7 @@
     "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
   },
   {
-    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
+    "ArchStdEvent": "FW_SFENCE_VMA_ASID_SENT"
   },
   {
     "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
diff --git a/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json b/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json
index 9b4a032186a7..7149caec4f80 100644
--- a/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json
+++ b/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json
@@ -36,7 +36,7 @@
     "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
   },
   {
-    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
+    "ArchStdEvent": "FW_SFENCE_VMA_ASID_SENT"
   },
   {
     "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf arch events: Fix duplicate RISC-V SBI firmware event name
  2024-07-18 15:22 [PATCH] perf arch events: Fix duplicate RISC-V SBI firmware event name Eric Lin
@ 2024-07-19  8:51 ` Nikita Shubin
  2024-07-19  9:37   ` Eric Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Nikita Shubin @ 2024-07-19  8:51 UTC (permalink / raw)
  To: eric.lin
  Cc: acme, adrian.hunter, alexander.shishkin, aou, dminus, inochiama,
	irogers, jisheng.teoh, jolsa, kan.liang, linux-kernel,
	linux-perf-users, linux-riscv, locus84, mark.rutland, mingo,
	n.shubin, namhyung, palmer, peterlin, peterz, samuel.holland

Hi Eric,

Nice catch!

Shouldn't it fix every patch that copied affected 'firmware.json' by
the way ?

Something like:

Fixes: 8f0dcb4e7364 ("perf arch events: riscv sbi firmware std event
files")
Fixes: c4f769d4093d ("perf vendor events riscv: add Sifive U74 JSON
file")
Fixes: acbf6de674ef ("perf vendor events riscv: Add StarFive Dubhe-80
JSON file")
Fixes: 7340c6df49df ("perf vendor events riscv: add T-HEAD C9xx JSON
file")
Fixes: f5102e31c209 ("riscv: andes: Support specifying symbolic
firmware and hardware raw event")

Reviewed-by: Nikita Shubin <n.shubin@yadro.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf arch events: Fix duplicate RISC-V SBI firmware event name
  2024-07-19  8:51 ` Nikita Shubin
@ 2024-07-19  9:37   ` Eric Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Lin @ 2024-07-19  9:37 UTC (permalink / raw)
  To: Nikita Shubin
  Cc: acme, adrian.hunter, alexander.shishkin, aou, dminus, inochiama,
	irogers, jisheng.teoh, jolsa, kan.liang, linux-kernel,
	linux-perf-users, linux-riscv, locus84, mark.rutland, mingo,
	n.shubin, namhyung, palmer, peterlin, peterz, samuel.holland

Hi Nikita,

On Fri, Jul 19, 2024 at 4:51 PM Nikita Shubin <nikita.shubin@maquefel.me> wrote:
>
> Hi Eric,
>
> Nice catch!
>
> Shouldn't it fix every patch that copied affected 'firmware.json' by
> the way ?
>
> Something like:
>
> Fixes: 8f0dcb4e7364 ("perf arch events: riscv sbi firmware std event
> files")
> Fixes: c4f769d4093d ("perf vendor events riscv: add Sifive U74 JSON
> file")
> Fixes: acbf6de674ef ("perf vendor events riscv: Add StarFive Dubhe-80
> JSON file")
> Fixes: 7340c6df49df ("perf vendor events riscv: add T-HEAD C9xx JSON
> file")
> Fixes: f5102e31c209 ("riscv: andes: Support specifying symbolic
> firmware and hardware raw event")
>
> Reviewed-by: Nikita Shubin <n.shubin@yadro.com>


OK, I'll add every patch "Fixes:"  in the commit message and send the v2 patch.
Thanks for the review.

Regards,
Eric Lin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-19  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-18 15:22 [PATCH] perf arch events: Fix duplicate RISC-V SBI firmware event name Eric Lin
2024-07-19  8:51 ` Nikita Shubin
2024-07-19  9:37   ` Eric Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).