Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp720568rwp; Wed, 12 Jul 2023 23:06:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlHZyCC9BzzNMFIjxy/8hwTVTRiBQkuXW1LkUal5g3/acsGCyJ3M8eN9hM2F/yBmdkPpNkZZ X-Received: by 2002:ac2:5f0a:0:b0:4fb:8bfd:32e4 with SMTP id 10-20020ac25f0a000000b004fb8bfd32e4mr315583lfq.13.1689228374001; Wed, 12 Jul 2023 23:06:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689228373; cv=none; d=google.com; s=arc-20160816; b=I5o3CdGMYyFEUsHdMQV8zaax8YHqFsBUOWuL8drlrMw0F5TdSfKadRbTl6/DDjaX73 8tYMnKU8BvGPI0iMXsIFGW3MwSjqoFYvoZTX+CNnbz1fsl2gntG6Ya9d9Bw6jIOnKWiT OEbDO2h4uKTDAAIwx7WUkzTTOJFz1QRu2RzP//20yDqBcRvc9nL97bva0muaGoiP1+Qb 9z2KDeKc6RkPn/jLZVVNc/Gg8l56vUaSUw4l4DpKYebfduSo7ASw8XOk+y3kG890hQx5 A803jq+OlYyZVpzvPo1TvcST9Hz7IxyQMlzz3xvc9zME07wrGIexGIOtw0AgkT+RS6zP C/xA== 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=ku2dswFrtD8rUlchThVcntSYoHY32Xcb5iR3o3mRDDc=; fh=GOsgxbxRSArVVaSo3RPfQW83VyLcLPzNILXiziSRlTw=; b=iPN336AGm6R7igvojiBVu+wpiLN09IBPAJuFDSYcxy4K2zJyK26uBVQy4l8wkl2XgI HEl4beUE4H966DDw/+iJYQmlDuxiysOICbWkJtqLA83s8g3DbiiipVsK6uwBLzOg04QR geI//H8ayWQsoNybqk0s69vz1NWIUlp+odsoTwkinaj9GDqh9ka5wlhcBa5AR5X326W/ MeSTHylR9YICqBia9t0Udb4/Tjmuky0p+W7FP/Q3k5/Bdm+ga2yP9cKPwLrXeEDRaVCM A1loi3c/d6Rq2iY92hIM4Cl7wjK3+IJK6mcbnd9dzmYOe9SsLjCc6q47yPKKjml+jvGz mYNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WpwksOFf; 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 p20-20020a056402075400b0051e193964f6si6660531edy.298.2023.07.12.23.05.49; Wed, 12 Jul 2023 23:06:13 -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=WpwksOFf; 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 S233929AbjGMF51 (ORCPT + 99 others); Thu, 13 Jul 2023 01:57:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233809AbjGMF50 (ORCPT ); Thu, 13 Jul 2023 01:57:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 248E32101 for ; Wed, 12 Jul 2023 22:57:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9F4C461A1B for ; Thu, 13 Jul 2023 05:57:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88018C433C8; Thu, 13 Jul 2023 05:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1689227843; bh=q9r7XL80n84mZRG4PdZ0AdqE+56ebbBdWajAjngC5A8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WpwksOFfZ76NAFPXnmei8z70xdfDaIKdLVMBAYNN22wjjZlXvvBLo6lAjEWQUZv5A BHToA1aR6mUvDYof73pZQZ6tpDmb1As2JaOn+UZ1OrrFCIzki+1BreX8lH1aHehHjk drTpwemmCubIBahWBdVTgKtwCVwqHk4hg+7hAP2s= Date: Thu, 13 Jul 2023 07:57:17 +0200 From: Greg KH To: "Gangurde, Abhijit" Cc: "linux-kernel@vger.kernel.org" , "Gupta, Nipun" , "Agarwal, Nikhil" , "Gupta, Puneet (DCG-ENG)" , "git (AMD-Xilinx)" , "Simek, Michal" , "Jansen Van Vuuren, Pieter" Subject: Re: [PATCH 3/4] cdx: create sysfs resource files Message-ID: <2023071303-encore-emporium-b847@gregkh> References: <20230711121027.936487-1-abhijit.gangurde@amd.com> <20230711121027.936487-4-abhijit.gangurde@amd.com> <2023071148-grievance-gulf-0841@gregkh> <2023071231-drinking-unskilled-3c00@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thu, Jul 13, 2023 at 05:36:25AM +0000, Gangurde, Abhijit wrote: > [AMD Official Use Only - General] > > > > > > Resource files provides the basic MMIO regions info to the > > > > > user-space. Also, resources devices can be used to mmap the > > > > > MMIO regions in the user-space. > > > > > > > > > > Co-developed-by: Puneet Gupta > > > > > Signed-off-by: Puneet Gupta > > > > > Co-developed-by: Nipun Gupta > > > > > Signed-off-by: Nipun Gupta > > > > > Signed-off-by: Abhijit Gangurde > > > > > Reviewed-by: Pieter Jansen van Vuuren > > > vuuren@amd.com> > > > > > Tested-by: Nikhil Agarwal > > > > > --- > > > > > Documentation/ABI/testing/sysfs-bus-cdx | 15 +++ > > > > > drivers/cdx/cdx.c | 139 +++++++++++++++++++++++- > > > > > include/linux/cdx/cdx_bus.h | 10 ++ > > > > > 3 files changed, 163 insertions(+), 1 deletion(-) > > > > > > > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-cdx > > > > b/Documentation/ABI/testing/sysfs-bus-cdx > > > > > index d9e00058471d..6ca47b6442ce 100644 > > > > > --- a/Documentation/ABI/testing/sysfs-bus-cdx > > > > > +++ b/Documentation/ABI/testing/sysfs-bus-cdx > > > > > @@ -76,3 +76,18 @@ Description: > > > > > For example:: > > > > > > > > > > # echo 1 > /sys/bus/cdx/devices/.../remove > > > > > + > > > > > +What: /sys/bus/cdx/devices/.../resource > > > > > +Date: July 2023 > > > > > +Contact: puneet.gupta@amd.com > > > > > +Description: > > > > > + The resource file contains host addresses of CDX device > > > > > + resources. Each line of the resource file describes a region > > > > > + with start, end, and flag fields. > > > > > > > > If you documented what this file looked like here, it would be obvious > > > > that this is not an acceptable sysfs file in any sense of the word. > > > > > > > > Please do so, and then fix the patch to not do that at all. > > > > > > Similar interface exist for pci and we intended to keep it same way. Could you > > please elaborate on this. > > > > > > # cat /sys/bus/pci/devices/0000\:01\:00.0/resource > > > 0x0000000092100000 0x00000000921fffff 0x000000000014220c > > > 0x0000000000000000 0x0000000000000000 0x0000000000000000 > > > > Please don't propagate incorrect decisions in the past. > > > > Why do you need all of these "resources" in userspace? What tool is > > going to read and parse them and do something with them? > > > > This really violates the "one value per file" sysfs rule, you are going > > to have to have a huge reason why this is not applicable here, AND you > > are going to have to document it very very well and get everyone to > > agree with it. > > We don't have any strong reason apart from that this is being used by some > test and debug applications. Will drop this one now and revisit later by > complying to the specifications. If it's only for debug stuff, then use debugfs, that's what it is there for. thanks, greg k-h