Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2093845rbb; Tue, 27 Feb 2024 10:20:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXDdGiSNxTdgnOUso/2FvS1NW9mhlgzpm8wsOSppRQNgHn63BgURi5pNTgHmAAJfuZNk2MQGSbPT1hhCk2F7JXZG0QT5t9q1YQbObHqag== X-Google-Smtp-Source: AGHT+IGzxK5U1y46nlxvmp9AgzzDDUWxnKjPHY8GSFFtvYvq/5cBiKuszfx8xXGjCM9HEWT5D3ZR X-Received: by 2002:a05:6214:3005:b0:68f:e7d3:95d8 with SMTP id ke5-20020a056214300500b0068fe7d395d8mr2575514qvb.20.1709058029283; Tue, 27 Feb 2024 10:20:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709058029; cv=pass; d=google.com; s=arc-20160816; b=SvcCQIWFJlIQmrLanPzFG81QvMaSznk4Vh88oXsMZbEG6Afwg8aX5FFMZC25rgrYY9 XcP3ilX93nFHWkl3alsiHJyRrr6k7UQvcHG76qjJ6aF7d1j3tArXcAbDjEKzGEZs8+A7 UrN7QD8e3/Fy1prmbShpBR48RFI7w2I1+11p5kSM1KJj+viOZBgAeqbcgunF57Ia3uKc DLUTX3UAnkncSiGgcPW0h8B8Nbx3pFdlM94u+6u1d9eCeap+uZVx1gfAOoVi/BlBYjOx CgAwcYnhSPYbQAvl4CuM8vMrg2JGgRmMeiGZy3o23P3rVlsPUjL3EFWCCzzFj15PgqXV B6uQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature:dkim-filter; bh=mczoY9NKf5IBt5T4Xh9ynOn0nMrRnFZ+wXSkQuHkLYM=; fh=GiuQLpP47Fx4Gxe+vA7zmxmm5objAsCwOHsMjIB74A4=; b=rmT9qx+akzBV/yE+HkxFF5jZRtNTdRyiDJApr6eWgVGz/pLmFGBuEx6nB96cuZwga5 228rY66ypUjepLCmo+F3faXVBr4ba66ktEBX9FcuTt53LCPNZsJuW9N6O4JsvIPB2m8n uwJyMFeXUq4qbm85qGtIBqgNGc4LB2Xxu9kDHqj+Dt8EjTbMdwZuHShW9ch0Q63R8sSK fM2gNm0/qbyS0vHJp5hgyX0w4AreN3lX0U7IUbGZJ5lRfF+ESGgA68/X3p5gKB0THVUB vFabpj/b69V556Y+3qV3Mf4vq1SwFk7O5sZ1SgVV39Bq+XjBzfB72pbqxdPUiLG4rlgU bcgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@syntacore.com header.s=mta-04 header.b="ss/rCZVI"; dkim=pass header.i=@syntacore.com header.s=mta-03 header.b=Ac+HUnNY; arc=pass (i=1 dkim=pass dkdomain=syntacore.com dkim=pass dkdomain=syntacore.com dmarc=pass fromdomain=syntacore.com); spf=pass (google.com: domain of linux-kernel+bounces-83666-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=syntacore.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id if14-20020a0562141c4e00b0068caccd5f77si8022290qvb.214.2024.02.27.10.20.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 10:20:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83666-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@syntacore.com header.s=mta-04 header.b="ss/rCZVI"; dkim=pass header.i=@syntacore.com header.s=mta-03 header.b=Ac+HUnNY; arc=pass (i=1 dkim=pass dkdomain=syntacore.com dkim=pass dkdomain=syntacore.com dmarc=pass fromdomain=syntacore.com); spf=pass (google.com: domain of linux-kernel+bounces-83666-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=syntacore.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5C7491C248D5 for ; Tue, 27 Feb 2024 17:01:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AA292CCD5; Tue, 27 Feb 2024 17:01:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=syntacore.com header.i=@syntacore.com header.b="ss/rCZVI"; dkim=pass (2048-bit key) header.d=syntacore.com header.i=@syntacore.com header.b="Ac+HUnNY" Received: from mta-04.yadro.com (mta-04.yadro.com [89.207.88.248]) (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 373C21D54A for ; Tue, 27 Feb 2024 17:01:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.207.88.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709053277; cv=none; b=uaHuesXcOS+dzvKlhNP7HKBSRYS3aOlVA+jetL7mXECPyv5lCCUGH/yRxrm6ntW0NsrQDhZH8xuzQ8T8XYWTnMWwY7BmpHxlYZN3Erj6f47v+P5mj0EZ8UuDJN22qVpsQ2t0w45Vn+nOgy1J+IaRg6WC1qZJa5oZyNdTBbGoTfg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709053277; c=relaxed/simple; bh=bznWHDXOpwAbmVELiNtkF+Zamo+nMl6cy7ms9jMVmTI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Rbpff0ZYvVCQ2FBojk2ujoPXQNulFh5d8HpmyCyXOAEi9//y/a/A0TgnAu/fwtLFvgfmh/mpZbNXBE2YYu5fpsG1YwgGjw/pr1VnzqPs1isCuCuv228KJCGKr27sYYfBpaWflCbipPilua+LU8Ccs4009+1NHlpAYCbGuAJLD8Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=syntacore.com; spf=fail smtp.mailfrom=syntacore.com; dkim=pass (2048-bit key) header.d=syntacore.com header.i=@syntacore.com header.b=ss/rCZVI; dkim=pass (2048-bit key) header.d=syntacore.com header.i=@syntacore.com header.b=Ac+HUnNY; arc=none smtp.client-ip=89.207.88.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=syntacore.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=syntacore.com DKIM-Filter: OpenDKIM Filter v2.11.0 mta-04.yadro.com 219C4C002E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syntacore.com; s=mta-04; t=1709053273; bh=mczoY9NKf5IBt5T4Xh9ynOn0nMrRnFZ+wXSkQuHkLYM=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=ss/rCZVIbpEiLw/81MIs41zgCIYwQ7eO1waUK8E2lC8XV1bPZ/ADFEl5i9RCdVgQn NVgXiB2dxEOFXWIKocoDXNdcQ+2ppyHptremx/GYff26TGVX6GRbvNeIWq329bsEcI XulHE91KC1Oj9t/Wb+cDtuvFR2oD13+CZd7wHbiH5dFfRx797j4UOCCsGy+p+yG4UH Sv7JIk/FNsJzUVcdNGIKyYsXSwav/yKU9qqMTUEyzTYlCrBl4aG6epatfU/yYXgdcx DTmEnXn7rAKjOaIxBvQxaYWh+AXP4XiOx3HHj6wqal3uhghxS37F+2xk4PNEbb+FC6 mFvMoAegilq5A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syntacore.com; s=mta-03; t=1709053273; bh=mczoY9NKf5IBt5T4Xh9ynOn0nMrRnFZ+wXSkQuHkLYM=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=Ac+HUnNYE6GR09eK4K4fDoSgzTYJDSzmjFTWbF4DHCLei8ZJ7/ZyhmedErh8tfw/i ouFn25bFeAJZgIzuSuoykv3pDYUCflzkbH6U8QlAqtW91cdxy81wrCSF9EiXM2TfeY C9o+l/5J39JIugvNl1fy+cxk7SYW88+zIyh7Wut7B+P4/c5hDjf4i++9/lRgLOIlES /DEqtjTlehyFThpiclkVrSV4eKqotjf2z0f/8pwTDZ1H5z6ktgfNd0CKiUB3Nlt5PS EG22pwa7H5Ytcv4YEx+XLMI0F6XLVE/XPzEiu+fI8+C8duGJUJ5V1PkM22tR1q1E7F UqQTU2G4Q4SXQ== From: Vadim Shakirov To: CC: Vadim Shakirov , Atish Patra , Anup Patel , Will Deacon , Mark Rutland , Paul Walmsley , Palmer Dabbelt , Albert Ou , , , Atish Patra Subject: [PATCH v2,RESEND 1/2] drivers: perf: added capabilities for legacy PMU Date: Tue, 27 Feb 2024 20:00:01 +0300 Message-ID: <20240227170002.188671-2-vadim.shakirov@syntacore.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240227170002.188671-1-vadim.shakirov@syntacore.com> References: <20240227170002.188671-1-vadim.shakirov@syntacore.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: T-Exch-05.corp.yadro.com (172.17.10.109) To S-Exch-01.corp.yadro.com (10.78.5.241) 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); } -- 2.34.1