From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulf Hansson Subject: Re: [PATCH 7/7] drivers: firmware: psci: Announce support for OS initiated suspend mode Date: Mon, 4 Mar 2019 11:25:43 +0100 Message-ID: References: <20190228135919.3747-1-ulf.hansson@linaro.org> <20190228135919.3747-8-ulf.hansson@linaro.org> <155146129938.16805.4528027710288083607@swboyd.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <155146129938.16805.4528027710288083607@swboyd.mtv.corp.google.com> Sender: linux-kernel-owner@vger.kernel.org To: Stephen Boyd , Mark Rutland Cc: "Rafael J . Wysocki" , Lorenzo Pieralisi , Sudeep Holla , Daniel Lezcano , Lina Iyer , Linux PM , Linux ARM , linux-arm-msm , Linux Kernel Mailing List List-Id: linux-arm-msm@vger.kernel.org On Fri, 1 Mar 2019 at 18:28, Stephen Boyd wrote: > > Quoting Ulf Hansson (2019-02-28 05:59:19) > > PSCI firmware v1.0+, supports two different modes for CPU_SUSPEND. The > > Platform Coordinated mode, which is the default and mandatory mode, while > > support for the OS initiated (OSI) mode is optional. > > > > In some cases it's interesting for the user/developer to know if the OSI > > mode is supported by the PSCI FW. Therefore, let's print a message to the > > log, if that is the case. > > I don't see anything wrong with the patch besides the potential for the > logs to wrap and the informational message to be lost, but would it be > possible to express the PSCI features that are supported in sysfs at > /sys/firmware/psci/ somehow? It may be useful for a user to know that > their firmware has PSCI support and that it has a certain set of > features available, like OSI vs. PC, or both. I don't know of any use > that userspace would have though, besides maybe the CPU state residency > counters being used by some sort of statistics collecting program or > just plain knowing that certain PSCI features are present, so perhaps it > could just be done in debugfs for now until a real user exists. Having a sysfs interface for PSCI, allowing users to know a little bit more about what the FW supports/version/etc sound like a great idea to me. There is already quite some prints being made by psci during boot, so perhaps having sysfs allows us to drop some of these. Mark, what do you think? Is it something you think we should do? I can offer my help to implement this, if you think it's a good idea. Stephen, thanks for reviewing! Kind regards Uffe 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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 1F339C43381 for ; Mon, 4 Mar 2019 10:26:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DE1D320823 for ; Mon, 4 Mar 2019 10:26:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hHNtMNwO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FZbVoMDs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE1D320823 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oKYu++cA1t3C/lSBNmQJpRhozdqopTIkb0fc0PH1fwk=; b=hHNtMNwOmfp8Ps puKnhB/XbFFCh7r+OnMkKXrOcpkzIetqmJoiyB97ZzmfXTBysNnRc49dAVuA55/8IA10ovlOfeqje HI9LiwwIz/Dzp5FuXW20BLFjF0kcv9QimgEHRVFx6J7BaS8Q14I4r9NUYzFhd+TCoH9OQM6e6RkUK aKkRq+SkncYPRvWtIljBpTLYVdH3/MWB+IN4VwFtrnJU/ZIIu2aYejz6dnsOedxIrqu4Qh9EoDOtL mMOmCiMDst2lJxpCmpJ89jS6DVqo30dUzHEKzrbVsE76MqSY5xEM/tigWJV2prvVTtJjU0JsD1IX5 WWUVv5VTNZ5KC9OhAIpA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0knf-0005pA-4C; Mon, 04 Mar 2019 10:26:23 +0000 Received: from mail-ua1-x941.google.com ([2607:f8b0:4864:20::941]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0knc-0005oI-RF for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2019 10:26:22 +0000 Received: by mail-ua1-x941.google.com with SMTP id j8so3906375uae.13 for ; Mon, 04 Mar 2019 02:26:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fTw7L0fnMFp2Y8lkElz3yp4GbnOY8YOrbvevswJJoXo=; b=FZbVoMDsBiaSSFFUNFg9CbWSDShmIoQiS9IwYrbbK4y9ei3fb6BZ0zN2g+tdMF4l2U 7m53pmc1pqaG90vi7Um3yBz9yYdjGxPAPenDAXBB6ZQzYmi+Cd5xa8zGfhbiVvATOgnR v2zDnF81fsk9XzfB+TUwA1SvG79Jv75Usn1GtVhlcQQ1bZCXDaj96mG1SXNODkd3dBtH E/uXqV3URC/Z5Aay3TOFeX+NlnmfscGkRpBR8TVSdgMHUdr+oPiK3d3xzHNILo7XQ+H/ UbbqygKIwqF69Km3RlinLV4lj/xMOUG37MsAshjG24yXkgCFPiws9WEV6M7nHL9NKEaO ZyRg== 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=fTw7L0fnMFp2Y8lkElz3yp4GbnOY8YOrbvevswJJoXo=; b=nwLKUmS9UCH4AfQN2JPC16ppgkwRgP1709rdqFJJwxO7ZAmthXHE7Dh3619zGL9/W9 vEQciu0uzPAr2gmSyz/r/ELWqh6VwduOIehFvBqzY8GEwvUA7yF4++h7uPEQVOUlnMJv 1dOLOvtd9VRVHflJ8SzcJXzJXNldf5xdI80J91nkuUlxonpSf5xBH9L78KSMWOE+HjFC DyVNDjTRZ2ezaMf0aaRR1Ur8tkhgopXwn31se81+r8x8XWGAotw8MUiGTzEtvq3Hsfj6 O1Uh0YziC9dlwM3JHvCfHAdNgef0z0GUGz6De4uhBwaXkjfWmLvuetVq/BJSYj2/Vcyb n7BA== X-Gm-Message-State: APjAAAUUi/AmEuOFV/MRBP2yI0/nnc436OHZf1lNuW29GMrvLu01m14W ZzyZE1KoYycGJZT8pqyQzXGFOtrspUyEJyQwupCfbQ== X-Google-Smtp-Source: APXvYqzji7TJLy0NUOjf3+i3E08MamQNt+qKvwkXOIjf5VXx088vadPfzje1z3KH8dTy7mchVGs7efGFrtRJeFs7L3Y= X-Received: by 2002:a67:7e84:: with SMTP id z126mr9280239vsc.165.1551695179392; Mon, 04 Mar 2019 02:26:19 -0800 (PST) MIME-Version: 1.0 References: <20190228135919.3747-1-ulf.hansson@linaro.org> <20190228135919.3747-8-ulf.hansson@linaro.org> <155146129938.16805.4528027710288083607@swboyd.mtv.corp.google.com> In-Reply-To: <155146129938.16805.4528027710288083607@swboyd.mtv.corp.google.com> From: Ulf Hansson Date: Mon, 4 Mar 2019 11:25:43 +0100 Message-ID: Subject: Re: [PATCH 7/7] drivers: firmware: psci: Announce support for OS initiated suspend mode To: Stephen Boyd , Mark Rutland X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190304_022620_895118_88E2F244 X-CRM114-Status: GOOD ( 16.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Linux PM , linux-arm-msm , Daniel Lezcano , "Rafael J . Wysocki" , Linux Kernel Mailing List , Lina Iyer , Sudeep Holla , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 1 Mar 2019 at 18:28, Stephen Boyd wrote: > > Quoting Ulf Hansson (2019-02-28 05:59:19) > > PSCI firmware v1.0+, supports two different modes for CPU_SUSPEND. The > > Platform Coordinated mode, which is the default and mandatory mode, while > > support for the OS initiated (OSI) mode is optional. > > > > In some cases it's interesting for the user/developer to know if the OSI > > mode is supported by the PSCI FW. Therefore, let's print a message to the > > log, if that is the case. > > I don't see anything wrong with the patch besides the potential for the > logs to wrap and the informational message to be lost, but would it be > possible to express the PSCI features that are supported in sysfs at > /sys/firmware/psci/ somehow? It may be useful for a user to know that > their firmware has PSCI support and that it has a certain set of > features available, like OSI vs. PC, or both. I don't know of any use > that userspace would have though, besides maybe the CPU state residency > counters being used by some sort of statistics collecting program or > just plain knowing that certain PSCI features are present, so perhaps it > could just be done in debugfs for now until a real user exists. Having a sysfs interface for PSCI, allowing users to know a little bit more about what the FW supports/version/etc sound like a great idea to me. There is already quite some prints being made by psci during boot, so perhaps having sysfs allows us to drop some of these. Mark, what do you think? Is it something you think we should do? I can offer my help to implement this, if you think it's a good idea. Stephen, thanks for reviewing! Kind regards Uffe _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel