Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp727045rwd; Thu, 15 Jun 2023 00:53:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7yDH3SeaWhGEYCh9rn5S6n1Ws1JSNZdeS8BuAnjO288lvrXDRcgd0XxiL5W3P1dz7XA4FR X-Received: by 2002:a05:651c:156:b0:2b1:ee25:973f with SMTP id c22-20020a05651c015600b002b1ee25973fmr8196141ljd.39.1686815594651; Thu, 15 Jun 2023 00:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686815594; cv=none; d=google.com; s=arc-20160816; b=H0/24IXND0sCZpv+zPFPb7LfmsDXLpIkvRE3rizlTx5t9Muqvry7pfRLJJtM4vAQ32 XiNDJzwYuFH8n8k1rO8bIiZKhXnRrvS5loj7KWIsWWQq6UFKT5Y4injgqUYh7vo2kbW5 zjJswQgMiFApYE0TO66zqa4aqjNf7it1wQITVVSIDPt76cj+euREUm8Tuflhe3Jex9CF YT0qFo++YJNd4u038bDE5wWdi5bfYFh1G8MiR9WAwawfbPv3qblF9ZfEOKqVCL2MvFNW VmhiFoUrh3JYBM0U6kRiCpPlm3fZkdHL8DtFvO+mV5i6jPHXCInuAAZjIzc4tm3qhZgp KbKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=J/vBrq2idu71QysVAiqePUwlYHTtycTNGhzafCR0Azo=; b=IK3qmJE4XlCRLH+kaLvFHXWjKnZZq4MCyfVp3GlI/gmKKPDmXS7FhFHlEFvBp2FTLh mxJurrCCIzLTUJHBt7FQgC6bec4XHLV6q9jIoXTN59D6eQGhfJ9w6a89xPySqvQ+p3oq p/q5SozccTYtXWOOOZ+NJVF006sZhVT2KQ8Bv6jG9HKzLror0awvfg7LRBttBKoFWDMb eODZeF1sRo3eBYbfpVc+2ELvmfAOivQsgJzW5H4YIbrpHxOSbeOra1HAnddh1OaatwAA wpuNZN0QkXSFoObMVZ8kLpMMZPxE9L6jru1xoVcgdVn0GIe8/1Z+YswnQhxcPlg6FblG XQGw== ARC-Authentication-Results: i=1; mx.google.com; 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 m6-20020a056402050600b0051897d0fb5fsi1728086edv.535.2023.06.15.00.52.49; Thu, 15 Jun 2023 00:53:14 -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; 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 S244420AbjFOHZ5 (ORCPT + 99 others); Thu, 15 Jun 2023 03:25:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243228AbjFOHZy (ORCPT ); Thu, 15 Jun 2023 03:25:54 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF594DF; Thu, 15 Jun 2023 00:25:52 -0700 (PDT) X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr X-GND-Sasl: alex@ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id BEB99E0004; Thu, 15 Jun 2023 07:25:45 +0000 (UTC) Message-ID: <6d9fefd9-472c-b8d3-d871-b81bfdbe4f6d@ghiti.fr> Date: Thu, 15 Jun 2023 09:25:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2 04/10] drivers: perf: Rename riscv pmu driver Content-Language: en-US To: Andrew Jones , Alexandre Ghiti Cc: Jonathan Corbet , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , Anup Patel , Will Deacon , Rob Herring , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org References: <20230512085321.13259-1-alexghiti@rivosinc.com> <20230512085321.13259-5-alexghiti@rivosinc.com> <20230531-49ed4c2054db0abbacd03632@orel> From: Alexandre Ghiti In-Reply-To: <20230531-49ed4c2054db0abbacd03632@orel> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 On 31/05/2023 16:09, Andrew Jones wrote: > On Fri, May 12, 2023 at 10:53:15AM +0200, Alexandre Ghiti wrote: >> In addition to being more pretty, it will be useful in upcoming commits >> to distinguish those pmu drivers from the other pmu drivers. >> >> Signed-off-by: Alexandre Ghiti >> --- >> drivers/perf/riscv_pmu_legacy.c | 2 +- >> drivers/perf/riscv_pmu_sbi.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/perf/riscv_pmu_legacy.c b/drivers/perf/riscv_pmu_legacy.c >> index 0d8c9d8849ee..ffe09d857366 100644 >> --- a/drivers/perf/riscv_pmu_legacy.c >> +++ b/drivers/perf/riscv_pmu_legacy.c >> @@ -95,7 +95,7 @@ static void pmu_legacy_init(struct riscv_pmu *pmu) >> pmu->ctr_clear_idx = NULL; >> pmu->ctr_read = pmu_legacy_read_ctr; >> >> - perf_pmu_register(&pmu->pmu, "cpu", PERF_TYPE_RAW); >> + perf_pmu_register(&pmu->pmu, RISCV_PMU_LEGACY_PDEV_NAME, PERF_TYPE_RAW); >> } >> >> static int pmu_legacy_device_probe(struct platform_device *pdev) >> diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c >> index 70cb50fd41c2..3b0ee2148054 100644 >> --- a/drivers/perf/riscv_pmu_sbi.c >> +++ b/drivers/perf/riscv_pmu_sbi.c >> @@ -897,7 +897,7 @@ static int pmu_sbi_device_probe(struct platform_device *pdev) >> if (ret) >> goto out_unregister; >> >> - ret = perf_pmu_register(&pmu->pmu, "cpu", PERF_TYPE_RAW); >> + ret = perf_pmu_register(&pmu->pmu, RISCV_PMU_PDEV_NAME, PERF_TYPE_RAW); > Should we include "sbi" in this name? I'd say that it is safe to do so and I understand your point, @Atish WDYT? > >> if (ret) >> goto out_unregister; >> >> -- >> 2.37.2 >> > Otherwise, > > Reviewed-by: Andrew Jones