From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6793C7EE23 for ; Wed, 31 May 2023 13:54:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PSwGtLYvXanTfFN9uZnpOtydn7oGZP4XOeyt6vGyvOc=; b=eqy0NF7246edWq zZOt7hg3Oupfwk2fkwdI4qafKlRSh7qUiFy17z4JrMyXIRTPNjR/DrsARWoHi1uu8uRZiEP6aiPRR pxrzTQ95tydwrA0Ot1xVh0mtzLlV9odxJ4PX3Xf98OMvEx1GNUL0OdXuMt/VH5HoyjvUt7wJln2JU fbqI3eJjdvP+4g29q7m9XrFtQ/UFj/MnhzGRcLnk0ywKVWqEEdCjy9klf+KlCz5VV9GKj+BajiNUl KXvpArTddOWiHU/G4H5a/dTBO7iCEptDoV6c3EB99XenN7CaEYQXFg8D3fWLfOXT6ZzFUIqNZS7Za gYUJU1PlpO+xuTE+m6oA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4MHF-000333-2l; Wed, 31 May 2023 13:54:13 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q4MHC-00030z-23 for linux-arm-kernel@lists.infradead.org; Wed, 31 May 2023 13:54:11 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-30aef0499b6so2596731f8f.1 for ; Wed, 31 May 2023 06:54:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1685541249; x=1688133249; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Zbb0XlzY1V6un7ssRQbevCYzvMDnOinL05UrfKmM4xc=; b=C6P+PAcESg9pjJuC1kShZkAMK9uNCuZZC59NjruVdLAT+QbK5Fb7OyTaHMvt9uPzWB XC6YjFkU+s1LzKNcLemCA5UvlagHiacGzTfiM/R2e6hfVvlyHtQgvcdf+G/89fBAyaFn al95wHlokLtDX33yAGCyGXGWNp+6upvH+JRfhP/MfAomjpj7ykZGP6APMEFunMG6Um4A Q0GkFyAbz3+Gec81W0jn0DXHKIAfGHWPlMPSF60xf9udnMyIdlRQDSu26bSGscPRElke Ee9HUot213bm0c1us5iqLgmtj9PemzfMxCRv29nNkaPrcub3t3g85duWFbefmqdgiqmB Q95Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685541249; x=1688133249; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Zbb0XlzY1V6un7ssRQbevCYzvMDnOinL05UrfKmM4xc=; b=keOECtb+Jy3BBx0/BwCQbkYjkG1ytZk0519u0PpNa6SNxb3qbqNJut8ddoJ9aEKW5E 6Q6/5Gv8HkhPGL1ofNwI3AM62WIqUjgMng5YqTQriTSjiveUXAKUuzFpyGh4YewueG/e 7joUs0JsUjFsxS1YhyYLYA/dqzm2UQtUhxaWisKr2XFM0/3pHIxewN3Q2UiXKcImxLZX DoObYH3hZZFHy6U0zZvBah7s80nOIJ5r3dI7gRTXs9XX6bhB3lDZtcfr+0KnFZo5NUgK Veh2CE4pxkbpIjsP7vOV5l3hoIov2bd/G4pJybkkx+8ytJFuq7rZs4CLcawz69hNd8TH BafQ== X-Gm-Message-State: AC+VfDzjhY9UgGko5l52Oz/YHuIFT3IC+rkB+t8PPRbE1OnyHnAVr5A5 j+JncLCKcwZ03TA+PDPkwFH3pw== X-Google-Smtp-Source: ACHHUZ65HnfYl06bZQf8YF6kP/w87wKf4hufmXMk6i3aLTcwxJQjR5kyaJJ5JQgRjhi7bOY5IOdgjg== X-Received: by 2002:adf:e848:0:b0:2f0:2d92:9c81 with SMTP id d8-20020adfe848000000b002f02d929c81mr4030977wrn.19.1685541248998; Wed, 31 May 2023 06:54:08 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id i16-20020a05600011d000b0030aefa3a957sm7021247wrx.28.2023.05.31.06.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 06:54:08 -0700 (PDT) Date: Wed, 31 May 2023 15:54:07 +0200 From: Andrew Jones To: 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 Subject: Re: [PATCH v2 01/10] perf: Fix wrong comment about default event_idx Message-ID: <20230531-5678beb107af4b9805cbb611@orel> References: <20230512085321.13259-1-alexghiti@rivosinc.com> <20230512085321.13259-2-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230512085321.13259-2-alexghiti@rivosinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230531_065410_685329_0AFA5F18 X-CRM114-Status: GOOD ( 21.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, May 12, 2023 at 10:53:12AM +0200, Alexandre Ghiti wrote: > event_idx default implementation returns 0, not idx + 1. The comment was correct until commit c719f56092ad ("perf: Fix and clean up initialization of pmu::event_idx"). I'm not sure that warrants a fixes tag, but maybe a reference in the commit message. > > Signed-off-by: Alexandre Ghiti > --- > 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 */ > > -- > 2.37.2 > Otherwise, Reviewed-by: Andrew Jones _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel