Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6018069rwl; Tue, 4 Apr 2023 06:53:37 -0700 (PDT) X-Google-Smtp-Source: AKy350a8QTSrk1/dSWOsCnuP9gS4AtYBqdmZMkrmt6/jmPA2cOi+rFlYgI4GfUxgFvkw4Os7JV8t X-Received: by 2002:a17:907:a04e:b0:931:f132:5c61 with SMTP id gz14-20020a170907a04e00b00931f1325c61mr2417070ejc.47.1680616417543; Tue, 04 Apr 2023 06:53:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680616417; cv=none; d=google.com; s=arc-20160816; b=MzxKMsqEUmapp3QWcVDSmkfOxkvirDuS/AeLJHScZi7J0BQ5FnkwtJonOnITUlWE8V XfEevBOZ1suu9L3k+26qn5MAvqAnpJQG5qzb+oFk4BtciwfK7Wza4slvCaj23vGayGCf PfaEjHspjFpba9Zgyx7xtd//M1Ic+OE0r0Xufa4AGjxvP+ZQQAkHSzrrEWFzxfmZZGRv lOXoxLd9PqJ+YMhJhTqwi4G5/3FMdNmnfBrNwwtGBJcxRJ0RucN6zYq76PeFvh7pCIs8 PECM8HF4Ew6nWW1GYqV2XcnrbjI2hiCLEjbWPbfa5+ATERdJCz2Sr0izxCzsndkGjQrB verQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qiCZdVVjcgeCfD/G5Dnq2XMueT4fv60FH4coFqNBtLQ=; b=x/2QXCbJRZ9wMPzibCPOdG4Ks85LwzutYvEjrYunqHPxTL9HjkfBgVpah8eS+mwyqn TomG4ndE6SYEq6ekzDQqY8DiHwhpw0FDCp6261/ZpuNn9c18S8f881ivEEGPOtz9Jtkh Ldo8dF0sQ3O3upaWe7NhVYDSYmQxMueEihP2pI4seVA7kanCXsOIOFL3TpXLHY8R5KRR bIk/QCMgEVDk6tqMeh7jpccDV0cHJjwnC0DXaVefxcb602JBm3UkCnK/O84QZMWcXatB u2hDNPXPknM5Ke6eHKXmUmqtbXyBufbM7SRFFDSWkF/4AHLL7T6gkit/WKf1a8xYT7xI udVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lYtAIkgV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i22-20020a1709061cd600b00931ebd43e82si8626217ejh.628.2023.04.04.06.53.12; Tue, 04 Apr 2023 06:53:37 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lYtAIkgV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235452AbjDDNwD (ORCPT + 99 others); Tue, 4 Apr 2023 09:52:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235495AbjDDNv6 (ORCPT ); Tue, 4 Apr 2023 09:51:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 690FAFC; Tue, 4 Apr 2023 06:51:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D69BC63162; Tue, 4 Apr 2023 13:51:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD0DCC433EF; Tue, 4 Apr 2023 13:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680616311; bh=HviaHkIS4i8rPDg2qZ0RD/MEkAaKYhlkqvmr6+Shp3Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lYtAIkgVw5Fxxbkt0I3LiepitLghTtHCDZJ2OLtbbs/p6vISKj6flXJFQ2aPUNSZn r3BPFeZ7VkHHRoYylr/980Y9ud0KeZwTsPLpN9zhDUM7VIiHoSmma7T78EsjF1Mx9z t+7nKQOJKlHvdZRc/vN17FaanvpfWJ8Q+WH9HIO8= Date: Tue, 4 Apr 2023 15:51:48 +0200 From: Greg KH To: Jonathan Cameron Cc: Mark Rutland , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, 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 , Shuai Xue , Vineet Gupta , Shawn Guo , Fenghua Yu , Dave Jiang , Wu Hao , Tom Rix , linux-fpga@vger.kernel.org, Suzuki K Poulose , Liang Kan Subject: Re: [PATCH 01/32] perf: Allow a PMU to have a parent Message-ID: <2023040438-mounting-answering-bce4@gregkh> References: <20230404134225.13408-1-Jonathan.Cameron@huawei.com> <20230404134225.13408-2-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230404134225.13408-2-Jonathan.Cameron@huawei.com> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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 Tue, Apr 04, 2023 at 02:41:54PM +0100, Jonathan Cameron wrote: > Some PMUs have well defined parents such as PCI devices. > As the device_initialize() and device_add() are all within > pmu_dev_alloc() which is called from perf_pmu_register() > there is no opportunity to set the parent from within a driver. > > Add a struct device *parent field to struct pmu and use that > to set the parent. > > Signed-off-by: Jonathan Cameron > Reviewed-by: Dan Williams > Reviewed-by: Greg Kroah-Hartman