Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2134697rbb; Tue, 27 Feb 2024 11:38:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXMbJD70yVQVq85Wv2f+l24U9dxKU1UL2ozyDzjU6XgRHYuoMcyymQf8vjCOaxWryRuXU1+2Us4tUmrOD6sV6nURoUEsLVeUGNLZbM9fQ== X-Google-Smtp-Source: AGHT+IGsr628mpY5FQpYoiG9TSpgwpSEoRvrj8UYHD/7HqonCqYIhpEKNkkveWVpcWLR+oho1Rvs X-Received: by 2002:a92:c201:0:b0:363:d96f:6850 with SMTP id j1-20020a92c201000000b00363d96f6850mr12648129ilo.12.1709062734314; Tue, 27 Feb 2024 11:38:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709062734; cv=pass; d=google.com; s=arc-20160816; b=ut9+knbY5QRm+Vp/Yea8d070yOoR+fhfnWa1aAJv8jjSABFu0vsAUqtzFEB+Vtukyv zbq3+tIK6Ci4V+HohLzPZ83dOqwpPpAJk5KDQuFVm59NqSm+JNwMWKWuALo0pKqLZTB1 zklyhhJXy+ancq/pVaA/jUSPDMU3SFVRd2nlzqDSoi5bq52f4cCIU3lzJZRzaqQyRNbI YBEFQ5gjWappfJTNA27ThEvNUd9kXy+tTJFBGrrCThWeQA22XjJvXyMo/hItL3ihNf4B e8QNHnPL5Hzg17ZrJnPHJzgiAF3gtLje4Zlh0Sc/BPTGPdtISvgBJdyYQewCEUsv6TIU loRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=LucrJ2hdQw48B/ivKoND/zDfb0FYpv522KgTT6PocJA=; fh=5N69phCOK078FRAW1dTvsvfmzDc2x4kX6P3VEIeCY64=; b=YXLh0umCexcvpscde+tXY9/XjVx3QzQR10GzwkAqDoFMJfTUvFYbVrUT6UCE9UHLRS TDNe69kOdi1MDnsaMPn+URSAXvPhOocdfRkdo04Ubbs/5rQD91WfIryYvBm2MvOBeP09 EtrVqMHM/o/vKeFoyyClURzBbM0XHTyLl34Y7NuEtFgFbAaRUe33bvBsO3Bij2+DUY/p XB6xTTfo9p9g1bUkZfr+/c0CSRKUioOxAlQbFu3rZ2yug6QKg2CgQciyppr553Knswwn 9HDURLmw21zw7TcaMHIDl8QRT/tSpjoJRrdQ1l3t5DbTkjO2iXT3meYf6KGOQKdzLuFj EuLA==; 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-83941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83941-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 t67-20020a628146000000b006e53cc5c51dsi2694965pfd.144.2024.02.27.11.38.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 11:38:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83941-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-83941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83941-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 066BA2851C5 for ; Tue, 27 Feb 2024 19:38:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09F1F136647; Tue, 27 Feb 2024 19:38:49 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 55120524CF for ; Tue, 27 Feb 2024 19:38:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709062728; cv=none; b=G2bmTfTLcAF1PGWOd4gK76az22YlzzPyfP0E005UYVANa+3I7Gol+sZxZeVjlAhKJdOWyA6NrsclJn1fHpuvWuBQ49rnSrc9fqeWRL30TILGIe7FqIKf4kEBTYGGwdW+IAs56n7H1IfRMz1O9ZrnCZLoAPOQXGA9Q323t8XwqA8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709062728; c=relaxed/simple; bh=RDreJQoMpwk05ss0YoyrFEnP7lI9JQ3wxRPl9qk573s=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=bQqIK00ORt7fIayqyiUzkXFrpn5yRlx5jptFbwLqArh8URLCwvCjh70elIMkEDZ5JIGh39SlhQHLDWfTfjITU+3I96s9uKF1M3KRs0GHB9l7itJqogUvSUzDTMj6++42z3pFqTe6EEhcXgWXM5oCtfsjSm+nI8FfwW2yRPVd6is= 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.199 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 8D074FF805; Tue, 27 Feb 2024 19:38:40 +0000 (UTC) Message-ID: <1860a754-5cca-4411-904b-ecbe838efa77@ghiti.fr> Date: Tue, 27 Feb 2024 20:38:40 +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 From: Alexandre Ghiti 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> <6ad96656-3cf4-4e22-8a18-cfde5c31cfc1@ghiti.fr> In-Reply-To: <6ad96656-3cf4-4e22-8a18-cfde5c31cfc1@ghiti.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: alex@ghiti.fr On 27/02/2024 20:26, Alexandre Ghiti wrote: > 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): FTR, b4 indeed complains: NOTE: some trailers ignored due to from/email mismatches:     ! Trailer: Reviewed-by: Atish Patra      Msg From: Alexandre Ghiti > > 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 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv