Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6018048rwl; Tue, 4 Apr 2023 06:53:37 -0700 (PDT) X-Google-Smtp-Source: AKy350YcBuN6d2RDOozmKWDTpQuC4nSP1slWnLJdZM+zwk4VnydWRd2owvcA44Keb7rKUKdD3tX5 X-Received: by 2002:a17:906:255a:b0:93d:1c2b:bd23 with SMTP id j26-20020a170906255a00b0093d1c2bbd23mr2184396ejb.39.1680616416867; Tue, 04 Apr 2023 06:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680616416; cv=none; d=google.com; s=arc-20160816; b=uTxoBGTEJbaqL9KQO9ykaBGSxiK39lMOHupZA5S+M5UvwfWT1hZ+rf28/68/taXXPw bCNVKcR6SD44H4U2agLL1ZsTZhGSzk9VPIMH8iIP8vx0MnOjN0aQEbK06cZN5AvBJlka ynv7E0vOhUfLZSNaoyXED0xJ1D0kA9XXQuG2/u+oBFba75/6v86m3UDvhMAhYbvYf6b7 I+xHeOe9ak2tMy0GJXzwSt4mj68hdxVoCuvSs8DqXDwHC2SLIYNfBIH9dtjN9tDWChZS RASLnJjfx7YKaohtulsowoQQC+5wYQJq4haoK3SYnF126bRmqKnzIbDZR15UxJXiU8NQ 5NCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5nAtKNZfLkNRQ0UNoZWEomeU2MngqlQWNndkPTJBZzs=; b=OBqm+E2s/ceRWb5SYi4CfYQiyKe256veaQIGP8gQ9vSyus9HiEa3E3R0NMqczdH3r8 3eq4AwKZMTsBFZS9/EWiM01Az1KDDN3dlK9g6QyxZ2yVz1S0s5WE8Wd4KE7dcszKmlFo x1ERQG6CKznHfBp6HoY+UhNKhof5yPFNtF9Ysm7irpHEasMYo5F7TutI6sjgNIdx82lF vJZCYotaeZ8PXelDzltrYiBgFVVrdi3NMqbzZA9uMLVyH+7T9T7p8xTUHyZXXjCXnD3c 1CKbUkLY8+IOCJPizNF9dLbFiqS+frTIPZApJV/7fsUlE3ASvHFVp5EgORlTNTJyll1I kaEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z17-20020a170906075100b008d02052ed2asi1245749ejb.637.2023.04.04.06.53.11; Tue, 04 Apr 2023 06:53:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235265AbjDDNvH (ORCPT + 99 others); Tue, 4 Apr 2023 09:51:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235245AbjDDNvF (ORCPT ); Tue, 4 Apr 2023 09:51:05 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0492CFC; Tue, 4 Apr 2023 06:51:04 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PrTdD2trDz6J78Y; Tue, 4 Apr 2023 21:49:04 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (10.122.247.231) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 4 Apr 2023 14:51:00 +0100 From: Jonathan Cameron To: Mark Rutland , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Will Deacon , , , CC: , Dan Williams , Shaokun Zhang , Yicong Yang , Jiucheng Xu , Khuong Dinh , Robert Richter , Atish Patra , Anup Patel , Andy Gross , Bjorn Andersson , Frank Li , Shuai Xue , Vineet Gupta , Shawn Guo , Fenghua Yu , Dave Jiang , Wu Hao , Tom Rix , , Suzuki K Poulose , Liang Kan Subject: [PATCH 17/32] perf/arm_pmu: Assign parents for event_source devices Date: Tue, 4 Apr 2023 14:42:10 +0100 Message-ID: <20230404134225.13408-18-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230404134225.13408-1-Jonathan.Cameron@huawei.com> References: <20230404134225.13408-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.122.247.231] X-ClientProxiedBy: lhrpeml500003.china.huawei.com (7.191.162.67) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the PMU device appears directly under /sys/devices/ Only root busses should appear there, so instead assign the pmu->dev parent to be the platform device. Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/ Signed-off-by: Jonathan Cameron --- Note that the ACPI path for this driver has no obvious 'parent' to use so I've left that for now. See armv8_pmu_driver_init() in arch/arm64/kernel/perf_event.c Suggestions welcome! --- drivers/perf/arm_pmu_platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platform.c index 933b96e243b8..705ed45402ff 100644 --- a/drivers/perf/arm_pmu_platform.c +++ b/drivers/perf/arm_pmu_platform.c @@ -197,6 +197,7 @@ int arm_pmu_device_probe(struct platform_device *pdev, if (!pmu) return -ENOMEM; + pmu->pmu.parent = &pdev->dev; pmu->plat_device = pdev; ret = pmu_parse_irqs(pmu); -- 2.37.2