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 85037C433FE for ; Thu, 20 Oct 2022 11:24:28 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qMTqeOj7dT9AJ2VQFDWRKovH8glqBNdNjUMqzixWIcg=; b=Eo6DQf2iculHHd R7I25BHvmhXAusBgleEbLuchxGKzCWf8IJJlGzgD5qrZ6fNpLcTHgq/1z/Uq/EVQiZRMUk1ciLfxI DFu+lmD3ac8X2lNZXaiK9A/xAHlw3t8YPT0/Wb6BaRVE99R+RH1c7VlP6KYW1XjbCGn8yXBmjNNsM scYIps5OazfPH6HBOjW6ESN0tU5H4LL3iZA0QtSfo6doqGYn8Z+3m70jlSX2f2V0ZKHOOxCDKF5wR oCU0w5R2tbIZCpHPrve9StALcoN98JgZyCSpz0KjsdgKSDGjWbIjQLmrS4QjkgwbL8GHiZfB+gvy/ DyNT4ZWiSp8PEwaSSfug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olTde-00E1xp-60; Thu, 20 Oct 2022 11:23:02 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olSsG-00DcCj-8G for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 10:34:06 +0000 Received: by mail-lj1-x22d.google.com with SMTP id b18so25713932ljr.13 for ; Thu, 20 Oct 2022 03:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yWjPN4KXHxPWN4WI4l5tKmALmiP8Slvad4TlEfvcieE=; b=l6AhLaMP0llYNqZfo5qGuwvluxb7uJZ8dQVp+TEWGoMkOr0PVxTgLEYCaa+Z0GzRwz idiIGKwMVtNKgc/BUlJ7qbIBqGqeEOOpVc4yu92ZsBeXmHJRzqpSFrhJF9s8bCRXA1Rp FDmJCR9VF3nyuUlDmFrzBDaxozSnSl16S6ge2yck0ed4HG7t0DG44xTmLyT6nD0SqDcs /RNVJ0XhucCCy/3t/y2wOCbJcHf9V0DmzPs+xJNk9IWYw9wHpJPqIpA+WS8D//iKX55B Xuthe3TkwTjJknmbgy62/yFLQnPAcYY9avkXYee/MxQB2oFCu5FRj+NLdPjxbRuztkmk MCdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yWjPN4KXHxPWN4WI4l5tKmALmiP8Slvad4TlEfvcieE=; b=2/amg3gbcINLvW/Ka1Dpl9qpsUrg3nyi0Zfd5KRXJwVF9eZs/YjQJ8O+vQAkvAIskS egj9gt83E9gGmGapIG8ISU8dGJrmH2ULSTrQodABcfPbs9UvMq2fNxaCSexT95E71dbX agofiPuakVwo8ShPCn6U7504J081eWTWiKtMgovCHoeYtWSZzm/KDpaTbV2Nb8EmrURI VYWYzmmEHL354hfcMonADeXT9uustu6nedVvD4L7v6IazrD7ar3OcnucWjuhWfxPralT 6yNuP97qeWoFJPRxELJ+3EY46yXVQdcpdABWVIWWFaVVUgQZNb/77hCLMg/maBV6AfVo aYJw== X-Gm-Message-State: ACrzQf0xAhD1Zajvrs0noDugG+34mc+zHfpvXbGKn3Huyj40KChWLT38 Ce6kor8XcSf1lkLXi/nJU4/g5A== X-Google-Smtp-Source: AMsMyM4hm2kOhU2E0xX6eMOwIhvjHKKOb4ioplBvbXHocJEUxxCR5hxB4bbpeeMW+Jneh7LGk+UTkQ== X-Received: by 2002:a2e:8541:0:b0:261:b44b:1a8b with SMTP id u1-20020a2e8541000000b00261b44b1a8bmr4802602ljj.46.1666262040316; Thu, 20 Oct 2022 03:34:00 -0700 (PDT) Received: from [10.10.15.130] ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id f20-20020a056512229400b0049f53b65790sm2658525lfu.228.2022.10.20.03.33.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Oct 2022 03:33:59 -0700 (PDT) Message-ID: Date: Thu, 20 Oct 2022 13:33:59 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [RESEND PATCH v2] firmware/psci: Print a warning if PSCI doesn't accept PC mode Content-Language: en-GB To: Johan Hovold 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 References: <20220926110249.666813-1-dmitry.baryshkov@linaro.org> From: Dmitry Baryshkov In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_033404_390550_5DB2CD09 X-CRM114-Status: GOOD ( 25.38 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 20/10/2022 09:58, Johan Hovold wrote: > 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. Feel free to send the patch. I'd maybe use dev_info rather than dev_dbg, to let the user have a chance of seeing the warning. Regarding telling every user to ignore the warning. This is not something new. E.g. each time I boot my ThinkPad, I see two or three warning messages related to TPM, despite having 'quiet' in kernel boot args. > > Johan -- With best wishes Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel