From patchwork Tue Feb 27 17:00:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Shakirov X-Patchwork-Id: 21042 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2885004dyb; Tue, 27 Feb 2024 10:25:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUeOIEllmof9khV03Fui1OL4d9Ys/uIpgjKf9xcrLQ5b49D2gO0sTmWNc4s2qZ2PMj3HhigLT7jgAhUctTvYR7F0SpAzg== X-Google-Smtp-Source: AGHT+IECwtsPDKRFc3sd2NnKGitw9D7/u4mNuXboRJqbpKKcHw7rQ09IqbJoYtaq7hXirbQQjSui X-Received: by 2002:a05:6a00:4403:b0:6e5:265:fd38 with SMTP id br3-20020a056a00440300b006e50265fd38mr12821465pfb.18.1709058335627; Tue, 27 Feb 2024 10:25:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709058335; cv=pass; d=google.com; s=arc-20160816; b=Le19MpSHLA+pnEAvEztDy/DkRqyvKU/OeXbciGQxTS6ZHJnAP6t9lCs85J8/4rP1QE kx3cnaPyrQBDtKyzRi8WI+S0Y4mAgn1CnmY2NcoLhHGsQhw9SaRMxzGqB6tc7k9V8wIx Sot09sZW8F56UJjNFAdp1adXBLFqZG+H6T0wxAkLL+YCz4I/SwigRMbJDvk15+bglEFW EebCOby74u6/UJumyalMWEp9ceo3P4hc8TIYoi81wGyYBphA1uD2jichZtazDT8N8fRr lDH2QGMe3vOpCE+wU5ushxVPTSliMBCG26d//ot2uu0xQHeRf77kQs94UxNvcGuklkf3 rhnQ== 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:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature:dkim-filter; bh=MD+Aeir3B6NSv5VxdWchXqnIlbEpAOLGX4DiWLdrVQs=; fh=2hmqWtCcjtCMwW8nk/JH1dn0ryMGReRZogHdwCQv2XE=; b=n2vQTCCX0/FScm/73OqpXULPEkSxCv/L2jXs0xyUHSb+jO92g6AXi0ACgxgqVeq38j VbHXIhoIh7ejLSEoooEgA7fXW4TPIIM+TPhiOmTI1afk0LVH3cPCk/SBEBGFif/vvmq1 ASvMWDB6NFJ+kjzl74+gVccY5q5SraPPS9tcozh+ueGHW/IOyQNS6zEnfGQs5rVBwwH/ SjBhRyWlQRSX6d9/pij468ULcIUh35B+HEgS3Bhp2YT43E8ZwmmwX5XDyg52apY+reoU 2F1G6PhAvFcBBb7iK8zLo+1GsyPzyis6U9+BA1840e2mUCzmXqWHLf9PW0LtVKNjhGK8 N2RQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@syntacore.com header.s=mta-04 header.b=odVUulp4; dkim=pass header.i=@syntacore.com header.s=mta-03 header.b=QEUyMi2g; 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-83674-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83674-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=syntacore.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s8-20020aa78288000000b006e49051f25dsi5747003pfm.210.2024.02.27.10.25.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 10:25:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83674-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@syntacore.com header.s=mta-04 header.b=odVUulp4; dkim=pass header.i=@syntacore.com header.s=mta-03 header.b=QEUyMi2g; 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-83674-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83674-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 337FA28A3B5 for ; Tue, 27 Feb 2024 17:06:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A539F4C63D; Tue, 27 Feb 2024 17:06:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=syntacore.com header.i=@syntacore.com header.b="odVUulp4"; dkim=pass (2048-bit key) header.d=syntacore.com header.i=@syntacore.com header.b="QEUyMi2g" 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 6170C1EB40 for ; Tue, 27 Feb 2024 17:06:38 +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=1709053599; cv=none; b=WgnRCL0hwHI/SqDhftHSz225o8iixNfDto9AfWH+HoXyR3kco6soHBTDSZg9TK/1J5iNlDqYU82FuYfIhxLF3FxsMR0TyRXi1skppEBogQzk2dBzJwWH7xVICL3ly+zaP9xU2VVT/5MVTVXE8j/yjl4xB7Ub5atMTxoFxjnVgsE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709053599; c=relaxed/simple; bh=MebS9n5ZiCS4+c+fVej6vKE1hD4/nz20mid32q2t1s0=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ZvzDSpVyGondt/EnKsgGe0FCDLfCsSCogOw5weAoFrauh05XC4UBHiyAS57SnV/dpJ4WG72y9fdyylfHRDX4n+EvMlSDnd2CymUAYEQQnz1luHrhbjtObbH0BlIjFrhJGOQEWZ1f9dlGBnN9P5lMibgoYEZ2qdUc7s++fn7P880= 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=odVUulp4; dkim=pass (2048-bit key) header.d=syntacore.com header.i=@syntacore.com header.b=QEUyMi2g; 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 6DE4CC002E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syntacore.com; s=mta-04; t=1709053260; bh=MD+Aeir3B6NSv5VxdWchXqnIlbEpAOLGX4DiWLdrVQs=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=odVUulp4NTJadskyMmbqTctpkueG6DuJQskXWlApGq9Of11jwpjc+jZO5lNzUvULZ 4bvfaTF5pihBqOcBZ4aR1kVPpxK3+yOftUV9Evv2ArDHGzfXGP8h5xdCEuxag8myTE WBMEn60qMbaRZ36RLeTEVg53ecVqA2XHm/qYjJXvWiiszQrlAWsqGXp1F49zjZyms7 WBneShy6r8Q7lxT6xk9iXwBjR3ULiwe7TDnEKO3cjXmxrS02y0HjSbtWsq3TqCdqJW dPEJpGGPAn6mCorXzK6eHLDuJp+0rfipZ6axfB4js2nRdXVYBK4So8wUrpdbhKvKdB I5k50oiX+0Z/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syntacore.com; s=mta-03; t=1709053260; bh=MD+Aeir3B6NSv5VxdWchXqnIlbEpAOLGX4DiWLdrVQs=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=QEUyMi2grJRDP+vJgy1S9AD4Dh5Bl9f2gqJEX8jl10Wj0syR3GLEoi6sPoXtklDhj XD13tipkqxWH2MiC965NxNSKfSN62lyCnhxs0syGb0uRvwMlJJWQtvEra1MvVUKTuu hsFnLrLpSfxujVW8WsnZpGzdgClB5jnO1BcYFTQ5W8l8fIQkkzlIuzu1zDGLBrU2Xo hYPC3LEVZbPKM0zzDEEc43vVfzcFbxk83TkYIpdlRJkI9kG/4+nPhkQGZfYDqVkWLv vwHeE+HZK+9YUrsgeGEd9vgTEe7qQb1EE0tRlYdCZ0vMoCshElQrt3Pg4ShrDtaC74 qyXKMNMXXb/8w== From: Vadim Shakirov To: CC: Vadim Shakirov , Atish Patra , Anup Patel , Will Deacon , Mark Rutland , Paul Walmsley , Palmer Dabbelt , Albert Ou , , Subject: [PATCH v2,RESEND 0/2] drivers: perf: fix crash with the legacy riscv driver Date: Tue, 27 Feb 2024 20:00:00 +0300 Message-ID: <20240227170002.188671-1-vadim.shakirov@syntacore.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: T-Exch-05.corp.yadro.com (172.17.10.109) To S-Exch-01.corp.yadro.com (10.78.5.241) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792077553061736916 X-GMAIL-MSGID: 1792077553061736916 This series fix crash with the legacy riscv driver when configs: CONFIG_RISCV_PMU_LEGACY=y and CONFIG_RISCV_PMU_SBI=n and you try to perf record Vadim Shakirov (2): drivers: perf: added capabilities for legacy PMU drivers: perf: ctr_get_width function for legacy is not defined drivers/perf/riscv_pmu.c | 18 +++++------------- drivers/perf/riscv_pmu_legacy.c | 10 +++++++++- 2 files changed, 14 insertions(+), 14 deletions(-)