Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp552840iog; Fri, 24 Jun 2022 09:07:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uWoW/b1xEWh0Ci8ivGrx1ddCxVENuxvx+2w5Lw2oT0nO4m2HxKAQv8H6fMxSPFYNw7gO5p X-Received: by 2002:a05:6402:3685:b0:435:8069:e44 with SMTP id ej5-20020a056402368500b0043580690e44mr18492169edb.202.1656086856790; Fri, 24 Jun 2022 09:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656086856; cv=none; d=google.com; s=arc-20160816; b=FFndKh4+jhzhCuyT4hGyaPV23F6V2GzxgYsa9i9D8RyUXHkXYelPDmk85IEth+5C+1 RqOFyrbQM48JiYPzmKkSxl+VohBg0X36C5/k8GiDuXDyu0qrbHKFOO1gvjRGFHcdaLrz Fzy2/dlrHxcwXDaekpmxaQNxCPdgSQNrJGDdcGPYnd87Afr+LYze3HkTW+Bg1gDcATwC OLri9UuMWyavOj+03q1eip3pnzrbDJfkBrq7++Dqnaf7O6bbAzxQBi06Ys4Q5MDTZ2F3 KfNmAaO2yjdxu9aO4RbQHmxTx4VW0le3773k5eHhqh7aYsYDzigz82yHC7mlADfS55cm z3og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qfYFwSd6zhJPXDppEJzFmsfoBlq0uAMta4BnC0i2seI=; b=MhtBRV6y5uJBh4DB9kmgkw6+lIcoki2jLL+hkpfM9975aej6Vf/LQYaCJi52ivWUJR 9QES2N2+1k3ldtskFFCa8DbCDXblPbVsqhCdN55CgHc2PBmmrImrn9M8vnP21+RASMI8 nC24sEBdEO+Nx7PPnZOYe2iq/ehCrZRduSVn5W+3nF42q8V2qTLnS8KpJ3p4SFo3lELl 8ReLmHxkeIqQcrQFAC+roThPuHNLgjFsVuRyXuagsqqDXBolBtYX2ZnlAAv3MZckdvq+ umTTh9TTLiL7AKqu7WsM1yIZ4kHktvw6RWje9uq6pSAPPePbXf+1a8xhkTWSEDE1JY6E vlDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=MlL1W4WT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020aa7c30a000000b00428727e4425si3320706edq.408.2022.06.24.09.07.06; Fri, 24 Jun 2022 09:07:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=MlL1W4WT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230369AbiFXQCa (ORCPT + 99 others); Fri, 24 Jun 2022 12:02:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230185AbiFXQC3 (ORCPT ); Fri, 24 Jun 2022 12:02:29 -0400 Received: from forward500j.mail.yandex.net (forward500j.mail.yandex.net [IPv6:2a02:6b8:0:801:2::110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 769C8527F5; Fri, 24 Jun 2022 09:02:28 -0700 (PDT) Received: from myt6-9503d8936a58.qloud-c.yandex.net (myt6-9503d8936a58.qloud-c.yandex.net [IPv6:2a02:6b8:c12:4684:0:640:9503:d893]) by forward500j.mail.yandex.net (Yandex) with ESMTP id A544B6CB8372; Fri, 24 Jun 2022 19:01:41 +0300 (MSK) Received: from myt5-ca5ec8faf378.qloud-c.yandex.net (myt5-ca5ec8faf378.qloud-c.yandex.net [2a02:6b8:c12:2514:0:640:ca5e:c8fa]) by myt6-9503d8936a58.qloud-c.yandex.net (mxback/Yandex) with ESMTP id 86JPym46TO-1ffSsmEq; Fri, 24 Jun 2022 19:01:41 +0300 X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1656086501; bh=qfYFwSd6zhJPXDppEJzFmsfoBlq0uAMta4BnC0i2seI=; h=In-Reply-To:References:Date:Subject:Cc:To:From:Message-Id; b=MlL1W4WTbDu39xNkTLR1Uj5l2gYFnTxBC0BQygKpttxeRS78tjAzX2dPWZ3AGqPEG bpKRteWYMnWpbZQlOO9NwN9iVGqaA3SpNI/spW9iNdgHDdT9an/sh4drx59egqt0jV 6msH57zzfWdrGRFcUot+M4pkRqe6I3eTBh1FcjSY= Authentication-Results: myt6-9503d8936a58.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me Received: by myt5-ca5ec8faf378.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id iVUkuL8Azf-1eMKkS5t; Fri, 24 Jun 2022 19:01:40 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Nikita Shubin To: Atish Patra , Anup Patel Cc: =?UTF-8?q?Jo=C3=A3o=20M=C3=A1rio=20Domingos?= , linux@yadro.com, Nikita Shubin , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v4 4/5] perf arch events: riscv sbi firmware std event files Date: Fri, 24 Jun 2022 19:00:54 +0300 Message-Id: <20220624160117.3206-5-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220624160117.3206-1-nikita.shubin@maquefel.me> References: <20220624160117.3206-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikita Shubin Firmware events are defined by "RISC-V Supervisor Binary Interface Specification", which means they should be always available as long as firmware supports >= 0.3.0 SBI. Expose them to arch std events, so they can be reused by particular PMU bindings. Signed-off-by: Nikita Shubin --- .../arch/riscv/riscv-sbi-firmware.json | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json diff --git a/tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json b/tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json new file mode 100644 index 000000000000..bcaa9891e595 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json @@ -0,0 +1,134 @@ +[ + { + "PublicDescription": "Misaligned load trap", + "EventCode": "0x8000000000000000", + "EventName": "FW_MISALIGNED_LOAD", + "BriefDescription": "Misaligned load trap event" + }, + { + "PublicDescription": "Misaligned store trap", + "EventCode": "0x8000000000000001", + "EventName": "FW_MISALIGNED_STORE", + "BriefDescription": "Misaligned store trap event" + }, + { + "PublicDescription": "Load access trap", + "EventCode": "0x8000000000000002", + "EventName": "FW_ACCESS_LOAD", + "BriefDescription": "Load access trap event" + }, + { + "PublicDescription": "Store access trap", + "EventCode": "0x8000000000000003", + "EventName": "FW_ACCESS_STORE", + "BriefDescription": "Store access trap event" + }, + { + "PublicDescription": "Illegal instruction trap", + "EventCode": "0x8000000000000004", + "EventName": "FW_ILLEGAL_INSN", + "BriefDescription": "Illegal instruction trap event" + }, + { + "PublicDescription": "Set timer event", + "EventCode": "0x8000000000000005", + "EventName": "FW_SET_TIMER", + "BriefDescription": "Set timer event" + }, + { + "PublicDescription": "Sent IPI to other HART event", + "EventCode": "0x8000000000000006", + "EventName": "FW_IPI_SENT", + "BriefDescription": "Sent IPI to other HART event" + }, + { + "PublicDescription": "Received IPI from other HART event", + "EventCode": "0x8000000000000007", + "EventName": "FW_IPI_RECEIVED", + "BriefDescription": "Received IPI from other HART event" + }, + { + "PublicDescription": "Sent FENCE.I request to other HART event", + "EventCode": "0x8000000000000008", + "EventName": "FW_FENCE_I_SENT", + "BriefDescription": "Sent FENCE.I request to other HART event" + }, + { + "PublicDescription": "Received FENCE.I request from other HART event", + "EventCode": "0x8000000000000009", + "EventName": "FW_FENCE_I_RECEIVED", + "BriefDescription": "Received FENCE.I request from other HART event" + }, + { + "PublicDescription": "Sent SFENCE.VMA request to other HART event", + "EventCode": "0x80000000000000a", + "EventName": "FW_SFENCE_VMA_SENT", + "BriefDescription": "Sent SFENCE.VMA request to other HART event" + }, + { + "PublicDescription": "Received SFENCE.VMA request from other HART event", + "EventCode": "0x800000000000000b", + "EventName": "FW_SFENCE_VMA_RECEIVED", + "BriefDescription": "Received SFENCE.VMA request from other HART event" + }, + { + "PublicDescription": "Sent SFENCE.VMA with ASID request to other HART event", + "EventCode": "0x800000000000000c", + "EventName": "FW_SFENCE_VMA_RECEIVED", + "BriefDescription": "Sent SFENCE.VMA with ASID request to other HART event" + }, + { + "PublicDescription": "Received SFENCE.VMA with ASID request from other HART event", + "EventCode": "0x800000000000000d", + "EventName": "FW_SFENCE_VMA_ASID_RECEIVED", + "BriefDescription": "Received SFENCE.VMA with ASID request from other HART event" + }, + { + "PublicDescription": "Sent HFENCE.GVMA request to other HART event", + "EventCode": "0x800000000000000e", + "EventName": "FW_HFENCE_GVMA_SENT", + "BriefDescription": "Sent HFENCE.GVMA request to other HART event" + }, + { + "PublicDescription": "Received HFENCE.GVMA request from other HART event", + "EventCode": "0x800000000000000f", + "EventName": "FW_HFENCE_GVMA_RECEIVED", + "BriefDescription": "Received HFENCE.GVMA request from other HART event" + }, + { + "PublicDescription": "Sent HFENCE.GVMA with VMID request to other HART event", + "EventCode": "0x8000000000000010", + "EventName": "FW_HFENCE_GVMA_VMID_SENT", + "BriefDescription": "Sent HFENCE.GVMA with VMID request to other HART event" + }, + { + "PublicDescription": "Received HFENCE.GVMA with VMID request from other HART event", + "EventCode": "0x8000000000000011", + "EventName": "FW_HFENCE_GVMA_VMID_RECEIVED", + "BriefDescription": "Received HFENCE.GVMA with VMID request from other HART event" + }, + { + "PublicDescription": "Sent HFENCE.VVMA request to other HART event", + "EventCode": "0x8000000000000012", + "EventName": "FW_HFENCE_VVMA_SENT", + "BriefDescription": "Sent HFENCE.VVMA request to other HART event" + }, + { + "PublicDescription": "Received HFENCE.VVMA request from other HART event", + "EventCode": "0x8000000000000013", + "EventName": "FW_HFENCE_VVMA_RECEIVED", + "BriefDescription": "Received HFENCE.VVMA request from other HART event" + }, + { + "PublicDescription": "Sent HFENCE.VVMA with ASID request to other HART event", + "EventCode": "0x8000000000000014", + "EventName": "FW_HFENCE_VVMA_ASID_SENT", + "BriefDescription": "Sent HFENCE.VVMA with ASID request to other HART event" + }, + { + "PublicDescription": "Received HFENCE.VVMA with ASID request from other HART event", + "EventCode": "0x8000000000000015", + "EventName": "FW_HFENCE_VVMA_ASID_RECEIVED", + "BriefDescription": "Received HFENCE.VVMA with ASID request from other HART event" + } +] -- 2.35.1