Message ID | 20221026135445.8004-1-johan+linaro@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp290896wru; Wed, 26 Oct 2022 07:11:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4UuzZ5llDndZYYpNvblfQkRv2uFx7DfX71xtiagrDfArS/FKctewuBVM1gMCCkhP2N2atV X-Received: by 2002:a62:6544:0:b0:561:7446:fdf4 with SMTP id z65-20020a626544000000b005617446fdf4mr45127856pfb.41.1666793502628; Wed, 26 Oct 2022 07:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666793502; cv=none; d=google.com; s=arc-20160816; b=BTRTeOCt4K50ZhL/roUFihfe6mxtZ3wgvjxiAwpmZ4oDdcHjz2UGfE1Y/q3fRMG80o GH9DBFgGUjLKBc3Imt6Tqpn1adng6PKeo7jPkqKpSXB/dBSoGyc4OyfBHmPirVIRWOlI RTGKFaIl0qvYjwljG6LlhyxRIJpGR8pDfKd6YYaDEXb7I+dNo43lDZmZTU/bWjWhvj3L q6Aq/yYp0Z5GSYVmcwkvtKHIqCZZH7T+w+pwsZKKCoFBB5tu5rqIbhP4a+Hs2rDNp7MH TjJpx5o2vMZk/E1Us+oPb71HjZYNOMTaiaF+I5ja6Blsa1Vi7zKA0HplAQ4etExi7g4Z KgBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uFTK3t2OGlcINUdXDR5KghdFhaWB3kyJ8PfQH2CDJUc=; b=AaHfLKPEqJqQ41/jWrt+CgQpBcKKTcEq/IEMSga8rrQniKvxvlptGbzLrkigRV6eeN 2BSCehl9RvuXjrfJLtjh55u3h8ctBgYkJWP3JgJDYSzBAYdvDL1ZM235j1KmaaHmDfNS K+756cHjdi/cQjeUXu5NVhgVDKyRts76yhmz4jVQBcqWrxuX3aR800XHLJJVsHDWZyUi wZ2gWXsiO3NbF9+4zL7oLCgIgUemAwXyab0L21bfvdqNpHJDrk/CTV+qqpqd5T8yWkUf CFCRnqTlYU9qLARim2tVpVE3QlzB2g8XcWTVD3zHRvJWk79ceuIE3eA9KVHWQQMqgH2Y 6UNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YrVxNDdh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm18-20020a656e92000000b00412607fea43si6913273pgb.617.2022.10.26.07.11.13; Wed, 26 Oct 2022 07:11:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YrVxNDdh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233949AbiJZN6j (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Wed, 26 Oct 2022 09:58:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234143AbiJZN5v (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Oct 2022 09:57:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA1E0DB9 for <linux-kernel@vger.kernel.org>; Wed, 26 Oct 2022 06:57:46 -0700 (PDT) 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 7700CB82256 for <linux-kernel@vger.kernel.org>; Wed, 26 Oct 2022 13:57:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2473BC433D6; Wed, 26 Oct 2022 13:57:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666792664; bh=t4btE/+qdMMC0jKvmw5NCgtrdHE2HNaZB5p9dfo+HMU=; h=From:To:Cc:Subject:Date:From; b=YrVxNDdhLRgt4PR45aJuqDkjiIqL+57Y58mohI/g8KvpTf8IyUPI5yjThSO51OBiy xhm6vtccUlGArHk977rZkB3+FZ9seglvIOZDyJIZM7pOChdqAkDr75kaL/NqkBnYoy 6SCefp9HcxJCW7R/yfDY/SF/ATwkefo4lttt4OJhVxxFgOFeB1ydwfPTPLQCplF2OL 3bLWapzQrWoyKubZxG03hlXOOqI5AUDlY6s1IXQ3XNfvnSoxYJG59TbZ8+LUFLYQPw QolQN/SQJffGfiE4t6f0Qsqu7hcGQzN63UXoKSW6JHR0BmHwJS3fEtE9rMMeVeQljv Z8pjJ/CR5ecsw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1onguM-00026t-U4; Wed, 26 Oct 2022 15:57:27 +0200 From: Johan Hovold <johan+linaro@kernel.org> To: Mark Rutland <mark.rutland@arm.com>, Lorenzo Pieralisi <lpieralisi@kernel.org> Cc: Ulf Hansson <ulf.hansson@linaro.org>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sudeep Holla <sudeep.holla@arm.com>, Daniel Lezcano <daniel.lezcano@linaro.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold <johan+linaro@kernel.org> Subject: [PATCH v2] firmware/psci: demote suspend-mode warning to info level Date: Wed, 26 Oct 2022 15:54:45 +0200 Message-Id: <20221026135445.8004-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747759663847201569?= X-GMAIL-MSGID: =?utf-8?q?1747759663847201569?= |
Series |
[v2] firmware/psci: demote suspend-mode warning to info level
|
|
Commit Message
Johan Hovold
Oct. 26, 2022, 1:54 p.m. UTC
On some Qualcomm platforms, like SC8280XP, the attempt to set PC mode
during boot fails with PSCI_RET_DENIED and since commit 998fcd001feb
("firmware/psci: Print a warning if PSCI doesn't accept PC mode") this
is now logged at warning level:
psci: failed to set PC mode: -3
As there is nothing users can do about the firmware behaving this way,
demote the warning to info level and clearly mark it as a firmware bug:
psci: [Firmware Bug]: failed to set PC mode: -3
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/firmware/psci/psci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Wed, 26 Oct 2022 at 15:57, Johan Hovold <johan+linaro@kernel.org> wrote: > > On some Qualcomm platforms, like SC8280XP, the attempt to set PC mode > during boot fails with PSCI_RET_DENIED and since commit 998fcd001feb > ("firmware/psci: Print a warning if PSCI doesn't accept PC mode") this > is now logged at warning level: > > psci: failed to set PC mode: -3 > > As there is nothing users can do about the firmware behaving this way, > demote the warning to info level and clearly mark it as a firmware bug: > > psci: [Firmware Bug]: failed to set PC mode: -3 > > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Using the info level seems like a good compromise to me! So, Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Kind regards Uffe > --- > drivers/firmware/psci/psci.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c > index e7bcfca4159f..f8fa32f0a130 100644 > --- a/drivers/firmware/psci/psci.c > +++ b/drivers/firmware/psci/psci.c > @@ -165,7 +165,8 @@ int psci_set_osi_mode(bool enable) > > 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); > + pr_info(FW_BUG "failed to set %s mode: %d\n", > + enable ? "OSI" : "PC", err); > return psci_to_linux_errno(err); > } > > -- > 2.37.3 >
On Wed, Oct 26, 2022 at 03:54:45PM +0200, Johan Hovold wrote: > On some Qualcomm platforms, like SC8280XP, the attempt to set PC mode > during boot fails with PSCI_RET_DENIED and since commit 998fcd001feb > ("firmware/psci: Print a warning if PSCI doesn't accept PC mode") this > is now logged at warning level: > > psci: failed to set PC mode: -3 > > As there is nothing users can do about the firmware behaving this way, > demote the warning to info level and clearly mark it as a firmware bug: > > psci: [Firmware Bug]: failed to set PC mode: -3 > > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> On the assumption that we don't have any latent issues in this case, this looks ok to me, so: Acked-by: Mark Rutland <mark.rutland@arm.com> Sudeep, does this reasonable to you? Are there any latent issues that mean we should keep this as a pr_warn()? Thanks, Mark. > --- > drivers/firmware/psci/psci.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c > index e7bcfca4159f..f8fa32f0a130 100644 > --- a/drivers/firmware/psci/psci.c > +++ b/drivers/firmware/psci/psci.c > @@ -165,7 +165,8 @@ int psci_set_osi_mode(bool enable) > > 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); > + pr_info(FW_BUG "failed to set %s mode: %d\n", > + enable ? "OSI" : "PC", err); > return psci_to_linux_errno(err); > } > > -- > 2.37.3 >
On Thu, Oct 27, 2022 at 01:15:59PM +0100, Mark Rutland wrote: > On Wed, Oct 26, 2022 at 03:54:45PM +0200, Johan Hovold wrote: > > On some Qualcomm platforms, like SC8280XP, the attempt to set PC mode > > during boot fails with PSCI_RET_DENIED and since commit 998fcd001feb > > ("firmware/psci: Print a warning if PSCI doesn't accept PC mode") this > > is now logged at warning level: > > > > psci: failed to set PC mode: -3 > > > > As there is nothing users can do about the firmware behaving this way, > > demote the warning to info level and clearly mark it as a firmware bug: > > > > psci: [Firmware Bug]: failed to set PC mode: -3 > > > > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> > > On the assumption that we don't have any latent issues in this case, this looks > ok to me, so: > > Acked-by: Mark Rutland <mark.rutland@arm.com> > > Sudeep, does this reasonable to you? > > Are there any latent issues that mean we should keep this as a pr_warn()? I am fine removing it as warning but making it debug may mask the issue completely on the platforms that are using Linux itself for validation of their PSCI firmware implementation. This sounds like a good compromise instead of jumping from warning directly to debug. I just want to give a chance for platforms noticing this and working on getting their firmware fixed. So for this version: Acked-by: Sudeep Holla <sudeep.holla@arm.com> -- Regards, Sudeep
On Wed, Oct 26, 2022 at 03:54:45PM +0200, Johan Hovold wrote: > On some Qualcomm platforms, like SC8280XP, the attempt to set PC mode > during boot fails with PSCI_RET_DENIED and since commit 998fcd001feb > ("firmware/psci: Print a warning if PSCI doesn't accept PC mode") this > is now logged at warning level: > > psci: failed to set PC mode: -3 > > As there is nothing users can do about the firmware behaving this way, > demote the warning to info level and clearly mark it as a firmware bug: > > psci: [Firmware Bug]: failed to set PC mode: -3 > > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> > --- > drivers/firmware/psci/psci.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c > index e7bcfca4159f..f8fa32f0a130 100644 > --- a/drivers/firmware/psci/psci.c > +++ b/drivers/firmware/psci/psci.c > @@ -165,7 +165,8 @@ int psci_set_osi_mode(bool enable) > > 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); > + pr_info(FW_BUG "failed to set %s mode: %d\n", > + enable ? "OSI" : "PC", err); > return psci_to_linux_errno(err); > } Mark and Lorenzo, I noticed this one hasn't been picked up yet. Is that something you will do or is Arnd supposed to take it? Johan
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index e7bcfca4159f..f8fa32f0a130 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -165,7 +165,8 @@ int psci_set_osi_mode(bool enable) 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); + pr_info(FW_BUG "failed to set %s mode: %d\n", + enable ? "OSI" : "PC", err); return psci_to_linux_errno(err); }