Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1594361rwl; Wed, 5 Apr 2023 20:58:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ZnspdfN5c4WUWg84BYjrAAYwRxSpKJtzLXvJMjNByrTzsE8oqpC8lj/NMYqqt4p8zkmrTA X-Received: by 2002:a17:906:b742:b0:945:c4cf:34b7 with SMTP id fx2-20020a170906b74200b00945c4cf34b7mr4618184ejb.68.1680753514615; Wed, 05 Apr 2023 20:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680753514; cv=none; d=google.com; s=arc-20160816; b=VYbqX9Mn0skytRWhW9iGlPbz3b+mhHFYx56NEFklhanPDDV7fqqEn75Y0XbKJ0+YK7 wKiqWDp+AYzHePLSMDTIYq1VBiS3hlMHDgfoyVY0wo+ojZU3VZculGAaxTz3BZbYlwR6 MPiWiofc12auSTk0kZ9p/JMSVtvFTp7uRwUHln6wJK/Zgf6swveKfCiiVWnqnY+x0+PT 8NIj4ppJlb4zfj+kKK449+OMQ7RTHP67QIg1Zw2QrZDrSYv9cykbs8t8PMe1gdcAbetF b6LrELrpUy28JG8GJRFYO7fiMhjtn/TOVbAQguEO16WeqDfjJMtajIPYPeIh4aEoGuvi kWhQ== 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 :mime-version:user-agent:date:message-id:from:references:to:subject :cc; bh=Jbd5BTlPsWBVsmAWaSh7Gk4fZoq+yn1qobujO5P5SLM=; b=jT4+G/iceMtGbXfaH826eFhy77bLpmQd1bpSU9hYs4NbHejEGyWTRSFfBMAjwick4O Tz6rrC2LRYyQGMF9Zt/s+7J2IRzXbUwpzAtZfew3HeZsV86SkVEOvwFz9Chy0WnvwglH zX433XwmjyTvdB9XuGJ1jYxLm2RNsgg+LgesS1DmvvWG83TmN3C2GbmouXJnlZo8xjaD +0NQKKBbhW8CYEo97R+ADR9jnqOECLFslP02AP2nBHxIP6mEXiToa4hg2lYu75C7LARZ Br1Q9pXFohWLqiuAdKMy9F/dx1iK8Z73VESM68/ngsX9Mxmimbz8ixJ6b1GH46hufq0U 2XWw== 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 l4-20020a170906230400b0094987e15b2esi333384eja.862.2023.04.05.20.58.09; Wed, 05 Apr 2023 20:58:34 -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 S235048AbjDFD4X (ORCPT + 99 others); Wed, 5 Apr 2023 23:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235045AbjDFD4V (ORCPT ); Wed, 5 Apr 2023 23:56:21 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D970C527F; Wed, 5 Apr 2023 20:56:19 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PsSKR6yQkzKx1b; Thu, 6 Apr 2023 11:53:47 +0800 (CST) Received: from [10.67.102.169] (10.67.102.169) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 6 Apr 2023 11:56:07 +0800 CC: , , Dan Williams , Shaokun Zhang , 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: Re: [PATCH 02/32] perf/hisi-pcie: Assign parent for event_source device To: Jonathan Cameron , Mark Rutland , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Will Deacon , , , References: <20230404134225.13408-1-Jonathan.Cameron@huawei.com> <20230404134225.13408-3-Jonathan.Cameron@huawei.com> From: Yicong Yang Message-ID: Date: Thu, 6 Apr 2023 11:56:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20230404134225.13408-3-Jonathan.Cameron@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.169] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.7 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 On 2023/4/4 21:41, 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 PCI device. > > Link: https://lore.kernel.org/linux-cxl/ZCLI9A40PJsyqAmq@kroah.com/ > Signed-off-by: Jonathan Cameron Reviewed-by: Yicong Yang > --- > drivers/perf/hisilicon/hisi_pcie_pmu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/perf/hisilicon/hisi_pcie_pmu.c b/drivers/perf/hisilicon/hisi_pcie_pmu.c > index 6fee0b6e163b..2cc88d75b895 100644 > --- a/drivers/perf/hisilicon/hisi_pcie_pmu.c > +++ b/drivers/perf/hisilicon/hisi_pcie_pmu.c > @@ -793,6 +793,7 @@ static int hisi_pcie_alloc_pmu(struct pci_dev *pdev, struct hisi_pcie_pmu *pcie_ > pcie_pmu->pmu = (struct pmu) { > .name = name, > .module = THIS_MODULE, > + .parent = &pdev->dev, > .event_init = hisi_pcie_pmu_event_init, > .pmu_enable = hisi_pcie_pmu_enable, > .pmu_disable = hisi_pcie_pmu_disable, >