Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp50686rwd; Mon, 15 May 2023 19:54:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5F52cs7rZ/8k9Wt6psZX4w9IVS8GbBrZoxfxHlX4n3nEAxHYKOIaZuKnsYQq+Kx7eBAE+q X-Received: by 2002:a17:902:b288:b0:1a9:6d25:b2d2 with SMTP id u8-20020a170902b28800b001a96d25b2d2mr35462435plr.67.1684205659034; Mon, 15 May 2023 19:54:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684205659; cv=pass; d=google.com; s=arc-20160816; b=TbcJVHBiPE6y0fwUZnAun7R1MMlCKrUIUyBExtPboy7teca+fHqwMYnqK9Isn4nLlA biOhFyiNhQzD4Sf9Jj2LrM5FJT0x2ziPYkPsNJEYyW7R7au/+J0MwsVOcd2ykQRmDRl0 jVj6nGe8rKrZ/cipDLxwzlgJjp1PVWNpAl3jedUjqQ8giHBpeC/x1uK7QUSekOcdQAl/ CCfng4euvG6FYpcpb3LQwRImk4Arr75DxT6jMDiYOduzGcDsdkFEv15wVIth+A4HNO4M GRZPHXc56sZJEQasdg/+IVSaRmPg8U18ucSQXVMfxjjjqAj8yHEhLYC6cxYdHadP3KIl Ql2w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a10-20020a170902ee8a00b001ab29e16b3asi924003pld.286.2023.05.15.19.54.05; Mon, 15 May 2023 19:54:19 -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 S229873AbjEPCk7 (ORCPT + 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 ); 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 To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nikita Shubin Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, Inochi Amaoto Subject: [PATCH 0/2] perf: add T-HEAD C9xx series cpu support Date: Tue, 16 May 2023 10:37:12 +0800 Message-ID: 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+wiWaEoCJ9nwnT6gujb5sjuOuLakiEy6XhbRpoBhYQWs9hA3zrQeYRsFevydREE9fVt2csfbq1sDZCjHSRIspa6Cw7jfPJkwfJnj9C6hCNnsbC/uv0vNq6pPq3WDEVX9h7LVQceTtTByOD0ZR3Lo9aR8QCHtDoDClOOks/fW/KYDB8AWNNOG9sf7URpxJCmENGvBzzndXoAskqpziwX4D83vVaoJGYJ2NFrAqetbUHV1N+N5a76QbNDJjN3ggy5y0cqciI12melYXzdOoyUxDvxIAQGG48uwBctZUqWh71JdjOaMtzqAbSWIHnwP47+T6cnJaoYYRW1epJm+OIf+3f+Eh0hDMyokZIVrYDxnw48orT9vxl/Skn6b4oph0zk7HObvsi+MOGtw9oG+l32XBiEb+1NYAgSUNVff71Z4jRWgw0RsrNVokV24J4t0lfAuVEnX0gQYix6Pv7G4gCOOeGVhpOpud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0SH4rfU?= =?us-ascii?Q?zr92kWpoAULiD6CR8M6c7xUIIzaUhmV++pldAzs4FsLd8/GarLG1/b/h4xsw?= =?us-ascii?Q?KN6/Ysu8nOo5dG5z5sICqH1r21/0ccRvVxL3pgqdfrZ/YyVqFNRJF/s+NyUK?= =?us-ascii?Q?jogo8uS/dnd/tlLmCu4xZmYZhE2AteoAKPGnMP7vmv7IB7FxyQJ6r0/6mVk?= =?us-ascii?Q?=3D?= 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: X-Mailing-List: linux-kernel@vger.kernel.org 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