Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp277930lqj; Wed, 10 Apr 2024 10:05:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWwQnvpU03WqhCXaAkSA1000UQ0xTd0NOtn5VAvikwyrj21zzYeDln+ayMBLDDhUmnC3FGzsVLUXyaDClUEFAyVfIk338KD4x8ta7a/Zg== X-Google-Smtp-Source: AGHT+IGH4bnm9uLLyDINv6tUAs2hsI8YgHmulbtspeTwUrJWqcl3gQZxrULGfS3O7G55Q6gyGwoD X-Received: by 2002:a50:d789:0:b0:56b:d013:a67e with SMTP id w9-20020a50d789000000b0056bd013a67emr243947edi.18.1712768704375; Wed, 10 Apr 2024 10:05:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712768704; cv=pass; d=google.com; s=arc-20160816; b=USS1WGJ1+q92PgbKNX40PeK124IRDzB9txlqMhFnBmU+pSAnM5difiBVp4ocJQeN5e Ctf0bwnqzEm+gDsDaCx7ri/RHctyLpXe6hcnOFawyzlxeMgY4fzCRqjRD0VW49CNQKaN VkXB/jGjdQ+0GYy103KJNgxtK0A+wbetRMIr/MZ7iHZHVuTIGGO/qlW6eY0d4wYZ1y3u H3klVJBswgwy2/xBLbIbeCQXa77WplZXafqiZoqUY1VSTzSLfWM/I89TsTE/xE5g4pGd mA23kpW/+EyqvrBc5+frtjs5+ao54zRsB4KuzCuVDj0ch+RNesesPZzL3X/bGDWBMz8G Q5nQ== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=rcUMMiNQv2e3s1VTOyQ1W6jW8uoybdvpqYpE3xDxVMQ=; fh=ZibXOLglNXDvJwx1b5jksdQLIZF8707My+mLKDlXEd8=; b=IhP+/g7Fm5CXS1b5KYwRdM18Ejlpak4JlBt030WzYGE/FECwVvOOm5G0rypzGVM3FL K02P1StfQHtEv5pxWb1VELQ2N/mkWZ2LFgIJgSZ++R7GMO9crt5kpqTcqtDvFNMOwRDR O7dMf5sNreVdBdVWQ/RrJcSpexDzNCxiqlkman8dutO+Cbnbpi/Z10CF9AglzpIDwnMN nRVLCB6+LRvDmkh2CXPdvs6eTeH6DCTN7j2LjMRDQOsQPHoHhLFxCPJfu3MibiWYNjr0 /1QqjkpSofzC1769lFOHlq9liQjx7f15Za4MLFrMyHjhMv2eY5wJHICSy+m9jhLhuVlI UxxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-139034-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139034-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q13-20020a50cc8d000000b0056b9023d0cbsi5985725edi.522.2024.04.10.10.05.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 10:05:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139034-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-139034-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139034-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 162C21F21D2F for ; Wed, 10 Apr 2024 17:05:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25BBE17BB07; Wed, 10 Apr 2024 17:04:17 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 D79C817BB01 for ; Wed, 10 Apr 2024 17:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712768656; cv=none; b=n76ZLih+Ael1JqAHseRt9+uDxTZtjxicMI9h1LYmx28EvcrlMpTpxtHuUC+u4Irq+kRzjP93LfmXUlPeprLYJuaLNLPXNa0lmrKxEfO2zEjcA7Klx5Pt8QsA1o74E4aRVI5HjBDmsXeNapfVZv/l/1XaTBwGM0jqbRfOiecnGbc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712768656; c=relaxed/simple; bh=SQ4K/v5QQTv+vk6IVu/x6ynSF4jikLHPm3kjTu9TLvw=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CuG90RgBlEIpxJg2gXf8T5Z48sEmKrPft2yR5fuianVbT9otLFtnXk2a/LJHV6GrkA8eOKHwuH5lc+NW4y+o9WAmrDAP5wPv3cglZpA6TM9L7Y5yAktKRx38uwOAOXOJUC62OvcoFq21QhQ/bC0dDRRiXsQ6o2Yg4L1D95WAJqc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VF8Jc2Hbqz6JBTr; Thu, 11 Apr 2024 01:02:24 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id AA6751404FC; Thu, 11 Apr 2024 01:04:04 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 10 Apr 2024 18:04:04 +0100 Date: Wed, 10 Apr 2024 18:04:03 +0100 From: Jonathan Cameron To: Robin Murphy CC: , , , Subject: Re: [PATCH] perf/arm-cmn: Set PMU device parent Message-ID: <20240410180403.00004cff@Huawei.com> In-Reply-To: <25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com> References: <25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) On Tue, 9 Apr 2024 18:15:17 +0100 Robin Murphy wrote: > Now that perf supports giving the PMU device a parent, we can use our > platform device to make the relationship between CMN instances and PMU > IDs trivially discoverable, from either nominal direction: > > root@crazy-taxi:~# ls /sys/devices/platform/ARMHC600:00 | grep cmn > arm_cmn_0 > root@crazy-taxi:~# realpath /sys/bus/event_source/devices/arm_cmn_0/.. > /sys/devices/platform/ARMHC600:00 > > Signed-off-by: Robin Murphy Nice. I'd forgotten all about this :( https://lore.kernel.org/all/20230404134225.13408-1-Jonathan.Cameron@huawei.com/ still has a bunch of these + there were many I never looked into. Guess I should respin that series though probably 50% at least still apply. J > --- > drivers/perf/arm-cmn.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c > index 7ef9c7e4836b..b2c607cf3ad7 100644 > --- a/drivers/perf/arm-cmn.c > +++ b/drivers/perf/arm-cmn.c > @@ -2482,6 +2482,7 @@ static int arm_cmn_probe(struct platform_device *pdev) > cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev)); > cmn->pmu = (struct pmu) { > .module = THIS_MODULE, > + .parent = cmn->dev, > .attr_groups = arm_cmn_attr_groups, > .capabilities = PERF_PMU_CAP_NO_EXCLUDE, > .task_ctx_nr = perf_invalid_context,