From patchwork Tue Apr 4 13:42:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 79144 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3d4a:b0:114:e959:cc0c with SMTP id b10csp2974070rwc; Tue, 4 Apr 2023 07:09:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ZM9U7zf13S9hmyB5kyKDGM13sNC6gaGUFBYzjACsj0KwvZu+8UnMyvcxollNLslsaFWx3H X-Received: by 2002:a17:902:d0d2:b0:1a0:53b8:907f with SMTP id n18-20020a170902d0d200b001a053b8907fmr2261210pln.17.1680617386625; Tue, 04 Apr 2023 07:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680617386; cv=none; d=google.com; s=arc-20160816; b=lmoD4N3Ctb4Qi/ylbkbizoCMwebax7Nl3kUHXLaGfEQO0gywFPRo5sVUc6PtiAw26h uT37D77BxETfFYiHcbp7YWCxVkeenZoW/ALBCldBcC4VhijLUOHbrO1IsakTSNHzYA5R 1S9HgelozNCmYod4wq5kSdumVPv2jHQS5Py94IGo63N+lCACOXulGpSUV+q5wOCzz27G oVN6+RvTvphJoVOe24NpRvZNaluoXm6bQfO4V5r3EqlY3NBvtq6jceVsTYwlg/YpyMEL CY06G8o6ZOEGa4l9HxTmq63InOn86dGYALxtEBRPF7tBan+CoTVJHZW8R+gm/AGr5rTo x3Nw== 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=fQxBRD/rzQfKs//AaOyxzwiL8AytGWbVlXpuQsDV6XU=; b=hTOpTddsVwaEXYyPlNDGlKvnqgMYiF6fFyRRhnyCoqj4hTCSPeHWBbrKVFp5QbWrA2 2FLGTsuP2QmV+duWZ9Q0v4/U9oz2d48JOKaZheYukWGejQJYg5wFG7P+57frWhyu683P X4MFezzPI6kfgyByEBJrIdGW8h7g/bPdJFidqUc8/lGuYgJDtlDtHQ2NDU9ytLqf4uLT qi0JgHaMMeDhh6TalXENS7M6gEyT/yn7gnn4pplansKjwa9r4Ie/jStmbSINQKIi7Enm 9Trxq+5N6VYtkGQ5rDsRtc2Sw255EauiCB+5jCqBFMa6HP5W1WKUiugu3qvrw2RI6Ado Vwlw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a636b06000000b00512fab8c401si9959544pgc.427.2023.04.04.07.09.32; Tue, 04 Apr 2023 07:09:46 -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 S235413AbjDDNrM (ORCPT + 99 others); Tue, 4 Apr 2023 09:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235035AbjDDNqy (ORCPT ); Tue, 4 Apr 2023 09:46:54 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F5EC109; Tue, 4 Apr 2023 06:46:26 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PrTYF3yQhz67bZZ; Tue, 4 Apr 2023 21:45:37 +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:46:23 +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 08/32] perf/arm_cspmu: Assign parents for event_source devices Date: Tue, 4 Apr 2023 14:42:01 +0100 Message-ID: <20230404134225.13408-9-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 X-Originating-IP: [10.122.247.231] X-ClientProxiedBy: lhrpeml500004.china.huawei.com (7.191.163.9) 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762255056731368825?= X-GMAIL-MSGID: =?utf-8?q?1762255056731368825?= Currently all these devices appear directly under /sys/devices/ Only root busses should appear there, so instead assign the pmu->dev parents to be the platform device. Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/ Signed-off-by: Jonathan Cameron Reviewed-by: Suzuki K Poulose --- drivers/perf/arm_cspmu/arm_cspmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c index e31302ab7e37..4390e4fb1e95 100644 --- a/drivers/perf/arm_cspmu/arm_cspmu.c +++ b/drivers/perf/arm_cspmu/arm_cspmu.c @@ -1155,6 +1155,7 @@ static int arm_cspmu_register_pmu(struct arm_cspmu *cspmu) cspmu->pmu = (struct pmu){ .task_ctx_nr = perf_invalid_context, .module = THIS_MODULE, + .parent = cspmu->dev, .pmu_enable = arm_cspmu_enable, .pmu_disable = arm_cspmu_disable, .event_init = arm_cspmu_event_init,