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 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 435A6C4332F for ; Thu, 20 Oct 2022 06:58:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 101E7C4347C; Thu, 20 Oct 2022 06:58:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E634FC433D7; Thu, 20 Oct 2022 06:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666249101; bh=PP67Sfe4my3BPjEvhljdfbZ7tiQ1kUCl/ugv2NE8w5o=; h=Date:From:To:List-Id:Cc:Subject:References:In-Reply-To:From; b=oaJmh/tZ8Xs5TuzdoWrBr1svZtjiumywvkDHWUyuxSLmjxCeyJOeAhjZQWqZfp19j Z0F1M46sbf3AnBq4fwZBDxKp0BLnPS6g6DL0KFlzF1oxjNFDIGipq2eIR6Q/V10gsz 61Y8+Bf0OJrhEMI6cZLUUTYYhUEIV/eRQIw+hIfI3tMuHkxeHJv1Ex/8xuIcZvGeSw 4EobGBN08wDiCgfWuljCuGVhxf2Oo9RD+HT7hPbCiBnQ5SOaN6VFTcFNnAeFyMrnHW NA+Wy8+mKSvbblqlESOMUc07JMCzuanyhxSKrniFN/yzDgrymcenEpXjr8Tr8nwZCA xXohW49l/4x9g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1olPVG-00089x-BZ; Thu, 20 Oct 2022 08:58:07 +0200 Date: Thu, 20 Oct 2022 08:58:06 +0200 From: Johan Hovold To: Dmitry Baryshkov List-Id: Cc: Ulf Hansson , Sudeep Holla , Arnd Bergmann , Mark Rutland , Lorenzo Pieralisi , "Rafael J. Wysocki" , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, soc@kernel.org, linux-pm@vger.kernel.org Subject: Re: [RESEND PATCH v2] firmware/psci: Print a warning if PSCI doesn't accept PC mode Message-ID: References: <20220926110249.666813-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Oct 19, 2022 at 06:02:37PM +0300, Dmitry Baryshkov wrote: > On Wed, 19 Oct 2022 at 17:37, Ulf Hansson wrote: > > On Wed, 19 Oct 2022 at 16:14, Johan Hovold wrote: > > > On Mon, Sep 26, 2022 at 02:02:49PM +0300, Dmitry Baryshkov wrote: > > > > The function psci_pd_try_set_osi_mode() will print an error if enabling > > > > OSI mode fails. To ease debugging PSCI issues print corresponding > > > > message if switching to PC mode fails too. > > > > > > > > Acked-by: Mark Rutland > > > > Reviewed-by: Sudeep Holla > > > > Reviewed-by: Ulf Hansson > > > > Signed-off-by: Dmitry Baryshkov > > > > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c > > > > index 9fdcb6bff403..42cae0ba10e2 100644 > > > > --- a/drivers/firmware/psci/psci.c > > > > +++ b/drivers/firmware/psci/psci.c > > > > @@ -164,6 +164,8 @@ int psci_set_osi_mode(bool enable) > > > > PSCI_1_0_SUSPEND_MODE_PC; > > > > > > > > err = invoke_psci_fn(PSCI_1_0_FN_SET_SUSPEND_MODE, suspend_mode, 0, 0); > > > > + if (err < 0) > > > > + pr_warn("failed to set %s mode: %d\n", enable ? "OSI" : "PC", err); > > > > return psci_to_linux_errno(err); > > > > } > > > > > > When booting 6.1-rc1 I now see: > > > > > > [ 0.000000] psci: OSI mode supported. > > > [ 0.000000] psci: failed to set PC mode: -3 > > > > > > on every boot with sc8280xp, while later enabling OSI mode still works: > > > > > > [ 0.227358] CPUidle PSCI: psci_pd_try_set_osi_mode - success > > > [ 0.227599] CPUidle PSCI: Initialized CPU PM domain topology > > > > > > Judging from Sudeep's comment on v1: > > > > > > The platform must boot in PC mode, so even if it fails we ignore > > > so not sure if the logging is of much help here IMO. > > > > > > perhaps logging this as an error is not a good idea? > > As far as I understand, some of the Qualcomm platforms booted in the > OSI mode, no matter what the spec says. I'm not sure about the > sc8280xp, but it definitely was the case previously. This was the > primary reason for adding a log here. > > > I think it's useful to get information that the FW doesn't fully > > conform to the spec (it should support PC mode), but that doesn't > > really mean that it can't work. > > > > To me, it sounds like we should move the logging to the debug level!? > > I'd say, either ignore the error, or move the warning to the info or > debug level. "Ignore the error" as in removing the warning or as in telling every owner of an X13s Thinkpad to ignore it? If there's nothing that can be done about it and this is nothing to worry about, then moving to debug level would seem like the right thing to do here. At least for the PC case. Johan 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 94229C433FE for ; Thu, 20 Oct 2022 06:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kyUZMcIzgcw+CWrGVnZO/+634CAcD6uJEEnIWcSXB6g=; b=xvXQbbXl0DM7rP lHg8YPEF8JkD7MuCHmvFtuEGZy+qUKTMIqKnKus5GQneRK8h2Xb12j96e+EnjGHyYOcU61ffcST00 N0GjNMnLajYeUxA1rrIEupSEq6g+tG9Z6cx501tnh6WuvKXXFf1FCUcdagxejNHkmBfJvwosUNfZf HyBdr/OazoY4EnDVimTL6ezkSN0Z5TUtwgzJ02fCI3RYS4aJwweeO4zr3wCx0XN0F8P7ES5bvrh0Q QEUwkUIIHQEpMMwsIwOuAUz8/cUGD0Oiu+PM1jJwTeeCWDYexqZEZk3R9JHCz4tCsKhRBMc9aPI7Y 7XLAJeMFj9Sswge47ogA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olPVb-00BQ4z-9j; Thu, 20 Oct 2022 06:58:27 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olPVX-00BQ4e-WB for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 06:58:26 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3214EB8269F; Thu, 20 Oct 2022 06:58:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E634FC433D7; Thu, 20 Oct 2022 06:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666249101; bh=PP67Sfe4my3BPjEvhljdfbZ7tiQ1kUCl/ugv2NE8w5o=; h=Date:From:To:List-Id:Cc:Subject:References:In-Reply-To:From; b=oaJmh/tZ8Xs5TuzdoWrBr1svZtjiumywvkDHWUyuxSLmjxCeyJOeAhjZQWqZfp19j Z0F1M46sbf3AnBq4fwZBDxKp0BLnPS6g6DL0KFlzF1oxjNFDIGipq2eIR6Q/V10gsz 61Y8+Bf0OJrhEMI6cZLUUTYYhUEIV/eRQIw+hIfI3tMuHkxeHJv1Ex/8xuIcZvGeSw 4EobGBN08wDiCgfWuljCuGVhxf2Oo9RD+HT7hPbCiBnQ5SOaN6VFTcFNnAeFyMrnHW NA+Wy8+mKSvbblqlESOMUc07JMCzuanyhxSKrniFN/yzDgrymcenEpXjr8Tr8nwZCA xXohW49l/4x9g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1olPVG-00089x-BZ; Thu, 20 Oct 2022 08:58:07 +0200 Date: Thu, 20 Oct 2022 08:58:06 +0200 From: Johan Hovold To: Dmitry Baryshkov Cc: Ulf Hansson , Sudeep Holla , Arnd Bergmann , Mark Rutland , Lorenzo Pieralisi , "Rafael J. Wysocki" , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, soc@kernel.org, linux-pm@vger.kernel.org Subject: Re: [RESEND PATCH v2] firmware/psci: Print a warning if PSCI doesn't accept PC mode Message-ID: References: <20220926110249.666813-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_235824_751297_FC943080 X-CRM114-Status: GOOD ( 32.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 19, 2022 at 06:02:37PM +0300, Dmitry Baryshkov wrote: > On Wed, 19 Oct 2022 at 17:37, Ulf Hansson wrote: > > On Wed, 19 Oct 2022 at 16:14, Johan Hovold wrote: > > > On Mon, Sep 26, 2022 at 02:02:49PM +0300, Dmitry Baryshkov wrote: > > > > The function psci_pd_try_set_osi_mode() will print an error if enabling > > > > OSI mode fails. To ease debugging PSCI issues print corresponding > > > > message if switching to PC mode fails too. > > > > > > > > Acked-by: Mark Rutland > > > > Reviewed-by: Sudeep Holla > > > > Reviewed-by: Ulf Hansson > > > > Signed-off-by: Dmitry Baryshkov > > > > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c > > > > index 9fdcb6bff403..42cae0ba10e2 100644 > > > > --- a/drivers/firmware/psci/psci.c > > > > +++ b/drivers/firmware/psci/psci.c > > > > @@ -164,6 +164,8 @@ int psci_set_osi_mode(bool enable) > > > > PSCI_1_0_SUSPEND_MODE_PC; > > > > > > > > err = invoke_psci_fn(PSCI_1_0_FN_SET_SUSPEND_MODE, suspend_mode, 0, 0); > > > > + if (err < 0) > > > > + pr_warn("failed to set %s mode: %d\n", enable ? "OSI" : "PC", err); > > > > return psci_to_linux_errno(err); > > > > } > > > > > > When booting 6.1-rc1 I now see: > > > > > > [ 0.000000] psci: OSI mode supported. > > > [ 0.000000] psci: failed to set PC mode: -3 > > > > > > on every boot with sc8280xp, while later enabling OSI mode still works: > > > > > > [ 0.227358] CPUidle PSCI: psci_pd_try_set_osi_mode - success > > > [ 0.227599] CPUidle PSCI: Initialized CPU PM domain topology > > > > > > Judging from Sudeep's comment on v1: > > > > > > The platform must boot in PC mode, so even if it fails we ignore > > > so not sure if the logging is of much help here IMO. > > > > > > perhaps logging this as an error is not a good idea? > > As far as I understand, some of the Qualcomm platforms booted in the > OSI mode, no matter what the spec says. I'm not sure about the > sc8280xp, but it definitely was the case previously. This was the > primary reason for adding a log here. > > > I think it's useful to get information that the FW doesn't fully > > conform to the spec (it should support PC mode), but that doesn't > > really mean that it can't work. > > > > To me, it sounds like we should move the logging to the debug level!? > > I'd say, either ignore the error, or move the warning to the info or > debug level. "Ignore the error" as in removing the warning or as in telling every owner of an X13s Thinkpad to ignore it? If there's nothing that can be done about it and this is nothing to worry about, then moving to debug level would seem like the right thing to do here. At least for the PC case. Johan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel