Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4042764imm; Thu, 17 May 2018 21:06:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpxjOw7vlI+C0fRYgdXwhpCfvXr4PPFGZfQjhuLyWfjk+4PwIupAHp1yOnX/FaadkD6zXnJ X-Received: by 2002:a62:1fc8:: with SMTP id l69-v6mr7777700pfj.49.1526616367080; Thu, 17 May 2018 21:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526616367; cv=none; d=google.com; s=arc-20160816; b=U/XvHDuAPIduZ2ZTZWaXSWaRWcLxP8wgLjMjrKSEc2N/0hvq+z5P7EWtcMEAysi08N 2fYIOfbnqLfsMlBQ6RC8HTE49owuUkpQ7/Y/H1SuE3BwFcX4LMPrE74f7+FJ7A771t1P 3IW5e5Q8yRBFsbZ5CVuG9MXLEISdmW9lfdbAHivDj3YTzt8VhfViQxzfnBLsDnBLKnLG Z5jW0wbUowm5tfoPMa2Ms9jnAd3pW/4F/RQtsjVEBGZnjlVyKcWjICvpmJigLwW2+TJl ylbXbETyY5BXP/ieaTTuCSkt/H+5C2Iv2PgjnAOFdV0BGxkioaz5memtqdYihNZLptV2 +97w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:from:cc:references:to :subject:arc-authentication-results; bh=sVgDkmepISKZhfRKP5xlaHpCW/3cWMwFcgPpjjwAhOk=; b=PHnXHlM7UdYhSbIHJDIXMaBRrE32O4fyZOzLKq7rApxZ3KPHrJMn9N09CwGmuHe7eh CNUuW0rcaI+IHmfLs9aiN31C2nRCP/Kgv/FtTj9XW3jfbz252W0vduuhGRHG4univ9m3 HhdrXkSvQSi6wDNV/Y0/za5UBm7ljvhmMHXqidyurfArXimoEZrC9Bz1M9mGSo8EZ0Eu 1HbPD/wjbvYOixs2/08n3d9pKWuQQAVnHfrhzU0B4b5ufYNJfjFlXviH4i1ZfKzBKS2T SaZK2kqiWC+fwz4CGkYB2nYA2NGyCUo0wcfvp0M5K4L+Dc53kr6yf6kHXLf+pxpBpVXQ S9Mw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a90-v6si6516677plc.329.2018.05.17.21.05.52; Thu, 17 May 2018 21:06:07 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751496AbeEREEQ (ORCPT + 99 others); Fri, 18 May 2018 00:04:16 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40910 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbeEREEP (ORCPT ); Fri, 18 May 2018 00:04:15 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4I44Ctq075844 for ; Fri, 18 May 2018 00:04:14 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j1jmjhbgk-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 18 May 2018 00:04:14 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 May 2018 05:04:04 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 18 May 2018 05:04:01 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4I440fW7668100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 18 May 2018 04:04:00 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 82D7D11C066; Fri, 18 May 2018 04:55:13 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 03ECF11C052; Fri, 18 May 2018 04:55:12 +0100 (BST) Received: from oc4502181600.ibm.com (unknown [9.195.36.231]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 18 May 2018 04:55:11 +0100 (BST) Subject: Re: [PATCH 0/3] Add support to disable sensor groups in P9 To: Guenter Roeck References: <1521716075-807-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <20180515150205.GA29321@roeck-us.net> <2ceb6b30-60b7-d985-ee0d-6c5784eda273@linux.vnet.ibm.com> <56bba97b-c6ee-e7a1-136c-a2236437484a@roeck-us.net> 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 From: Shilpasri G Bhat Date: Fri, 18 May 2018 09:33:57 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <56bba97b-c6ee-e7a1-136c-a2236437484a@roeck-us.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18051804-0008-0000-0000-000004F7BE67 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051804-0009-0000-0000-00001E8C37AF Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-18_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805180042 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/17/2018 06:08 PM, Guenter Roeck wrote: > On 05/16/2018 11:10 PM, Shilpasri G Bhat wrote: >> >> >> On 05/15/2018 08:32 PM, Guenter Roeck wrote: >>> 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. >>> >> >> Thanks for the reply. I have tried to answer your questions according to my >> understanding below: >> >>> 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. >> >> I agree. >> >>> >>> Given that, we need to have a discussion about adding _enable attributes to >>> the ABI >> >>> what is the scope, >> IIUC the scope should be RW and the attribute is defined for each supported >> sensor group >> > > That is _your_ need. I am not aware of any other chip where a per-sensor group > attribute would make sense. The discussion we need has to extend beyond the need > of a single chip. > > Guenter > Is it okay if the ABI provides provision for both types of attribute power_enable and powerX_enable. And is it okay to decide which type of attribute to be used by the capability provided by the hwmon chip? - Shilpa >>> when should the attributes exist and when not, >> We control this currently via device-tree >> >>> do we want/need power_enable or powerX_enable or both, and so on), and >> We need power_enable right now >> >>> what to return if a sensor is disabled (such as -ENODATA). >> -ENODATA sounds good. >> >> Thanks and Regards, >> Shilpa >> >> 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 >>> >> >> >