Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2130741lqe; Tue, 9 Apr 2024 10:16:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU3QZE/vdRrzoHoRLt9sU/2F2iKl292Qghfr/4UFhf2qezQGWTdRo92eXT5rdTH2Ptz5B00VEaq29Hv6UNLACOKB1vNBJnv5CgJe2uhzQ== X-Google-Smtp-Source: AGHT+IGozufKfP2fVRFRU7vbA/MLEF95x44F5vi+L9xE6stT0YKREWKd10EOwMzyYUP8G9qvCEJn X-Received: by 2002:a17:907:376:b0:a4e:1f41:6f76 with SMTP id rs22-20020a170907037600b00a4e1f416f76mr39674ejb.38.1712683003781; Tue, 09 Apr 2024 10:16:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712683003; cv=pass; d=google.com; s=arc-20160816; b=nveEVCNr88mGfOa1WY5DDhRRjm7+XX5eSQ0VauhcLJwChydPipOOo714dd/705ysDs zUc4JTon+chK82qDcI4GB3eRnV0621GeKuzEyg9eMOwvZ7w5EYdQVMTtAF6xtqW2oUGD q2KvDqeH+Ff7FgORlIBLMgbesd3JNp2zHkJjXeL2/B+FkKa3i0VS9CXZgrOf+5pNYCrQ +Ooe+HG7Fz4DlxcMhO+wyDYYAA9iCEtqmFdKp739s2apYsLYTht1Fon0N0pdy8c/pi5o bHYLtSzPPsQa++OqOs1bpwlw1cFhzmuAlMG7NgxYAEu4O/1ViTOdMsTcEysKTwLSJWzj WLtw== 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; bh=8kkXX4luZHJxN1AebU+RHbmWpyhXOg2ur/4W8hNnXEE=; fh=aTHDlv1AzXR1pz7/qF/9D4hbCZdS3OsZ68NhfQANy+k=; b=kVAT/3IFSLWyj9cw5P9KZuIJHwzBxm7ptSV8oOW+ILZh5Ho9xJTfu1FBlnd0N7qM2t PcjH9wZpjfoPf7HfSDMtBPHtj1XJ6acJ6Sxmua2fx237C15ch9eciGTwpv6vXK9OiyEO C+F0ZYjzlTcNUl87/6OGY1D/LNad0osu5wHK858P6Uuy6jrBjfL6+/BcUOkor5aouly2 Jg/wb5fy/iQEkwG1qR17dhpNhtAhoM9l8RP9NlaygW2rr90EQQo/wXDNFWAnizig+LHu F/oEgqqw4Gz85VosXvbbXWaZbJmzPBeLJMfgCLmyFQQgBpSQ7UfdMWFELPXw9SxSWe6C Zo+Q==; 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-137389-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137389-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gc7-20020a170906c8c700b00a51a2120d43si4808765ejb.341.2024.04.09.10.16.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 10:16:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137389-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=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-137389-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137389-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7E6EB1F232C2 for ; Tue, 9 Apr 2024 17:16:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B87B615697B; Tue, 9 Apr 2024 17:15:24 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BAA8156249 for ; Tue, 9 Apr 2024 17:15:22 +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=1712682924; cv=none; b=UP8tBed0rXiLpEKgM4pwZQzTWu9+gGlUn9GcSCk5AfhBxeMNy2Pv5980qulaBphOHGSQ5Be/nzfLHbilCrvm1KD+NKcvfx4uk4oRDBi1XdardfadlDYpkD9d0MNMPF2u2A6GwZXFl+O1B92JSEASyjlhF/2HYWhi6/I8vvcuvxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712682924; c=relaxed/simple; bh=HPvhrtsQGYLih6FNRMxLsaieI+vQf0NxSAsCdjwProI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=c/xTXkT3wwvU0DvVzRXNqDlXAPmU6/MBfCT95B8K+X6ABEW1WXhzW+kED1uyMkMHc02JQdX8KQ85iQoBpQl8c2X2FELGpF6hdQsLHpGXIMVR6+V1eNZ2Z23QmTfQjd9OTNtPNhl0H56EDunapVg6BPdSOutgF+RVLFis6jEOYEQ= 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 CC9F0139F; Tue, 9 Apr 2024 10:15:51 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0A74B3F6C4; Tue, 9 Apr 2024 10:15:20 -0700 (PDT) From: Robin Murphy To: will@kernel.org, mark.rutland@arm.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] perf/arm-cmn: Set PMU device parent Date: Tue, 9 Apr 2024 18:15:17 +0100 Message-Id: <25d4428df1ddad966c74a3ed60171cd3ca6c8b66.1712682917.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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, -- 2.39.2.101.g768bb238c484.dirty