Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2129841rbb; Tue, 27 Feb 2024 11:29:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVI1BLyBlZxm3dyUHkkSxa0+MOPUYY26PtUbHCcmRzTUTH0Mm/KmfCaeRCktWA3XxujnFGDQRSq+Lc5H/NReuf7z9CYOpeqJnNQCtsptw== X-Google-Smtp-Source: AGHT+IGxDgxt/zA6NaZm6BEc0k7RFxr11mDXUvdQJm8pBJYWoCUwmLm94qo7mgrv48lK7D6Z6NY+ X-Received: by 2002:a17:903:22c3:b0:1db:ea2b:d2c4 with SMTP id y3-20020a17090322c300b001dbea2bd2c4mr382944plg.15.1709062154942; Tue, 27 Feb 2024 11:29:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709062154; cv=pass; d=google.com; s=arc-20160816; b=QxJs5djUMPFgDr3nCDjRb/leJMbWL/NDawTn0KtrE2klOWPXGms5Q7LWuVx3pS2O8J 846Gel22cL0XbLyGEz9vDGpKaZRSpEJtPR/YpeY1+XUyWGvT/DyDW1Xyg8UQb3jBWT6L +nnp7+AsXxgX06pO7D9bJjtosb/XChquifTW+b22ttpW3YXYizHNlLsO/1oMyMfqCx+B DMdy5wW8zl7hW0h5jhDDa/rOzAH9uQrhbImbGwKvJiKy6gAXdQz16mb+Y0K4Hci1r1bG aJxdvpzOTG9rikj1yInSvjr4ectBCSQTfScln15vFl8nA4LdjICvH6OChGDMZ3CW+Y8f KdVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=Lphrp+RnVPo590WiKdaUazSjVdZFQs0jltEyfKbCj2Q=; fh=5N69phCOK078FRAW1dTvsvfmzDc2x4kX6P3VEIeCY64=; b=dpMzUefE5BaweK/2019V8wfOMnvuc0JgOI/oCmE5h5LbRN05DQqjQqMTxhOF1L1ugS B3iAHl/ys2mmX4R1xS5kYuAVOou5hO1KtHvl6yBo/IBqTGW0/1wss4OxM9FLWULvfliD rHQo0PeLOCAZwwpDb0+E7LU1mL9R18GtL2bkgRlrcV2lM9sVPM8TuPXMBs5eaUJAQB6s H/8fxcx2SJKS40aWEXsvXXmRuRenr0reXyfdLfSKCLUlw6/Ram8S07V2qIdEJb2Dpi+Z WRRAEdKkkhVOLa410WcNKot+5ABiauYMfKJx9nmJTATndcGW9SvQyPc6QxVs1vJt8w1X Gx0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-83925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83925-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x15-20020a170902a38f00b001da2316af2fsi1788002pla.7.2024.02.27.11.29.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 11:29:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-83925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83925-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AB4A528F6C1 for ; Tue, 27 Feb 2024 19:27:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B71151C33; Tue, 27 Feb 2024 19:26:27 +0000 (UTC) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0C7A51C39 for ; Tue, 27 Feb 2024 19:26:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709061986; cv=none; b=G4SV+i4PVh1lfO6Fcd7bbQu9s17MXs95JVaIE1GM74zY/FUqMQ/rWT5eUPuDonOWSVXwrDNx/a44f6DVO6kADaeNMoIosBulwYpxDlb9kCUHJSAPj8x9RkjeT/585dUkqXjYZVg7XjU9bvnHXE+dEL7TY5c0mwoTDPgHi7lwRqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709061986; c=relaxed/simple; bh=Y7Y/Eiw2mvsSNuBGTBYBtsyJF48ih4wqxvZpHIXyRlU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qAPR+fXqLKS4/hG9t3IHouFPe79vFJ1LeThpTF6+efpnejh8NZhy79CA4IVTc4r9p6S/Ft4HDtFUAFuwtwIVrovUo2CUuF472MnNEJuqNkKXquBrwbM/0kIGZ3Q1pICE+M06tg7lM82Df0rafp7Vmecnm+uo50nyuPi7SYGVH6I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id B920E1BF209; Tue, 27 Feb 2024 19:26:20 +0000 (UTC) Message-ID: <6ad96656-3cf4-4e22-8a18-cfde5c31cfc1@ghiti.fr> Date: Tue, 27 Feb 2024 20:26:20 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2,RESEND 1/2] drivers: perf: added capabilities for legacy PMU Content-Language: en-US To: Vadim Shakirov , linux-riscv@lists.infradead.org Cc: Atish Patra , Anup Patel , Will Deacon , Mark Rutland , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Atish Patra References: <20240227170002.188671-1-vadim.shakirov@syntacore.com> <20240227170002.188671-2-vadim.shakirov@syntacore.com> From: Alexandre Ghiti In-Reply-To: <20240227170002.188671-2-vadim.shakirov@syntacore.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr On 27/02/2024 18:00, Vadim Shakirov 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 > Signed-off-by: Vadim Shakirov > --- > 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 79fdd667922e..a85fc9a15f03 100644 > --- a/drivers/perf/riscv_pmu_legacy.c > +++ b/drivers/perf/riscv_pmu_legacy.c > @@ -117,6 +117,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); > } I see here that Atish added its RB: https://lore.kernel.org/linux-riscv/CAOnJCUJ-eE+zbXH0yBX_QBK2ep779q=wNCSrc+BJfzUb+zBCaw@mail.gmail.com/ So I add it here (hopefully b4 won't complain, I don't know): Reviewed-by: Atish Patra And I'd say the fixes tag for this one is: Fixes: 9b3e150e310e ("RISC-V: Add a simple platform driver for RISC-V legacy perf") Thanks, Alex