Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp155283rwl; Tue, 4 Apr 2023 21:05:27 -0700 (PDT) X-Google-Smtp-Source: AKy350bz3Tg+OSMyBwOoe35nsRk/8+8pFrjCcZ2RklZ1iFHvboYGUULfozp/H7nfklh+zAdpk/Cp X-Received: by 2002:aa7:951a:0:b0:628:1274:4d67 with SMTP id b26-20020aa7951a000000b0062812744d67mr4674632pfp.24.1680667526862; Tue, 04 Apr 2023 21:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680667526; cv=none; d=google.com; s=arc-20160816; b=ONiXYKctqMwCzH5sLnphOvil6JgeOFRrSzrGbYHESmysa5nY1jvIMALY0KkzDPQJyi cl+hRgF+FslEy1FxQE5hnfNnRrWA6zgQYaoWfnJaGKRojUiTo43uvBG+jOzD0ubq8M5G /IsDxuOQP7G9XTUYc/K8GRB+KjpcA3mByxTKUaNtEtIDAOD5uThhzHfocFE/p0qvccfX AsaSwj+myN+paLSbm0caT7hmrxdMnMQ9ag0iz3pA0xKCQ7uPtW4G7TMzmJIgp/48DuiB ZVldnfd6W/EPZ7dz6pi19yk8Fs4+m34TCe6KjsepXl9D2ecETHKuIJBs04OHaq3Ybhza DsVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=AeHUoIyza+LUvbk0g1MTDNuHsN9hHqYsE41pybaxScc=; b=W00LZ1fhyosVtY9qAhY3eXDcFVpaBiFQE8qWKY5oaox1yzLQv5dEBxUnvdiSWqS5Wn 5lLCstQ9d1u96DdJIz1CwRCgTXtGrCKJnD+RFdl6nhCSjJAzLMMtWL1nfh2vIAZOHaYC q1XZOh8rAYemPtcQipeMVINXbOgNH2FBLhp4fPPnuFDNXnkcVJ1hLuIqGdKdn59RWqcr T9iFuAtMpgBNf6LGG4yKRq2jhAlZjoy61O810N/mS+A4wET3hGBgxUOansRrf8bnMipV KX6SAnVaz+077rGidDDq6DZ7erigffbN/Gw1Vytr+JjOgcJCIfwUcYLOokwRQOTEWMld Oz+w== 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=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 85-20020a630058000000b00502fd16cd1csi12276898pga.367.2023.04.04.21.05.15; Tue, 04 Apr 2023 21:05:26 -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=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236706AbjDEDu5 (ORCPT + 99 others); Tue, 4 Apr 2023 23:50:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236000AbjDEDuz (ORCPT ); Tue, 4 Apr 2023 23:50:55 -0400 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 599E12691; Tue, 4 Apr 2023 20:50:53 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R961e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=30;SR=0;TI=SMTPD_---0VfNxCDL_1680666644; Received: from 30.240.113.3(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0VfNxCDL_1680666644) by smtp.aliyun-inc.com; Wed, 05 Apr 2023 11:50:47 +0800 Message-ID: <9cb06879-d743-e3b2-b8e3-23962b458202@linux.alibaba.com> Date: Wed, 5 Apr 2023 11:50:40 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 18/32] perf/alibaba_uncore: Assign parents for event_source device Content-Language: en-US To: Jonathan Cameron , Mark Rutland , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org Cc: linuxarm@huawei.com, Dan Williams , Shaokun Zhang , Yicong Yang , Jiucheng Xu , Khuong Dinh , Robert Richter , Atish Patra , Anup Patel , Andy Gross , Bjorn Andersson , Frank Li , Vineet Gupta , Shawn Guo , Fenghua Yu , Dave Jiang , Wu Hao , Tom Rix , linux-fpga@vger.kernel.org, Suzuki K Poulose , Liang Kan References: <20230404134225.13408-1-Jonathan.Cameron@huawei.com> <20230404134225.13408-19-Jonathan.Cameron@huawei.com> From: Shuai Xue In-Reply-To: <20230404134225.13408-19-Jonathan.Cameron@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.9 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 On 2023/4/4 PM9:42, Jonathan Cameron wrote: > 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/ > Cc: Shuai Xue > Signed-off-by: Jonathan Cameron > --- > drivers/perf/alibaba_uncore_drw_pmu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/perf/alibaba_uncore_drw_pmu.c b/drivers/perf/alibaba_uncore_drw_pmu.c > index a7689fecb49d..0d129acf3f84 100644 > --- a/drivers/perf/alibaba_uncore_drw_pmu.c > +++ b/drivers/perf/alibaba_uncore_drw_pmu.c > @@ -683,6 +683,7 @@ static int ali_drw_pmu_probe(struct platform_device *pdev) > > drw_pmu->pmu = (struct pmu) { > .module = THIS_MODULE, > + .parent = &pdev->dev, > .task_ctx_nr = perf_invalid_context, > .event_init = ali_drw_pmu_event_init, > .add = ali_drw_pmu_add, Reviewed-by: Shuai Xue Thank you. Best Regards, Shuai