Message ID | IA1PR20MB49539201E93DE46A9A2A8E74BB799@IA1PR20MB4953.namprd20.prod.outlook.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp128113vqo; Mon, 15 May 2023 19:52:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6bF/TRFz5SR6uvXYZqNT/PgDY8cZF8eObfXmSgtS/C8/O9y4aktt5gwiRoZ8ccmOeM3v9o X-Received: by 2002:a17:90b:46cd:b0:250:6119:6c1f with SMTP id jx13-20020a17090b46cd00b0025061196c1fmr29811409pjb.19.1684205522724; Mon, 15 May 2023 19:52:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684205522; cv=pass; d=google.com; s=arc-20160816; b=Wmz7gt+U4V9SnGAJbr9uNQ0eyb9G1KhmDagYRrZwVB9WF6ebWAHvig43a5ClfQ0zEX +wgZZS71nobOzIS7lzZzbTybd7QuIcnCOw12IlxZt3B4z+hrBUtsZYI4zg2AhileeY4X pkCwWb3X2G5JPH1uiH1Wius1KcNR6s8GSav9EMbKQtoGN/+CldrKrrwq4KCrfoniHbCt iVlqy+N+aaWtlZs6OZVFSOKeavey5o6Umx9tGjF6dd4KL3e2+vppawN5qF/hHttzOkrU TbhemgmC8Wup/zfrup2sTL2BuAdm2f88j3/iLQgmKKS+THfzFFeFmNTnsrqOGisM/KDK iCYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=LVdn2hoq0Uoz7op4rBq+OHEi4HPGI2kron5FIErOyy8=; b=A0xSk0VkYyf+7xsZOFUFkLaT+tlPk0UbWef0GMm4hT/mWvp9SuyQY1Ne+SKksMvLbd g/HxhWrbfxWKaermBZ3PjEX5/4SCJEnw5u3Y8xZyxODxNNSgljlPvXqKLlmzb6OheIuQ 1Qr8QB2aNIh6d9t+BC2+EZTG0JwMtGw2yJsiboBZOb05DGdmmWSpr04Vma4MRknJKVAL 3EmmOiX3r2A3THq/MHJKofYCb3UaV63euQpqo/zlGx3Ouojpugh19miXqbYnBW67uaL8 oLjtk/JPiJp4ae9hMxcTOKH6cvBEEiQSJb9iIULVD36xhah8M3ogvQ9slhjnlrQjG7IY yaxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=PdriM71R; arc=pass (i=1); 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk9-20020a17090b4a0900b002508259bbbbsi788435pjb.125.2023.05.15.19.51.48; Mon, 15 May 2023 19:52:02 -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=@outlook.com header.s=selector1 header.b=PdriM71R; arc=pass (i=1); 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbjEPCk7 (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Mon, 15 May 2023 22:40:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjEPCk4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 15 May 2023 22:40:56 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10olkn2046.outbound.protection.outlook.com [40.92.41.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA5BB8; Mon, 15 May 2023 19:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QqLdlVuA0toNvLds43KC52RV1w+8KWEYI5ixeU/ExzQYIlXqldTNpMnQZYKKlefCAu3nFa9bgQOG/i8Au9QZ9oWqbnyFWFQlYM8X0Kmy0EnZS+fcEsU8MLtA5O7YAL45ymxo2qoiRcXsdNnMtT/q231JtQVaPQejqP1m3gz2qbwe/qRcVB11lxKPCMJ0DW4UsZZnFOEG1vVYnFSdaLn3JM6a0KJ7ObE1bSkHz6Rb9r14Y1bO7JJ4VbH+8SymwfMq+ih7T+eCJ12mVLtxL2gVUhGZgiTMorQqcqFJheZSk49zKJICVsIjFWdcNofKEcDfDGy2QEYo2NvFjmuZoP7MWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LVdn2hoq0Uoz7op4rBq+OHEi4HPGI2kron5FIErOyy8=; b=gaBVWnsKK5VAdszMCxfeYAT1YmUdY49RA+19YMK3+G+nUEROSPz3vtwtlRkhom4Ti4Fpx8pjUR+C0ICTvBR2Amth+fQ5x4ZwgGBfgsva7teNF0TNkwQDOVL/jnLMzhUZ0Hck3oZv9uuCJ/NQVmFS6JOAFVu1g/aZxwI4VsMJkpbqUbFEEh+1DgSAozIe8FeeOhVEnZhXet8MTa0qAqzBvganM90tBZIHvEGQ0mzHdsVTM2BbMAAG0WEyqyX6WIdqaRSEkaszMLzefi+wgUxnnpgaF6sNrq7vLOcSWEIuxx8Qs8ktFxk39sio5OR0XOunVl7oVlqsJgLWswnNmxC1WA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LVdn2hoq0Uoz7op4rBq+OHEi4HPGI2kron5FIErOyy8=; b=PdriM71R4Uy4A89kY5jRQY2fElv5nYJu0xZ4u6IyP5jBfheuu2uaprAFN1RRHj2T1YUSwhyR7edhGbKE5PNX6SHyQ3xpRO5Ytd3Jb3kj7ex2zsBd+umhl+jmT3aA5DBSpB+hy5D8XCaVGA+s+6hKqG5xG+YgYzHZSOCodl1E0K5qmSG0FdUXku3X5wCeCqFqjy4x/0hN035yzqRS8/TEywvNHGX/LYE1i+9A2ysia68PNm1UVu+b9ULnjMrWnAGzDZxMph95+0t440GLOsWqmvzqd/FUci3cbKV/9EL3pPwY/VfNGrLRYR4Psi7kUG4I6o874omFbYm4Jkrylkwe9A== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH7PR20MB4457.namprd20.prod.outlook.com (2603:10b6:510:13d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Tue, 16 May 2023 02:40:53 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::4770:9e0f:7f59:1989]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::4770:9e0f:7f59:1989%6]) with mapi id 15.20.6387.021; Tue, 16 May 2023 02:40:52 +0000 From: Inochi Amaoto <inochiama@outlook.com> To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Nikita Shubin <n.shubin@yadro.com> Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, Inochi Amaoto <inochiama@outlook.com> Subject: [PATCH 0/2] perf: add T-HEAD C9xx series cpu support Date: Tue, 16 May 2023 10:37:12 +0800 Message-ID: <IA1PR20MB49539201E93DE46A9A2A8E74BB799@IA1PR20MB4953.namprd20.prod.outlook.com> X-Mailer: git-send-email 2.40.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [o7cot8Dg0enCOjpgotPmJWqxekM7KDpBbXMLw5hv+u4=] X-ClientProxiedBy: SI2PR06CA0017.apcprd06.prod.outlook.com (2603:1096:4:186::15) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20230516023714.306240-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH7PR20MB4457:EE_ X-MS-Office365-Filtering-Correlation-Id: 68737826-cb09-438c-6a6b-08db55b6f72a X-MS-Exchange-SLBlob-MailProps: mWtqiNqNgRuKO27nt/mZoWqn7+cej2Mk2sWuZ35QmaOBDLAh++ZXCHYw7tg9TcuIPJ3K/Pn8sV8sCEUbEUak6rcV5ncjGh6e+MU+SowpzSohXZM1gSIXNZ9PlBiYKgK+VFY0EOZYKTdqN8IB+MFbWPwHjyomOQ63LvSIb/LsbUR1Jd97PJsTO30Io3+WvDSoAqUMlJr7eMFoF/Iafg8/3v3KjwmyHuBLG+V/5no4abj+Ymnb1+wiWaEoCJ9nwnT6gujb5sjuOuLakiEy6XhbRpoBhYQWs9hA3zrQeYRs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0ssmamHFiMnPyLqMewANUk5ak5bi+zmtlssMIO6yhA282YqKZaN3tF72aMbNTnBJ5WoQZWL3zcdXJ7HV/qITmqfx7YQ0OyVzZxeI8WQir3ySEe0W5BRCU4aCjiz9xqMqYmPtSDO3zOM9CUQ5dcDYjXE8GSSHg7iew9B0SH4rfUzr92kWpoAULiD6CR8M6c7xUIIzaUhmV++pldAzs4FsLd8/GarLG1/b/h4xswKN6/Ysu8nOo5dG5z5sICqH1r21/0ccRvVxL3pgqdfrZ/YyVqFNRJF/s+NyUKjogo8uS/dnd/tlLmCu4xZmYZhE2AteoAKPGnMP7vmv7IB7FxyQJ6r0/6mVk= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68737826-cb09-438c-6a6b-08db55b6f72a X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2023 02:40:52.4483 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR20MB4457 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766017490277751614?= X-GMAIL-MSGID: =?utf-8?q?1766017490277751614?= |
Series |
perf: add T-HEAD C9xx series cpu support
|
|
Message
Inochi Amaoto
May 16, 2023, 2:37 a.m. UTC
The T-HEAD C9xx series cpu is a series of riscv CPU IP. As this IP was proposed before the current riscv event standard. It has a non-standard events encoding for perf events and unimplemented MARCH and MIMP CSR. This patch add these events to support C9xx cpus. AFAIK, at least the following chips used C9xx cpu. * Allwinner D1 (C906) * T-HEAD th1520 (C910) * Sophgo mango (C920) Inochi Amaoto (2): perf tools riscv: Allow get_cpuid return empty MARCH and MIMP perf vendor events riscv: add T-HEAD C9xx JSON file tools/perf/arch/riscv/util/header.c | 7 +- tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + .../arch/riscv/t-head/c9xx/cache.json | 67 ++++++++++++++++++ .../arch/riscv/t-head/c9xx/firmware.json | 68 +++++++++++++++++++ .../arch/riscv/t-head/c9xx/instruction.json | 22 ++++++ .../arch/riscv/t-head/c9xx/microarch.json | 42 ++++++++++++ 6 files changed, 201 insertions(+), 6 deletions(-) create mode 100644 tools/perf/pmu-events/arch/riscv/t-head/c9xx/cache.json create mode 100644 tools/perf/pmu-events/arch/riscv/t-head/c9xx/firmware.json create mode 100644 tools/perf/pmu-events/arch/riscv/t-head/c9xx/instruction.json create mode 100644 tools/perf/pmu-events/arch/riscv/t-head/c9xx/microarch.json -- 2.40.1
Comments
A minimal example for C910 is as follows, I have test this on a C920 chip. pmu { compatible = "riscv,pmu"; riscv,event-to-mhpmcounters = // event-start event-end a bitmap of all the MHPMCOUNTERx <0x00006 0x00006 0x00000400>, <0x00005 0x00005 0x00000800>, <0x10000 0x10000 0x00004000>, <0x10001 0x10001 0x00008000>, <0x10002 0x10002 0x00010000>, <0x10003 0x10003 0x00020000>, <0x10008 0x10008 0x00000008>, <0x10009 0x10009 0x00000010>, <0x10010 0x10010 0x00040000>, <0x10011 0x10011 0x00080000>, <0x10012 0x10012 0x00100000>, <0x10013 0x10013 0x00200000>, <0x10019 0x10019 0x00000040>, <0x10021 0x10021 0x00000020>; riscv,event-to-mhpmevent = // event-id event-selector /* mhpmevent3: L1I_READ_ACCESS */ <0x10008 0x00000000 0x00000001>, /* mhpmevent4: L1I_READ_MISS */ <0x10009 0x00000000 0x00000002>, /* mhpmevent5: ITLB_READ_MISS */ <0x10021 0x00000000 0x00000003>, /* mhpmevent6: DTLB_READ_MISS */ <0x10019 0x00000000 0x00000004>, /* mhpmevent10: PMU_HW_BRANCH_MISSES */ <0x00006 0x00000000 0x00000008>, /* mhpmevent11: PMU_HW_BRANCH_INSTRUCTIONS */ <0x00005 0x00000000 0x00000009>, /* mhpmevent14: L1D_READ_ACCESS */ <0x10000 0x00000000 0x0000000c>, /* mhpmevent15: L1D_READ_MISS */ <0x10001 0x00000000 0x0000000d>, /* mhpmevent16: L1D_WRITE_ACCESS */ <0x10002 0x00000000 0x0000000e>, /* mhpmevent17: L1D_WRITE_MISS */ <0x10003 0x00000000 0x0000000f>, /* mhpmevent18: LL_READ_ACCESS */ <0x10010 0x00000000 0x00000010>, /* mhpmevent19: LL_READ_MISS */ <0x10011 0x00000000 0x00000011>, /* mhpmevent20: LL_WRITE_ACCESS */ <0x10012 0x00000000 0x00000012>, /* mhpmevent21: LL_WRITE_MISS */ <0x10013 0x00000000 0x00000013>; riscv,raw-event-to-mhpmcounters = /* mhpmevent3: L1 ICache Access Counter */ <0x00000000 0x00000001 0xffffffff 0xffffffff 0x00000008>, /* mhpmevent4: L1 ICache Miss Counter */ <0x00000000 0x00000002 0xffffffff 0xffffffff 0x00000010>, /* mhpmevent5: I-UTLB Miss Counter */ <0x00000000 0x00000003 0xffffffff 0xffffffff 0x00000020>, /* mhpmevent6: D-UTLB Miss Counter */ <0x00000000 0x00000004 0xffffffff 0xffffffff 0x00000040>, /* mhpmevent7: JTLB Miss */ <0x00000000 0x00000005 0xffffffff 0xffffffff 0x00000080>, /* mhpmevent8: Conditional Branch Mispredict */ <0x00000000 0x00000006 0xffffffff 0xffffffff 0x00000100>, /* mhpmevent9: Conditional Branch Instruction Counter */ /* <0x00000000 0x00000007 0xffffffff 0xffffffff 0x00000200>, */ /* mhpmevent10: Indirect Branch Mispredict Counter */ <0x00000000 0x00000008 0xffffffff 0xffffffff 0x00000400>, /* mhpmevent11: Indirect Branch Instruction Counter */ <0x00000000 0x00000009 0xffffffff 0xffffffff 0x00000800>, /* mhpmevent12: LSU Spec Fail */ <0x00000000 0x0000000a 0xffffffff 0xffffffff 0x00001000>, /* mhpmevent13: Store Instruction */ <0x00000000 0x0000000b 0xffffffff 0xffffffff 0x00002000>, /* mhpmevent14: L1 DCache read access Counter */ <0x00000000 0x0000000c 0xffffffff 0xffffffff 0x00004000>, /* mhpmevent15: L1 DCache read miss Counter */ <0x00000000 0x0000000d 0xffffffff 0xffffffff 0x00008000>, /* mhpmevent16: L1 DCache write access Counter */ <0x00000000 0x0000000e 0xffffffff 0xffffffff 0x00010000>, /* mhpmevent17: L1 DCache write access Counter */ <0x00000000 0x0000000f 0xffffffff 0xffffffff 0x00020000>, /* mhpmevent18: L2 Cache read access Counter */ <0x00000000 0x00000010 0xffffffff 0xffffffff 0x00040000>, /* mhpmevent19: L2 Cache read miss Counter */ <0x00000000 0x00000011 0xffffffff 0xffffffff 0x00080000>, /* mhpmevent20: L2 Cache write access Counter */ <0x00000000 0x00000012 0xffffffff 0xffffffff 0x00100000>, /* mhpmevent21: L2 Cache write miss Counter */ <0x00000000 0x00000013 0xffffffff 0xffffffff 0x00200000>, /* mhpmevent22: RF Launch Fail */ <0x00000000 0x00000014 0xffffffff 0xffffffff 0x00400000>, /* mhpmevent23: RF Reg Launch Fail */ <0x00000000 0x00000015 0xffffffff 0xffffffff 0x00800000>, /* mhpmevent24: RF Instruction */ <0x00000000 0x00000016 0xffffffff 0xffffffff 0x01000000>, /* mhpmevent25: LSU Cross 4K Stall */ <0x00000000 0x00000017 0xffffffff 0xffffffff 0x02000000>, /* mhpmevent26: LSU Other Stall */ <0x00000000 0x00000018 0xffffffff 0xffffffff 0x04000000>, /* mhpmevent27: LSU SQ Discard */ <0x00000000 0x00000019 0xffffffff 0xffffffff 0x08000000>, /* mhpmevent28: LSU SQ Data Discard */ <0x00000000 0x0000001a 0xffffffff 0xffffffff 0x10000000>; }; > Hello Inochi Amaoto! > > Thank you for your series! > > Could you also provide HPM device tree bindings which were used in > OpenSBI for testing in cover letter ? > > On Tue, 2023-05-16 at 10:37 +0800, Inochi Amaoto wrote: > > The T-HEAD C9xx series cpu is a series of riscv CPU IP. As this IP > > was > > proposed before the current riscv event standard. It has a non- > > standard > > events encoding for perf events and unimplemented MARCH and MIMP CSR. > > This patch add these events to support C9xx cpus. > > > > AFAIK, at least the following chips used C9xx cpu. > > > > * Allwinner D1 (C906) > > * T-HEAD th1520 (C910) > > * Sophgo mango (C920) > > > > Inochi Amaoto (2): > > perf tools riscv: Allow get_cpuid return empty MARCH and MIMP > > perf vendor events riscv: add T-HEAD C9xx JSON file > > > > tools/perf/arch/riscv/util/header.c | 7 +- > > tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + > > .../arch/riscv/t-head/c9xx/cache.json | 67 > > ++++++++++++++++++ > > .../arch/riscv/t-head/c9xx/firmware.json | 68 > > +++++++++++++++++++ > > .../arch/riscv/t-head/c9xx/instruction.json | 22 ++++++ > > .../arch/riscv/t-head/c9xx/microarch.json | 42 ++++++++++++ > > 6 files changed, 201 insertions(+), 6 deletions(-) > > create mode 100644 tools/perf/pmu-events/arch/riscv/t- > > head/c9xx/cache.json > > create mode 100644 tools/perf/pmu-events/arch/riscv/t- > > head/c9xx/firmware.json > > create mode 100644 tools/perf/pmu-events/arch/riscv/t- > > head/c9xx/instruction.json > > create mode 100644 tools/perf/pmu-events/arch/riscv/t- > > head/c9xx/microarch.json > > > > -- > > 2.40.1 > > > > > > _______________________________________________ > > linux-riscv mailing list > > linux-riscv@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-riscv
Hello Inochi Amaoto! Thank you for your series! Could you also provide HPM device tree bindings which were used in OpenSBI for testing in cover letter ? On Tue, 2023-05-16 at 10:37 +0800, Inochi Amaoto wrote: > The T-HEAD C9xx series cpu is a series of riscv CPU IP. As this IP > was > proposed before the current riscv event standard. It has a non- > standard > events encoding for perf events and unimplemented MARCH and MIMP CSR. > This patch add these events to support C9xx cpus. > > AFAIK, at least the following chips used C9xx cpu. > > * Allwinner D1 (C906) > * T-HEAD th1520 (C910) > * Sophgo mango (C920) > > Inochi Amaoto (2): > perf tools riscv: Allow get_cpuid return empty MARCH and MIMP > perf vendor events riscv: add T-HEAD C9xx JSON file > > tools/perf/arch/riscv/util/header.c | 7 +- > tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + > .../arch/riscv/t-head/c9xx/cache.json | 67 > ++++++++++++++++++ > .../arch/riscv/t-head/c9xx/firmware.json | 68 > +++++++++++++++++++ > .../arch/riscv/t-head/c9xx/instruction.json | 22 ++++++ > .../arch/riscv/t-head/c9xx/microarch.json | 42 ++++++++++++ > 6 files changed, 201 insertions(+), 6 deletions(-) > create mode 100644 tools/perf/pmu-events/arch/riscv/t- > head/c9xx/cache.json > create mode 100644 tools/perf/pmu-events/arch/riscv/t- > head/c9xx/firmware.json > create mode 100644 tools/perf/pmu-events/arch/riscv/t- > head/c9xx/instruction.json > create mode 100644 tools/perf/pmu-events/arch/riscv/t- > head/c9xx/microarch.json > > -- > 2.40.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv