Message ID | 20230703124647.215952-2-alexghiti@rivosinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp506402vqx; Mon, 3 Jul 2023 06:04:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlGnoNkzmbROnHNHajFDbapTNtGqr14HCMJSPIFwXIhEIxvfkNLqfWIu0YuH2lxUt8QrxWEh X-Received: by 2002:a17:90b:889:b0:263:204c:3c80 with SMTP id bj9-20020a17090b088900b00263204c3c80mr11855950pjb.4.1688389467013; Mon, 03 Jul 2023 06:04:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688389467; cv=none; d=google.com; s=arc-20160816; b=dPgG4IQ+LsiZ9V8nbwnMEGS92tIXb75h7hTHo/O/E5pu8nPL3EGugzhjZszJ3xK77l lcNDw27FkNqZvGMfX9DxhsPVDE1DYgfAiKzDcaovlK21tNCzThd9q9YQU3O6+9Xhvxii j7mAXUM830fkmuThreO6E0A1c0nRlis9DsXGd8Wpy2ht1gXBz0yD/4XOknmRm7g2yOH1 M1XINDCBl5rXyPCvjzu30Rj8tMt4KG3BKppOZSMFWvmMHClAMTpoYT7aUqVGwVZE63dU ZiIS5PZLXKEems8zT/3DEjhadlINB4hHoM19xyeCF7nZjeTshvCpJ29agfed83ANV4HY 0lLg== 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=YVY/yta8MPWmg9iGDhd2QZ8qAlvFNnDO2cXvkrgJQ+E=; fh=VoQtphkyp1h+kGu6pCIzY/INB1mer40DkWxg4dsVYHk=; b=chgMANxST6iuNlxPOn7d7W99xx2M7I62WiiugyxypJzVYbV8NNraoAdjbegjx3T1Uc aSoJWvw/0n3oxxNItw/ckykV8Uwg/Ihh+lsLArZdE0feDJtTkZ7fVrSi3IXCToDQvl7m 8uB7cscRvrTV9UJzG8zNff5/788Nr0JR+2IBeezul1ppm5i+x5C+A04ajyl6HNshRRcX wwvyXe/m29IItejt7W/2dLDju3E2RuJOAhaoh16SnsmWxGC71AWAe7zbOSi/DZTQgoi/ FnZEtr5CO9CLZujAW9j31GShk9q00CmS7jgu5uKVQfsaEVc6zxXS/gJbair2IqHqG39b PcFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=QlE2Iqus; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp9-20020a17090b4a8900b0025945de4165si19281004pjb.141.2023.07.03.06.04.12; Mon, 03 Jul 2023 06:04:26 -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=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=QlE2Iqus; 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 S230450AbjGCMsB (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Mon, 3 Jul 2023 08:48:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230429AbjGCMrx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jul 2023 08:47:53 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E8ADFD for <linux-kernel@vger.kernel.org>; Mon, 3 Jul 2023 05:47:52 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-31438512cafso862144f8f.2 for <linux-kernel@vger.kernel.org>; Mon, 03 Jul 2023 05:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1688388470; x=1690980470; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YVY/yta8MPWmg9iGDhd2QZ8qAlvFNnDO2cXvkrgJQ+E=; b=QlE2Iqus6AP6Te3dv3Y5Sx4aMQ+r5SKgwVSpZ0lVhlvFOkGw0WYXtGXIyYV13AdXyg BF50w/diT8Np6DqNMws/6d/47CDoirkmcKusK6cN3dPFI2VGnUd9hAmyNYSlA4poktO+ eBlIbLnt08K37EodkyVat6+liUHZWpeoQatiE5O/3ceBUMebG7p6wzso8g68vqx48QeP Q50WOmsmdac9sn01EhF2WYiEkGFTwOTVO9QCJi6lJY9lnNqqXeQk/4wQoS1+c5EPLsLm ycCf9vXUK/7Q3fhEEM4/FDM3oJBppGTNdLj8CelDbYB3NzmZu/AEwfXT3hZ6/haUCtRa EgeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688388470; x=1690980470; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YVY/yta8MPWmg9iGDhd2QZ8qAlvFNnDO2cXvkrgJQ+E=; b=G0LtnkXgZAJtcpJDQsEDynJmbRw7J3Vl6I9MQHpJlzFMSw0kDGN15QiKnwVSLCfh1B LbamLziNAMe5Rc/5zZVtx1WUFsxoG3dqtnc+uDSIpMR+ibkJ9hUXFTYiVNACxvCb0Q5H F9m5AyrvuaqYyKF2xvbdxSXF92Rxa9hqtaB0kbxB66AZo8b/8FQ+/krZzfW5hj2tOMh5 W3X6I5xju8pWCf4BA6ayKVNpbmUuQEtB/i8RImp2LlUoyRphTixCNH0Ls6rO45QiY/KX PdYbrMu5vRHNb4PgBp5KELxosr8Q8cS/KU8SuuCjHhK/pYVwgmKZ1SNHIC1kYzI9rdWD U5Wg== X-Gm-Message-State: ABy/qLYoaNpRMoBvg1+j9M6FFG55wYFbIrsLq31hnF9vKQ94828ScRjM Iwvmv0Pzka32IxHhtCHiRHZ9GA== X-Received: by 2002:a05:6000:124f:b0:314:3746:d44b with SMTP id j15-20020a056000124f00b003143746d44bmr2701847wrx.41.1688388470517; Mon, 03 Jul 2023 05:47:50 -0700 (PDT) Received: from alex-rivos.home (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id v2-20020a5d6782000000b00313f5babb18sm19568022wru.9.2023.07.03.05.47.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 05:47:50 -0700 (PDT) From: Alexandre Ghiti <alexghiti@rivosinc.com> To: Jonathan Corbet <corbet@lwn.net>, 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>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Atish Patra <atishp@atishpatra.org>, Anup Patel <anup@brainfault.org>, Will Deacon <will@kernel.org>, Rob Herring <robh@kernel.org>, Andrew Jones <ajones@ventanamicro.com>, 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 Cc: Alexandre Ghiti <alexghiti@rivosinc.com>, Atish Patra <atishp@rivosinc.com> Subject: [PATCH v4 01/10] perf: Fix wrong comment about default event_idx Date: Mon, 3 Jul 2023 14:46:38 +0200 Message-Id: <20230703124647.215952-2-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230703124647.215952-1-alexghiti@rivosinc.com> References: <20230703124647.215952-1-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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?1770404673658711328?= X-GMAIL-MSGID: =?utf-8?q?1770404673658711328?= |
Series |
riscv: Allow userspace to directly access perf counters
|
|
Commit Message
Alexandre Ghiti
July 3, 2023, 12:46 p.m. UTC
Since commit c719f56092ad ("perf: Fix and clean up initialization of pmu::event_idx"), event_idx default implementation has returned 0, not idx + 1, so fix the comment that can be misleading. Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> --- include/linux/perf_event.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index d5628a7b5eaa..56fe43b20966 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -442,7 +442,8 @@ struct pmu { /* * Will return the value for perf_event_mmap_page::index for this event, - * if no implementation is provided it will default to: event->hw.idx + 1. + * if no implementation is provided it will default to 0 (see + * perf_event_idx_default). */ int (*event_idx) (struct perf_event *event); /*optional */