Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4158740pxj; Tue, 15 Jun 2021 17:05:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+D83zLOxvdDIxtzVcOPsl+IXC9GcTvljxjBla/lM6zaL00voXr5B5Be0YLSv06e0CjEoq X-Received: by 2002:a17:906:ecb9:: with SMTP id qh25mr2177077ejb.283.1623801925891; Tue, 15 Jun 2021 17:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623801925; cv=none; d=google.com; s=arc-20160816; b=Bk66mIXyPEMaL+xO4q+TdhFNMGd79t+5bs1wfxSxc79S6RMEzko4YvPqBEd0iGQjxB 0aceLafA/XoRcX16z0QJ5WD+4Cn8O2zYtKR26usby/eghQ/vxhy+oSU7dMdVxVTD4o6K 5Mxfy753jzQu8aVlbi+JF/SNjvz9UJ7lt8ds3bd6YeGV0Evcz/oP1ku3kfaT5S7Et6Fv EhQrKx/C2ChLtpRNcLf3e4GzvNOCOnQ9BkJui8BJ/xJ1IqthpoBF2/MFMu+tJWoWIYr+ aO9HHlJYkzevEW3J2xHFgRXgHUYt42A5XKvNK65boy4434YjQPxgm9GMUod/JnQOj7Da G96Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=ZXo0PhZoNSUZ3l1Q5LtiOiPX9IgGEYztSM5i6ey5PnY=; b=mmGqmXZuIc5ywymHgYBevSham6QybH6GOcb+z66URW10L75RVLPFflZ/hRH30Jba2N oQW6U1oocNjd1Ys4KRARVGtbT64ePitPNK9X7L+Yc6qM96VgB3CnEcqSLsPIwIx22tUw Xk/eQ8I/S7RfVTqPktDX/xlsNAAvIrCU+J+aRPLHh7hFhbn5Emy874alLR/mEX8t/a+l 1wvvG+L4Uy0kZxY7LA7gTtZqrKPM4vSYwiPbjBPbgyH9rFFEF7IhnzkDc3hMsaCT5lT1 eIkJuHc18k1D8o8CcpOFA69dkrV1hIAk5NQD5ZwvUnP0mNzZ9e+AknCrFW8h4qsN3HoJ hjiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=rG6PucE0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si325768edt.322.2021.06.15.17.05.02; Tue, 15 Jun 2021 17:05:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=rG6PucE0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231574AbhFPAFV (ORCPT + 99 others); Tue, 15 Jun 2021 20:05:21 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:59133 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbhFPAFU (ORCPT ); Tue, 15 Jun 2021 20:05:20 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4G4QPY3GL1z9sRf; Wed, 16 Jun 2021 10:03:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1623801794; bh=KmCcyhOsKNECgzYxI+K5ya4vSQmMsByh3se6X2pbJxM=; h=From:To:Subject:In-Reply-To:References:Date:From; b=rG6PucE0qnbHJUQsvwl61MI2R9+EKUsLHuXThKkh4sR+mivSWBIX8eHcWOAIVQeAV hYq5tfNwGZcoeUxw5jEemyogZ5jTLz3BqeMacEF57e6N4c69y0NQ3iaF+wkY9xRLd5 TM5DHyfPwavFJvWg/0fnbiPmU8iQSo+IY+Fmkm1q0FPI/0MT2rk6WHol+cMCjKU82j dZ7/+M1HXINretSGpODV3QZ2TRBg71n1msiqCqEBL6ZKOmMgpQFOTKjaftIkloyCki d8evTzOeecYjGmj/qYcDi+DIGb3LF7S2ftniv3ZqxUnit0MHeAEQv3x1pR61hc2T/f DvyjZYQDftt/g== From: Michael Ellerman To: Fabiano Rosas , Pratik Sampat , benh@kernel.crashing.org, paulus@samba.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, pratik.r.sampat@gmail.com Subject: Re: [RFC] powerpc/pseries: Interface to represent PAPR firmware attributes In-Reply-To: <87tum6vb58.fsf@linux.ibm.com> References: <20210604163501.51511-1-psampat@linux.ibm.com> <87wnr4uhs9.fsf@linux.ibm.com> <5c9cb57b-e9d8-0361-8be7-60dc9618db34@linux.ibm.com> <87tum6vb58.fsf@linux.ibm.com> Date: Wed, 16 Jun 2021 10:03:11 +1000 Message-ID: <875yyeu14w.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fabiano Rosas writes: > Pratik Sampat writes: ... >>> >>>> The new H_CALL exports information in direct string value format, hence >>>> a new interface has been introduced in /sys/firmware/papr to export >>> Hm.. Maybe this should be something less generic than "papr"? >> >> The interface naming was inspired from /sys/firmware/opal's naming convention. >> We believed the name PAPR could serve as more generic name to be used by both >> Linux running on PHYP and linux on KVM. > > Right, I agree with that rationale, but /opal has identifiable elements > in it whereas /papr would have the generic "attr_X_name", which does not > give much hint about what they are. > > We also expect people to iterate the "attr_X_*" files, so if we decide > to add something else under /papr in the future, that would potentially > cause issues with any tool that just lists the content of the directory. > > So maybe we should be proactive and put the hcall stuff inside a > subdirectory already. /papr/energy_scale_attrs comes to mind, but I > don't have a strong opinion on the particular name. Maybe we should use the descriptive part of the hcall. So H_GET_ENERGY_SCALE_INFO -> ../papr/energy_scale_info/ That should help avoid any naming confusion, because every hcall should have a unique name. In future if there's ever a H_GET_ENERGY_SCALE_INFO_2 we would then have to decide if we expose that as a separate directory, or more likely we would handle that in the kernel and continue to use the existing sysfs name. ... > Based on all the new information you provided, I'd say present all the > data and group it under the ID: > > /sys/firmware/papr/energy_scale_attrs/ > |-- / > |-- desc > |-- value > |-- value_desc > |-- / > |-- desc > |-- value > |-- value_desc Yeah that seems reasonable. I'd think we should just omit the value_desc if it's empty. cheers