Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6098610rwl; Tue, 4 Apr 2023 07:51:23 -0700 (PDT) X-Google-Smtp-Source: AKy350YQbhQD6Kzv+KQCWgsgldWhTrEqdca5ZPqDNP9P86RvqCjBym7fp/+ZoVZ2BcDpsOsuVlLD X-Received: by 2002:a17:903:41c9:b0:19a:a9d8:e47f with SMTP id u9-20020a17090341c900b0019aa9d8e47fmr2958344ple.36.1680619882940; Tue, 04 Apr 2023 07:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680619882; cv=none; d=google.com; s=arc-20160816; b=IuQmHOwpPy8HS6S7Wml51/QvuadWmYwT6h+WOV29U99VxJuh0hfJhZdi+wt8jX6cjD oB0Smn2IdNds30bhz2p0DRzUSK9oAApu63xuN6D8hmQUjp3XiN+E48whvJGcXmnaWtjZ huFnDazNALAOvZecITtKOZnN/hcNqkLDN8dwDAXjoIYaNvB3bsFQm32yOkg8TrCgQ+13 C/Ushhg2AowfoO5qumuPh5I8VJCM80JkIsHwgtgVm7/QlbxhYtpAcOvL0HWENSXReVKX Qk7jd2ASRw87JFnVlxkymbV9oNnmfk9VIqrXdT5Ah9QEJmrsAEhS2sOHYppp2jBwjqsW 5p/Q== 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=tQ0usdtGllhQqiMO/dV6nvlAunKLwaUmI9fiuu4s8d0=; b=MiPmxhkpImT/sKwoiTWd3OPPlvIpRKal2HXKgS/iwm2ZiM1K1PbxnaRioI680OjZ+n bPOzTNdHHL0IdfuGEJ/LIr+anmuzrHxV36B6brqPZsOTFpePQvPzhOFhH4N8bFPMvrE+ nCEzrhGhRXSL+xZgxzFMncIDcK7F4AlUZsyPU21z2FLwgAbK0vOBC+fUCPaigasr2sCV 8JHIH+um/84/9e+2kg1oasq7W2aPuvIdhctd8v5EORmUNPFhZitUoBd9ZSO4BCqMSyqO nIVvYz8TlHMG+/wrdfMR4BqgUrefeVbZ/krFYKofWFIbbCcsYg/y/zsKf5K0PiCDBCsV exWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YuEvT3Dc; 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 h4-20020a170902b94400b001a04bde6843si9846177pls.259.2023.04.04.07.51.10; Tue, 04 Apr 2023 07:51:22 -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=YuEvT3Dc; 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 S229691AbjDDOkr (ORCPT + 99 others); Tue, 4 Apr 2023 10:40:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjDDOkq (ORCPT ); Tue, 4 Apr 2023 10:40:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFBE1E51; Tue, 4 Apr 2023 07:40:45 -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 5962B6351F; Tue, 4 Apr 2023 14:40:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EBB4C433EF; Tue, 4 Apr 2023 14:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680619244; bh=kJs2FcJMOyFP6Jf9o+j82QnGRlSZKmBzBCteDbxYsXI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YuEvT3Dc+BynuOi7RdV3awmvLg9JsgbBy8E7i9AWMgfcUA5Q69kszLaCOceYC+28H 6af20+rJGuKZ9+JU076ksTIH8Z3r8vN1AdJLPpeZxhH1XTHfTLKxrZ+eaPttJP45Y1 NeZNVeqBlCnssVHKmlHDm2xXXuPYwA7s9rdCGuiY= Date: Tue, 4 Apr 2023 16:40:42 +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 00/32] Add parents to struct pmu -> dev Message-ID: <2023040423-hungry-cadet-1fc1@gregkh> References: <20230404134225.13408-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230404134225.13408-1-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:53PM +0100, Jonathan Cameron wrote: > These are the low hanging fruit following GregKH's feedback that > all the devices registered via perf_pmu_register() should have parents. > > Note that this causes potential ABI breakage. > > It may fall in the category of it isn't breakage if no one notices > but I can't be certain of that. Whilst it is arguable that > no one should be been accessing PMUs except via the event_source > bus, there was documentation suggesting /sys/devices/ for particular > PMUs (because it was a shorter path?) > > The first patch is pulled out of the series: > https://lore.kernel.org/linux-cxl/20230327170247.6968-1-Jonathan.Cameron@huawei.com/ > [PATCH v3 0/5] CXL 3.0 Performance Monitoring Unit support > > In that particular case it is very useful to be able to figure out which > CXL device the PMU device is associated with and looking at it's parents > in the device model as shown with ls -lh /sys/bus/event_sources/devices/ > is a very easy way to do this (once it is correctly parented). > > Addressing all the other instances of struct pmu not covered by this series > is likely to be a more complex discussion but unlikely to have an affect > on what is proposed here. > > Documentation updates deliberately 'fixed' in separate patches before > changing the path to highlight that using /sys/bus/event_source/devices > path is unchanged by this series and that is presumed to be the > most common way these files are accessed. For the whole series, looks good: Reviewed-by: Greg Kroah-Hartman