Received: by 2002:a17:90a:2044:0:0:0:0 with SMTP id n62csp527960pjc; Mon, 20 May 2019 11:17:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlaFEq5kepfm28kKDEiyXyoqybfVwgWb3UREP/RO6l0SGjgELXQW4kgzTr3ry+sfOr+Rfv X-Received: by 2002:a17:902:201:: with SMTP id 1mr32498040plc.263.1558376238331; Mon, 20 May 2019 11:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558376238; cv=none; d=google.com; s=arc-20160816; b=PIAWSv+7s/RbOVLYtQDGkdStK7FT/I+EbgqQA6FsFvPFYix8qjVykLWstMOEbxO80/ Xh2Ex2l6zAUoP3O4DrYIt/fWdbJwRPF4RxxCjG9Gy0tcPCd9NXTzka3NZJe3Z7xHkPxJ Y3gVfIwhQEL+jyjKZm3DIrt68bOZinnf5Aajmv+/hTcoUrKUKLxMZ03F+BL4EDA4dmLk 7RRz12JVPHiePmo2UwTfg6CVW9r9joVvK/xRgc84SSDO53gMVaFSD23gWrIr+f65iu2N fyrmn5jjDze5/rF9p6R2n+n9ScsFKGV9qY4HPzyU7O5bFpwtx4FIaTW4Eux+uFdtbCZG ZP4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AxyrM92SoStdJu7LrRuniDeX/Yray5j+8lJuVDFYVgU=; b=RSsKXHpIJzptdP187OplTuyhPqmaQReBmaWqofy3cEdlMJrrp/+1sVpXgmQUK1p0pW AVZvzJnRt2ShRJBDbHaIOuz73U3PzGz/kj5OnMAERfJwjABN0Qub6YV/KVeLEzYKftQi 1EMTr+On5ijE8ZHY0GIbECmWdrOeI/sjZBeuyyMbObFjq38suS+LMY/Wc8ORqjZsH6+E dwgf6iZLd+I7oih4/YaONFlZw3d8rbL5AC5lY7K+V1MyWrf1rJJZtjubx9vmkMRzRQUm N9KjmJqOQiiprYSYmntjaXXlZutgHZYrLzWSOwOcrW4KKk+e4X28vtjc4saFS8lfLtgP ROug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xo4ZHT4m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si17880970plo.342.2019.05.20.11.17.03; Mon, 20 May 2019 11:17:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xo4ZHT4m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392370AbfETPx3 (ORCPT + 99 others); Mon, 20 May 2019 11:53:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:33294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732739AbfETPx2 (ORCPT ); Mon, 20 May 2019 11:53:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DAA062171F; Mon, 20 May 2019 15:53:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558367607; bh=ac1b1jCxLjY2FZmceWcc+JaCxsTCvtllKwsgmNg1va8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xo4ZHT4ml6AeVQ6aPR0ZrojY+F5puItLp/Mpg85/Y29AxD13EHRmJHLfOoXfHRLbA snfUyh6yWOzFoqp9Drcl803jpNQOI6/7jhVwByE92ud2sbYgzI8xPY4q1/Zd0x8gX4 EWLK5X/UpCJkRZEpJhAiID4sjmSRv+eFU/Y59MAU= Date: Mon, 20 May 2019 17:53:25 +0200 From: Greg Kroah-Hartman To: Liming Sun Cc: Andy Shevchenko , Darren Hart , Vadim Pasternak , David Woods , "platform-driver-x86@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "David S. Miller" , Mauro Carvalho Chehab , Jonathan Cameron , Nicolas Ferre , "Paul E. McKenney" Subject: Re: [PATCH v5 2/2] platform/mellanox/mlxbf-bootctl: Add the ABI definitions Message-ID: <20190520155325.GA13939@kroah.com> References: <0b74e9ad12360b56bc0a3c2ca972798c424f2610.1548790896.git.lsun@mellanox.com> <1558115345-32476-2-git-send-email-lsun@mellanox.com> <20190517175926.GA24535@kroah.com> <20190518063501.GA26163@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 20, 2019 at 03:20:02PM +0000, Liming Sun wrote: > Please see response inline. > > > -----Original Message----- > > From: Greg Kroah-Hartman > > Sent: Saturday, May 18, 2019 2:35 AM > > To: Liming Sun > > Cc: Andy Shevchenko ; Darren Hart ; Vadim Pasternak ; David > > Woods ; platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org; David S. Miller > > ; Mauro Carvalho Chehab ; Jonathan Cameron > > ; Nicolas Ferre ; Paul E. McKenney > > Subject: Re: [PATCH v5 2/2] platform/mellanox/mlxbf-bootctl: Add the ABI definitions > > > > On Fri, May 17, 2019 at 08:36:53PM +0000, Liming Sun wrote: > > > Thanks Greg for the comments! Please see my response inline. > > > > > > Regards, > > > - Liming > > > > > > > -----Original Message----- > > > > From: Greg Kroah-Hartman > > > > Sent: Friday, May 17, 2019 1:59 PM > > > > To: Liming Sun > > > > Cc: Andy Shevchenko ; Darren Hart ; Vadim Pasternak ; > > David > > > > Woods ; platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org; David S. Miller > > > > ; Mauro Carvalho Chehab ; Jonathan Cameron > > > > ; Nicolas Ferre ; Paul E. McKenney > > > > Subject: Re: [PATCH v5 2/2] platform/mellanox/mlxbf-bootctl: Add the ABI definitions > > > > > > > > On Fri, May 17, 2019 at 01:49:05PM -0400, Liming Sun wrote: > > > > > This commit adds the ABI definitions exposed to userspace for > > > > > the platform/mellanox/mlxbf-bootctl driver. > > > > > > > > > > Reviewed-by: Vadim Pasternak > > > > > Signed-off-by: Liming Sun > > > > > --- > > > > > .../ABI/testing/sysfs-platform-mellanox-bootctl | 58 ++++++++++++++++++++++ > > > > > MAINTAINERS | 1 + > > > > > 2 files changed, 59 insertions(+) > > > > > create mode 100644 Documentation/ABI/testing/sysfs-platform-mellanox-bootctl > > > > > > > > > > diff --git a/Documentation/ABI/testing/sysfs-platform-mellanox-bootctl b/Documentation/ABI/testing/sysfs-platform-mellanox- > > > > bootctl > > > > > new file mode 100644 > > > > > index 0000000..19a14db > > > > > --- /dev/null > > > > > +++ b/Documentation/ABI/testing/sysfs-platform-mellanox-bootctl > > > > > @@ -0,0 +1,58 @@ > > > > > +What: /sys/bus/platform/drivers/mlxbf-bootctl/lifecycle_state > > > > > +Date: May 2019 > > > > > +KernelVersion: 5.3 > > > > > +Contact: "Liming Sun " > > > > > +Description: > > > > > + The Life-cycle state of the SoC, which could be one of the > > > > > + following values. > > > > > + Production - Production state and can be updated to secure > > > > > + GA Secured - Secure chip and not able to change state > > > > > + GA Non-Secured - Non-Secure chip and not able to change state > > > > > + RMA - Return Merchandise Authorization > > > > > > > > A "driver" does not have a lifecycle state, a "device" does. > > > > > > > > You are putting all of these attributes in the wrong place. Put them on > > > > your device please, not the driver. driver-specific attributes are > > > > _VERY_ rare, and only for things that can modify/show for all devices > > > > attached to that driver. > > > > > > This driver is running on the ARM processor of the SoC. The 'device' is > > > the SoC itself. That's to say, there is only one device here attached to > > > the driver and the driver state will also be the device state. > > > > That might be true today, but maybe not tomorrow :) > > > > Anyway, again, this is device state, not driver state. > > Yes, I agree. I discussed with the team and will move these attributes > under device (since they could be all considered as device state). Great. > > > This interface has been used by user-space applications for a couple of > > > releases. It'll be great if it could stay in such way for compatibility. Please > > > advise if this is strongly preferred to move them under devices. > > > > So this is code that is already in the tree, and is just now being > > documented? What .c file(s) is this referring to? > > This code is not in the kernel tree yet. It has been in Mellanox BlueField > SW packages for a couple of releases and is trying to be up-streamed now. Ok, then whatever happened in the past, before anyone in the community reviewed your code, and merged it into the kernel tree, does not count :) Where is the first patch in this series? I'll be glad to review your actual sysfs implementation if you point me at it. > > As for "comptability", sysfs is made such that if a file is not present, > > userspace should be able to survive, that is why it is > > one-value-per-file. What tool is using this, and where is the source > > for it? > > The latest 2.0 code can be found at link > https://github.com/Mellanox/mlxbf-bootctl/tree/2.0 > > In file mlxbf-bootctl.c, currently it uses the 'drivers' path as sysfs path. > #define SYS_PATH "/sys/bus/platform/drivers/mlx-bootctl". We could > update it to support both paths. Please do so. thanks, greg k-h