Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1644741lql; Wed, 13 Mar 2024 04:27:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtBUxVCwpxu300A0M5lr+UKZ0lwyqwZ0EebS9zAsvVqnJMypbyYgG3qm6X33FQDjLa4HEc6NP4VbvW3xUQ8roZSp9uqgaI2zW+I7qa9A== X-Google-Smtp-Source: AGHT+IGALFOQTeI+i3ZyFjbcAw7gGaY34Hj/pLl+pFaroHgeZHBbDnV4/pnaBXWys4Fd8URj54Jj X-Received: by 2002:a05:6214:4c1c:b0:690:d392:4476 with SMTP id qh28-20020a0562144c1c00b00690d3924476mr8119532qvb.57.1710329242903; Wed, 13 Mar 2024 04:27:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710329242; cv=pass; d=google.com; s=arc-20160816; b=TxWjOgk+9AnvEjpsjaFFEDyo4so/vNp8QFe27n/Q4HPffuR3y4V3jQTMKiOYgBzttl 750K8Xq/LAe2o9jyh8bqwatLSKPCGpynlXm9oatACFX8WO3RsU+MYGfN42GAJpZygDwq MKMyu+lI9UHE7hK7GUACK6ATgJClh77uCE9WzT+bueQbLWMVEWsoxcpmv7B+mkiz/Vsc 9k5tf0ykcbXxplC+DtizySgKOSa7gvyxVeE3/V3dqImykTDwuh+tw1vTuplBzNQE6w9e mOAo0SWw4D5yeLUEd+PMH6v2B3Fo/QWOWm5tNdUlZY1xqtup5i4bOJfYlsIfL1LRqX+K lduQ== 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=ocCmm+7Ea33Oc9VrJZC6Ab5uuHqjsUJheVPFeYGJ4PU=; fh=DTatXDGMKcgRkwRApyg5UhbusKti4JW7s3Q/7ynVJUk=; b=OnX3mIJQ0no8iBVd80K8NSZCCInFlcdczzWuqdg++8LkH2yJh843KcrGeEQmOSgr4v j+CvuNke57F7DNeSk0/vBIUvq3chUWbdP6rbf0uDQIPowCNK4Efx3tZdlqHcashD3w5e LEws2knFXSzIAHFeVl0LiYOa4P5ULKIrfaKjbzR440UmQAwNNjIGqo6ymxMexYmWOjNH xsuCtlqFidtm+WWyZz8pNj3yvh/QPShFn0k/ijLot/nJ9A3ZLQFjn1hUahweyNzj9l4U jhflp5Yfgxywbp6P6HifqXOSrvULT16hPlSljPrEdMHE/8NYqNl6hfB23LKLxprmQ3gI uDsA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-101435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id on24-20020a056214449800b0068fb764232bsi9754241qvb.224.2024.03.13.04.27.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 04:27:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-101435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 BE8281C229F8 for ; Wed, 13 Mar 2024 11:26:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF6D03F8F4; Wed, 13 Mar 2024 11:26:15 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85B0C3DBBA; Wed, 13 Mar 2024 11:26:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710329175; cv=none; b=rcBVXmjRVJF1IcbHNrOqTJwDo0QgiIVdJ3gFrAkFmz4OS79HwhxDfwQT3z5UW0n7lk+UQJ2GXotgd5jyaPmSmCPfJlwgXkMNsLb4KBDrqa+2CBXGp3v4UHN8cX1ld0nsftKJlVldzZMfP3TVhNqrltjlkioHc+sgMq9zNZZfEcU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710329175; c=relaxed/simple; bh=y3OqGf9cZrU1G2FvP2a7Qj2ptdbA5j3NjnjuWrWjlwY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kpxVKQsSfa2x4F9wLhPS1Taakz3yhFMPvDP6yFl3sETrcEKvalN2xc/xr747NY9WoujWrQqlEej+UxTPytG9GIXP+WbZpOklTjgrDIwMYAZ0ubj4lv59Q/Z9685Ff817fDYwX2bKUKt5AzBZQbNDOU4gwYbxYjyXjHNkZpFO+1s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A67731007; Wed, 13 Mar 2024 04:26:49 -0700 (PDT) Received: from [192.168.1.100] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8B59A3F73F; Wed, 13 Mar 2024 04:26:09 -0700 (PDT) Message-ID: Date: Wed, 13 Mar 2024 11:26:07 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 00/10] perf: Clean up common uncore boilerplate Content-Language: en-US To: Robin Murphy Cc: Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-perf-users@vger.kernel.org, jialong.yang@shingroup.cn, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Will Deacon References: From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/03/2024 17:34, Robin Murphy wrote: > Hi all, > > Since this came up yet again recently, and it's an idea which has been > nagging me for years, I decided it was time to see how hard it really > would be to start shaving this yak. And it turns out to be refreshingly > simple - the core code has quietly become capable of doing most of what > we want, the one new functional addition is trivial (patch #2), and the > resulting largely-mechanical cleanup seems a pretty nice win. > > This series is focused on drivers/perf/ as that's where most mess is > concentrated, but figured I'd include the arch/ patches as well since > they might be reasonable to land with the core changes, at least for x86 > (FWIW I did also look at the powerpc drivers but they scared me and I > ran away; sorry). The remaining stragglers elsewhere around the tree I'd > come back to as a follow-up. > > (And yes, I appreciate it's mid-merge-window already, but since I do > have a tree-wide rename proposed here, may as well give the discussion > a chance for a head start before -rc1...) > > Thanks, > Robin. > > Reviewed-by: James Clark > Robin Murphy (10): > perf/alibaba_uncore_drw: Use correct CPU affinity > perf: Add capability for common event support > drivers/perf: Use PERF_PMU_CAP_NO_COMMON_EVENTS > perf: Rename PERF_PMU_CAP_NO_INTERRUPT > drivers/perf: Use PERF_PMU_CAP_NO_SAMPLING consistently > drivers/perf: Clean up redundant per-task checks > perf: Define common uncore capabilities > drivers/perf: Use common uncore capabilities > x86: Use common uncore PMU capabilities > ARM: Use common uncore PMU capabilities > > arch/arc/kernel/perf_event.c | 2 +- > arch/arm/mach-imx/mmdc.c | 16 +------------- > arch/arm/mm/cache-l2x0-pmu.c | 12 +--------- > arch/csky/kernel/perf_event.c | 2 +- > arch/powerpc/perf/8xx-pmu.c | 2 +- > arch/powerpc/perf/hv-24x7.c | 2 +- > arch/powerpc/perf/hv-gpci.c | 2 +- > arch/powerpc/platforms/pseries/papr_scm.c | 2 +- > arch/s390/kernel/perf_cpum_cf.c | 2 +- > arch/sh/kernel/perf_event.c | 2 +- > arch/x86/events/amd/iommu.c | 17 +------------- > arch/x86/events/amd/power.c | 10 +-------- > arch/x86/events/amd/uncore.c | 12 +++------- > arch/x86/events/core.c | 2 +- > arch/x86/events/intel/cstate.c | 16 +++----------- > arch/x86/events/intel/uncore.c | 11 +-------- > arch/x86/events/intel/uncore_snb.c | 20 +++-------------- > arch/x86/events/msr.c | 9 +------- > arch/x86/events/rapl.c | 9 +------- > drivers/fpga/dfl-fme-perf.c | 2 +- > drivers/perf/alibaba_uncore_drw_pmu.c | 27 +++-------------------- > drivers/perf/amlogic/meson_ddr_pmu_core.c | 11 +-------- > drivers/perf/arm-cci.c | 15 +------------ > drivers/perf/arm-ccn.c | 20 +---------------- > drivers/perf/arm-cmn.c | 10 +-------- > drivers/perf/arm_cspmu/arm_cspmu.c | 27 ++--------------------- > drivers/perf/arm_dmc620_pmu.c | 18 +-------------- > drivers/perf/arm_dsu_pmu.c | 22 +----------------- > drivers/perf/arm_pmu_platform.c | 2 +- > drivers/perf/arm_smmuv3_pmu.c | 15 +------------ > drivers/perf/arm_spe_pmu.c | 7 ++---- > drivers/perf/cxl_pmu.c | 8 +------ > drivers/perf/dwc_pcie_pmu.c | 13 +---------- > drivers/perf/fsl_imx8_ddr_perf.c | 13 +---------- > drivers/perf/fsl_imx9_ddr_perf.c | 13 +---------- > drivers/perf/hisilicon/hisi_pcie_pmu.c | 10 +-------- > drivers/perf/hisilicon/hisi_uncore_pmu.c | 20 +---------------- > drivers/perf/hisilicon/hns3_pmu.c | 9 +------- > drivers/perf/marvell_cn10k_ddr_pmu.c | 15 +------------ > drivers/perf/marvell_cn10k_tad_pmu.c | 6 +---- > drivers/perf/qcom_l2_pmu.c | 21 ++---------------- > drivers/perf/qcom_l3_pmu.c | 21 +----------------- > drivers/perf/riscv_pmu_sbi.c | 2 +- > drivers/perf/thunderx2_pmu.c | 17 +------------- > drivers/perf/xgene_pmu.c | 16 +------------- > include/linux/perf_event.h | 6 ++++- > kernel/events/core.c | 7 +++++- > 47 files changed, 67 insertions(+), 456 deletions(-) >