From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_FONT_FACE_BAD,HTML_MESSAGE, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CEC6C4363A for ; Tue, 20 Oct 2020 23:18:00 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3470B223BF for ; Tue, 20 Oct 2020 23:17:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tOMmojlH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3470B223BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CG8g866kkzDqfp for ; Wed, 21 Oct 2020 10:17:56 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::72f; helo=mail-qk1-x72f.google.com; envelope-from=tbnguyen1985@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=tOMmojlH; dkim-atps=neutral Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CG8dj6F84zDqf5 for ; Wed, 21 Oct 2020 10:16:39 +1100 (AEDT) Received: by mail-qk1-x72f.google.com with SMTP id f21so505044qko.5 for ; Tue, 20 Oct 2020 16:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QOG4WfFr1DbXDcupgiomKjiB/SEEOKUmSZCw6V9NPmg=; b=tOMmojlHiIqEBf1XMLIh1ALm0F9QR2/QZ1PNe1uPJQfeB7IYs/S6G1rbp/EuF9hseK vH0XTXF87lw5kDnvXGPr06CPeNym9psmButANrffifx6RJf5RkYPRZAq9vZPGysZ9qLI FOZ9MjiRMxjF5hK4a/g6VXN+RpraRJotELJVnVm0RB4zEBAqzvESF+8QFpKfCcjRgv2U YIo5etfyE01WYOTioWIeRVGHdhaJwPNnjYYlu6jYBUstMPGVPh/h1AXRc2cNlu2eevRh JEBRVHcrQL4yo6QuZMJ2KTkPpnxT85K2eH32ndpMQ5bd+GoYUleTfNs7LxSDxkf9EAL8 Zs4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QOG4WfFr1DbXDcupgiomKjiB/SEEOKUmSZCw6V9NPmg=; b=L0OjKDZXrHxwGB3Xa9rCsEDW73Bibj+WxPB0kq8d/bgE8yTNWtOFTPYXY316d4zPWl uWwL32UvzsoL+8MdjIHsKL84IWzfEAa5S+QJIad8Xw+lNK1bzzah+GwqrijGi0C1B3iv W5qZ/gTEl/Tu/9Dg+DGMai8FXOEgfxrboYWefXGc9i+0qobpwn0d2080BIDvf8EI04/G hLTBKyr3YAg0XwGTUpvczBILaMV+ty0Gut47rSDGKhcUC/kMEzlMYCw2geQwdKMoMWK/ 7zjAKxhPs+BYHPWnB5uyAhOTWrBx+eXlhyQk3ZRkALpD7AwbhaKHx/proIuUob6zl+Jx i+Lg== X-Gm-Message-State: AOAM531hIdrDxCW8bqJVSUPnk9t7w/YIvoyb5v0GnK840XNxKlwoVzMZ DFg/4Bhf58qxXQpQnMU+0Yiiz3cHZojk3RvtdFPuJr+6tj4= X-Google-Smtp-Source: ABdhPJwgqaGMsluS4gGn1hLYnaF1cZpMVEb1LR7qDKaa1lKcqMeukA7gjYQSnGDHpianVRyRDQ6cBTnQ4PW6ujtbxNg= X-Received: by 2002:a05:620a:2e3:: with SMTP id a3mr598479qko.117.1603235796068; Tue, 20 Oct 2020 16:16:36 -0700 (PDT) MIME-Version: 1.0 References: <4ff7b0cc-8e61-7fa7-19be-8427f281a0fc@linux.ibm.com> <2ac65a96-a447-e5b6-037d-2d785c16244b@linux.ibm.com> In-Reply-To: <2ac65a96-a447-e5b6-037d-2d785c16244b@linux.ibm.com> From: Thu Ba Nguyen Date: Wed, 21 Oct 2020 06:16:24 +0700 Message-ID: Subject: Re: Enable/Disable some sensors when Host On/Off To: Matt Spinler Content-Type: multipart/alternative; boundary="0000000000001dad3e05b2226c28" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: OpenBMC Maillist Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" --0000000000001dad3e05b2226c28 Content-Type: text/plain; charset="UTF-8" On Tue, Oct 20, 2020 at 8:46 PM Matt Spinler wrote: > > > On 10/19/2020 10:23 AM, Thu Ba Nguyen wrote: > > Thanks for your reply Matt Spinler, Can you show me the discussion > > threads? I also... > > This Message Is From an External Sender > > This message came from outside your organization. > > > > Thanks for your reply Matt Spinler, > > > > Can you show me the discussion threads? > > Sure: https://lists.ozlabs.org/pipermail/openbmc/2019-October/018967.html > > > > > I also thought about the solution for that features: > > In the current hwmon we support GPIOCHIP + GPIO option which used to > > enable sensors to read. In the hwmon code, we just set that pin and > > wait before reading. > > I think we can support a similar option named GPIOENABLE + GPIOV. When > > the status of Gpio pin defind in GPIOEANBLE match with GPIOV. > > That sensors will be read and update to Dbus. > > If not it will be removed from DBus until the GPIO pin math GPIOV. > > Maybe we can have many different solutions. > > As Ed mentioned, I think a good direction to start with is how > dbus-sensors handles it, so we can have > common behavior. I believe they look at the host state D-Bus property > and still keep the sensor > on D-Bus even when power is off. > [Thu] Yah, I think using the host state D-Bus property to verify host state. Then handling the host sensors based on this status is a better solution. Keeping the sensors on Dbus can cause the value or the status of warning/critical value of sensors is out update. I expected that the host sensors will be removed from Dbus when the host is off. > > > If you don't mind, can you tell me how IBM supports that features? > > We lucked out out in that the driver was only loaded when power was on. > [Thu] What will be displayed when you open health --> sensors page in OpenBmc web? Are the host sensors still there and value is "na" or some things like that? > > > > > Regards. > > Thu Nguyen. > > > > On Mon, Oct 19, 2020 at 9:16 PM Matt Spinler > > wrote: > > > > > > > > On 10/18/2020 8:58 AM, Thu Ba Nguyen wrote: > > > Dear, I'm supporting the host sensors for Ampere Computing LLC > > > platform. We are... > > > This Message Is From an External Sender > > > This message came from outside your organization. > > > > > > Dear, > > > > > > I'm supporting the host sensors for Ampere Computing LLC platform. > > > We are using phosphor-hwmon to update values of sensors and > > monitoring > > > sensors warning/errors base on threshold setting. > > > > > > There are some sensors which are turned off when host Off. It > > can be > > > the sensors reported by host or voltage/temperature/power sensors > > > which use the same power source with host. > > > > > > I researched in openBmc sensor-architecture documents but can't > > find > > > any option to enable/disable sensors base on one status or GPIO > > pins. > > > I can't use REMOVERCS. > > > > > > Research in phosphor-hwmon code, I don't see the answer too. > > > > > > Do we have any options/solution to Enable/Disable some sensors when > > > Host On/Off? > > > > Hi, > > The phosphor-hwmon code doesn't support that yet. It has been > > discussed > > before but nobody > > has implemented it. > > > > > > > > Thanks. > > > Thu Nguyen. > > > > --0000000000001dad3e05b2226c28 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Oct 20, 2020= at 8:46 PM Matt Spinler <mspi= nler@linux.ibm.com> wrote:


On 10/19/2020 10:23 AM, Thu Ba Nguyen wrote:
> Thanks for your reply Matt Spinler, Can you show me the discussion > threads? I also...
> This Message Is From an External Sender
> This message came from outside your organization.
>
> Thanks for your reply Matt Spinler,
>
> Can you show me the discussion threads?

Sure: https://lists.ozlabs.org/pi= permail/openbmc/2019-October/018967.html

>
> I also thought about the solution for that features:
> In the current hwmon we support GPIOCHIP=C2=A0+ GPIO=C2=A0option which= used to
> enable sensors to read. In the hwmon code, we just set that pin and > wait before reading.
> I think we can support a similar option named GPIOENABLE=C2=A0+ GPIOV.= When
> the status of Gpio pin defind in GPIOEANBLE=C2=A0match with GPIOV.
> That sensors will be read and update to Dbus.
> If not it will be removed from DBus until the GPIO pin math GPIOV.
> Maybe we can have many different solutions.

As Ed mentioned, I think a good direction to start with is how
dbus-sensors handles it, so we=C2=A0 can have
common behavior.=C2=A0 I believe they look at the host state D-Bus property=
and still keep the sensor
on D-Bus even when power is off.
=C2=A0
[Thu= ] Yah, I think =C2=A0using=C2=A0the host state D-Bus property=C2=A0to verify host state.
Then handling the host sensors based on this status is a better solution.<= /span>
Keeping the sensors on= Dbus can cause the value or the status of warning/critical value of sensor= s
is out update. I exp= ected that the host sensors will be removed from Dbus when the host is off.=

>
> If you don't mind, can you tell me how IBM supports that features?=

We lucked out out in that the driver was only loaded when power was on.
=
[Thu] What will be displayed when you open health --> = sensors page in OpenBmc web?=C2=A0
Are the host sensors still the= re and value is "na" or some things like that?

>
> Regards.
> Thu Nguyen.
>
> On Mon, Oct 19, 2020 at 9:16 PM Matt Spinler <mspinler@linux.ibm.com
> <mailto:mspinler@linux.ibm.com>> wrote:
>
>
>
>=C2=A0 =C2=A0 =C2=A0On 10/18/2020 8:58 AM, Thu Ba Nguyen wrote:
>=C2=A0 =C2=A0 =C2=A0> Dear, I'm supporting the host sensors for = Ampere Computing LLC
>=C2=A0 =C2=A0 =C2=A0> platform. We are...
>=C2=A0 =C2=A0 =C2=A0> This Message Is From an External Sender
>=C2=A0 =C2=A0 =C2=A0> This message came from outside your organizati= on.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Dear,
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> I'm supporting the host sensors for Ampere= Computing LLC platform.
>=C2=A0 =C2=A0 =C2=A0> We are using phosphor-hwmon to update values o= f sensors and
>=C2=A0 =C2=A0 =C2=A0monitoring
>=C2=A0 =C2=A0 =C2=A0> sensors warning/errors base on threshold setti= ng.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> There are some sensors which are turned off wh= en host=C2=A0Off. It
>=C2=A0 =C2=A0 =C2=A0can be
>=C2=A0 =C2=A0 =C2=A0> the sensors reported by host or voltage/temper= ature/power sensors
>=C2=A0 =C2=A0 =C2=A0> =C2=A0which use the same power source with hos= t.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> I researched in openBmc sensor-architecture do= cuments=C2=A0but can't
>=C2=A0 =C2=A0 =C2=A0find
>=C2=A0 =C2=A0 =C2=A0> any option to enable/disable sensors base on o= ne status or GPIO
>=C2=A0 =C2=A0 =C2=A0pins.
>=C2=A0 =C2=A0 =C2=A0> I can't use REMOVERCS.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Research in phosphor-hwmon code, I don't s= ee the answer too.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Do we have any options/solution to=C2=A0Enable= /Disable some sensors when
>=C2=A0 =C2=A0 =C2=A0> Host On/Off?
>
>=C2=A0 =C2=A0 =C2=A0Hi,
>=C2=A0 =C2=A0 =C2=A0The phosphor-hwmon code doesn't support that ye= t.=C2=A0 It has been
>=C2=A0 =C2=A0 =C2=A0discussed
>=C2=A0 =C2=A0 =C2=A0before but nobody
>=C2=A0 =C2=A0 =C2=A0has implemented it.
>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Thanks.
>=C2=A0 =C2=A0 =C2=A0> Thu Nguyen.
>

--0000000000001dad3e05b2226c28--