Message ID | 20231205092555.35617-2-vadim.shakirov@syntacore.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3308711vqy; Tue, 5 Dec 2023 01:27:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/oqQt0Sm6O7U4famGfD5y8sEVI1y5KYM2/m9pn8CRixTU+u7GgQCbutsuSHWKhUe2ACU2 X-Received: by 2002:a17:903:24d:b0:1d0:6ffd:835b with SMTP id j13-20020a170903024d00b001d06ffd835bmr2907618plh.102.1701768425246; Tue, 05 Dec 2023 01:27:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701768425; cv=none; d=google.com; s=arc-20160816; b=E3ExtkHzxCRawIFSmL3O5bunwBymbLOHHd/4BH8zZa4GA6Zm39gjEe1FeC+diZB34k z7ePSHNd4yWG0Em/0zG87bUM2HSdPLs3NL3uxLqUH1uvPiBespWMhd6sQwlm/Bxpo3j9 HOlSkBkiNNJbl+EBbAxr3q2FSMX25diE8Yr+Pgrrsj4093CdVjANeo/vXxe0fHkMqCp1 rZWy5QWU6hw1qhCf1RQwaBlXSJtoF+Y6u6r2K4RnN5n8oNhoaanVz6OvLzIa8DtdZDkt GKuaXyrNu/wejG4BmeQU8GNmomRlJ1pNW4C7wf6fFd5/mZ9NmxUs72XcqIaQTYmiplg7 Pm7w== 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:dkim-signature:dkim-filter; bh=KfrrOaxwH0SW4+l9ufl40h36vnN/7a6MQbhAMTM4iK0=; fh=ZJYsNduMG8UAwH0Qq0QxhUxILqY66Z4QSQbOj/RiE6E=; b=LWLQ/0gCaBySHInHgbML1r9TRqa9buEZ89BwjeHWhkI3LyWVja/oVeX6PNAsTDmj9l gHPd6y39wbFZ0FDTXESplIn0m4wWipj3WY4fLMsPUFJ9jFAHUR4At/2gyoHbSzSIcAzi Zzv8lb3WmtIzbR2xHTcnurfZNx0cHrYoA9B83TIpG9wcRa9Tgu47r89FHcdhqLNdlAw/ n3wk9+/FSEFi3p0PU3qtsGeVaue2sRn+n55XwbjBW3licbUz9+0KN3hPrjnikoaAVA6Z fE57hMmpQumncO8NvJ135LO6JxRnrI5aGusPzPsOuSga/aWnJhv9qrM8sm9lxvUVKxLZ LJew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@syntacore.com header.s=mta-04 header.b=Nzyn95L0; dkim=pass header.i=@syntacore.com header.s=mta-03 header.b=PJfYgTgf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=syntacore.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id e12-20020a170902ed8c00b001d08c8e5115si3975334plj.237.2023.12.05.01.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 01:27:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@syntacore.com header.s=mta-04 header.b=Nzyn95L0; dkim=pass header.i=@syntacore.com header.s=mta-03 header.b=PJfYgTgf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=syntacore.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9E71880B1836; Tue, 5 Dec 2023 01:26:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231834AbjLEJ0q (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Tue, 5 Dec 2023 04:26:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbjLEJ0n (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 5 Dec 2023 04:26:43 -0500 Received: from mta-04.yadro.com (mta-04.yadro.com [89.207.88.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 566DC98 for <linux-kernel@vger.kernel.org>; Tue, 5 Dec 2023 01:26:49 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 mta-04.yadro.com F310FC0012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syntacore.com; s=mta-04; t=1701768407; bh=KfrrOaxwH0SW4+l9ufl40h36vnN/7a6MQbhAMTM4iK0=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=Nzyn95L01DWqMe66VD4dfGJiBUbIvWFv7soLnpcOVJfOYV0OASs5taow3dJ+QbY8T hAWKRDA1uKueBZt59xqREHO9ejuaeU5JKMvbB8Xub2dyCaiL7ZCkRHuVPfeKcKZiz3 MSTkvZFuH/6g/fnH/X92FfQDQcVlPcK94c4JJwqbtFSmUSWJ/TejYwdk5lYepj4x/l Xq1NZnTkFjB1w4uIR7xuOzDNE4q81yVY7S3WvTUpsnS7BRQ9q8u8+pzMIn7Hs5j0TX s+1eY4MDnAxgjQ2blv7KCBBdH15fkPSIhnq8ZKdju31KncokSCFcwmCoC1MCcHJnlQ Ey5tiESAnu8NA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syntacore.com; s=mta-03; t=1701768407; bh=KfrrOaxwH0SW4+l9ufl40h36vnN/7a6MQbhAMTM4iK0=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=PJfYgTgfmnYJvj9cmQlFOQkV/k5cGatNDFRqynyCqu6Cq+BzbGiKVUe+Npbsxkp6a zEauUV7gsIOZZgQAlLkRr2X+eMfO4bgaukqbNVfkSeRK/NslMgjCU5mWOvJ+oqBPhJ qn9J1A8YIrGs2ndCOG7Hlrz1dA1t7oFqizsGEbLyN5UZUCp5oRm1jnCh6rX4lO81Bl 7kCqzh+copb+ggT96UxKVOxcYbegEHYn8K3Z9rfft54zaCQwH835SUOiTMrDoPmnaT JRPnn4fzr6Jw0AnBgVcwxLRy0QzSlSY1jeDz1hQSxcBMaZKaaPKLUHqLVxu0Wqrsi9 GNxAwFkQjL+Jg== From: Vadim Shakirov <vadim.shakirov@syntacore.com> To: Atish Patra <atishp@atishpatra.org> CC: Vadim Shakirov <vadim.shakirov@syntacore.com>, Anup Patel <anup@brainfault.org>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Paul Walmsley <paul.walmsley@sifive.com>, "Palmer Dabbelt" <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, "Alexandre Ghiti" <alexghiti@rivosinc.com>, Andrew Jones <ajones@ventanamicro.com>, <linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH 2/2] drivers: perf: added capabilities for legacy PMU Date: Tue, 5 Dec 2023 12:25:55 +0300 Message-ID: <20231205092555.35617-2-vadim.shakirov@syntacore.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231205092555.35617-1-vadim.shakirov@syntacore.com> References: <20231205092555.35617-1-vadim.shakirov@syntacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: T-EXCH-07.corp.yadro.com (172.17.11.57) To S-Exch-02.corp.yadro.com (10.78.5.239) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 01:26:58 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784433528454394279 X-GMAIL-MSGID: 1784433528454394279 |
Series |
[1/2] drivers: perf: ctr_get_width function for legacy is not defined
|
|
Commit Message
Vadim Shakirov
Dec. 5, 2023, 9:25 a.m. UTC
Added the PERF_PMU_CAP_NO_INTERRUPT flag because the legacy pmu driver
does not provide sampling capabilities
Added the PERF_PMU_CAP_NO_EXCLUDE flag because the legacy pmu driver
does not provide the ability to disable counter incrementation in
different privilege modes
Suggested-by: Atish Patra <atishp@atishpatra.org>
Signed-off-by: Vadim Shakirov <vadim.shakirov@syntacore.com>
---
drivers/perf/riscv_pmu_legacy.c | 2 ++
1 file changed, 2 insertions(+)
Comments
On Tue, Dec 5, 2023 at 1:26 AM Vadim Shakirov <vadim.shakirov@syntacore.com> wrote: > > Added the PERF_PMU_CAP_NO_INTERRUPT flag because the legacy pmu driver > does not provide sampling capabilities > > Added the PERF_PMU_CAP_NO_EXCLUDE flag because the legacy pmu driver > does not provide the ability to disable counter incrementation in > different privilege modes > > Suggested-by: Atish Patra <atishp@atishpatra.org> > Signed-off-by: Vadim Shakirov <vadim.shakirov@syntacore.com> > --- > drivers/perf/riscv_pmu_legacy.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/perf/riscv_pmu_legacy.c b/drivers/perf/riscv_pmu_legacy.c > index a179ed6ac980..fa0bccf4edf2 100644 > --- a/drivers/perf/riscv_pmu_legacy.c > +++ b/drivers/perf/riscv_pmu_legacy.c > @@ -123,6 +123,8 @@ static void pmu_legacy_init(struct riscv_pmu *pmu) > pmu->event_mapped = pmu_legacy_event_mapped; > pmu->event_unmapped = pmu_legacy_event_unmapped; > pmu->csr_index = pmu_legacy_csr_index; > + pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT; > + pmu->pmu.capabilities |= PERF_PMU_CAP_NO_EXCLUDE; > > perf_pmu_register(&pmu->pmu, "cpu", PERF_TYPE_RAW); > } > -- > 2.34.1 > Reviewed-by: Atish Patra <atishp@rivosinc.com>
diff --git a/drivers/perf/riscv_pmu_legacy.c b/drivers/perf/riscv_pmu_legacy.c index a179ed6ac980..fa0bccf4edf2 100644 --- a/drivers/perf/riscv_pmu_legacy.c +++ b/drivers/perf/riscv_pmu_legacy.c @@ -123,6 +123,8 @@ static void pmu_legacy_init(struct riscv_pmu *pmu) pmu->event_mapped = pmu_legacy_event_mapped; pmu->event_unmapped = pmu_legacy_event_unmapped; pmu->csr_index = pmu_legacy_csr_index; + pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT; + pmu->pmu.capabilities |= PERF_PMU_CAP_NO_EXCLUDE; perf_pmu_register(&pmu->pmu, "cpu", PERF_TYPE_RAW); }