Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp761515imm; Tue, 15 May 2018 08:48:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqdfv+qIeomTqVqMQgcSkuAE0f3IM3cSa0Ayj14rmpd04A1bIiJ53MeOxY2vMhk4w5rJTo2 X-Received: by 2002:a62:ba09:: with SMTP id k9-v6mr15633621pff.245.1526399329871; Tue, 15 May 2018 08:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526399329; cv=none; d=google.com; s=arc-20160816; b=ts2r1Y6ysq3p8fblJnEoNbnjYYwv+PIv5RhLn/PtvkYo1qUUlNit7afYeFu5L7Y/tl szaogmQhYDNoqSU2JLmC0yWZq+VptTqpwQfl5ELJR5FdCl5SPQgbJCeQIkkn4eUMjJRS SstuUF2f7f81JKAwdKEV/ybdnR8KZa4LsMFJhbPZnyKwZLIlaWKptT/vlGpXbuqpCtZP fId3Nn80ggoaF8wa1j+AqAs1PC3GMPihsSIq9ZUBfvjhdteBVcrJSm4/1sUqq/aZslbx cucI/B640ol0wmUB0H81xu4CsWjF6zXSchiqLsWn+dGvu62MTUYfBeLNsYCjOdz9Wzzv IQJw== 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:arc-authentication-results; bh=q1w+QWxSqkIkXdMsxwqO/xP0qBMeX1VEuttIF95QVFg=; b=tdnoV6DNX27VCkb9B9IA1VRqZ3vZFMilS7Hd9qsD6xNqOOwv4oOwEKKcNj+Jse06eV ajFi207e/R+sy6IYGzdxVSWH78N2qkb9moIwG2U3NKeT6Nh1nWWJ9ONnhxzms1loOIMv 8dsPnl3bZ0MNqdElO2cjS3FiVPqSFJWX2Q3JzkdouhfU9JERF1J1iHWx1vA78VZf1rSf SHwbGImOe+F+p4dSt0oIdy9OPsFxj14trnZRrsq8929C43M9kMeQM1UGUuoGtgdugADQ KDRxAB+52A9GniOZLQRDCpqw/Mhg/mLX0rZ5CxCS783TbTakeDwtM0hXjjvilkMTGP4o aDHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=IF7zhAFc; 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 j33-v6si302235pld.151.2018.05.15.08.48.35; Tue, 15 May 2018 08:48:49 -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=fail header.i=@roeck-us.net header.s=default header.b=IF7zhAFc; 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 S1752454AbeEOPCP (ORCPT + 99 others); Tue, 15 May 2018 11:02:15 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:48054 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752024AbeEOPCM (ORCPT ); Tue, 15 May 2018 11:02:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=q1w+QWxSqkIkXdMsxwqO/xP0qBMeX1VEuttIF95QVFg=; b=IF7zhAFcLIjjaLqiBCKizJpaZL KaE3WQwHRBGwidL2rZByNmF3PTvJPCWcUesbXotrHBsVzpFDuPT7ShT0B2xJAydhmohRdQYkX+4Ep i7MglqkZIoAY0ia6u+tnTHRtQREUb+OdXZKpV3r9hQJKgWu6y4WFwgUZ3XbqOGuErsrUvgM0MOTWS FwkhN4AEAEHZbdOgqgtW6KWjcmdRLBkDE+RdfyMd8rMFHQ6sA86XYT2YkB1YoMXsrKS0O8E5uzD1S LmiyK/uqYaI+JrTrBbQmdKd6tpflnNQAOCuTWshhTw1SmdMkyP4OJbg3M9miyiNqSYqoM5P2HRTnE EZWoF21Q==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:43940 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.89) (envelope-from ) id 1fIbSo-000uCH-64; Tue, 15 May 2018 15:02:11 +0000 Date: Tue, 15 May 2018 08:02:05 -0700 From: Guenter Roeck To: Shilpasri G Bhat Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, stewart@linux.vnet.ibm.com Subject: Re: [PATCH 0/3] Add support to disable sensor groups in P9 Message-ID: <20180515150205.GA29321@roeck-us.net> References: <1521716075-807-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521716075-807-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 22, 2018 at 04:24:32PM +0530, Shilpasri G Bhat wrote: > This patch series adds support to enable/disable OCC based > inband-sensor groups at runtime. The environmental sensor groups are > managed in HWMON and the remaining platform specific sensor groups are > managed in /sys/firmware/opal. > > The firmware changes required for this patch is posted below: > https://lists.ozlabs.org/pipermail/skiboot/2018-March/010812.html > Sorry for not getting back earlier. This is a tough one. Key problem is that you are changing the ABI with those new attributes. On top of that, the attributes _do_ make some sense (many chips support enabling/disabling of individual sensors), suggesting that those or similar attributes may or even should at some point be added to the ABI. At the same time, returning "0" as measurement values when sensors are disabled does not seem like a good idea, since "0" is a perfectly valid measurement, at least for most sensors. Given that, we need to have a discussion about adding _enable attributes to the ABI (what is the scope, when should the attributes exist and when not, do we want/need power_enable or powerX_enable or both, and so on), and what to return if a sensor is disabled (such as -ENODATA). Once we have an agreement, we can continue with an implementation. Guenter > Shilpasri G Bhat (3): > powernv:opal-sensor-groups: Add support to enable sensor groups > hwmon: ibmpowernv: Add attributes to enable/disable sensor groups > powernv: opal-sensor-groups: Add attributes to disable/enable sensors > > .../ABI/testing/sysfs-firmware-opal-sensor-groups | 34 ++++++ > Documentation/hwmon/ibmpowernv | 31 ++++- > arch/powerpc/include/asm/opal-api.h | 4 +- > arch/powerpc/include/asm/opal.h | 2 + > .../powerpc/platforms/powernv/opal-sensor-groups.c | 104 ++++++++++++----- > arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + > drivers/hwmon/ibmpowernv.c | 127 +++++++++++++++++++-- > 7 files changed, 265 insertions(+), 38 deletions(-) > create mode 100644 Documentation/ABI/testing/sysfs-firmware-opal-sensor-groups > > -- > 1.8.3.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html