linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND v2] firmware/psci: demote suspend-mode warning to info level
@ 2023-04-14  8:46 Johan Hovold
  2023-04-14  9:36 ` Dmitry Baryshkov
  2023-04-14 11:01 ` Mark Rutland
  0 siblings, 2 replies; 4+ messages in thread
From: Johan Hovold @ 2023-04-14  8:46 UTC (permalink / raw)
  To: Mark Rutland, Lorenzo Pieralisi
  Cc: Ulf Hansson, Dmitry Baryshkov, Sudeep Holla, Daniel Lezcano,
	Arnd Bergmann, linux-arm-kernel, linux-kernel, Johan Hovold

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

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---

This one fell between the cracks so resending with tags added.

Mark or Lorenzo, is this something you can pick up?

Johan


 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 29619f49873a..d9629ff87861 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -167,7 +167,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.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND v2] firmware/psci: demote suspend-mode warning to info level
  2023-04-14  8:46 [PATCH RESEND v2] firmware/psci: demote suspend-mode warning to info level Johan Hovold
@ 2023-04-14  9:36 ` Dmitry Baryshkov
  2023-04-14 11:01 ` Mark Rutland
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2023-04-14  9:36 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Mark Rutland, Lorenzo Pieralisi, Ulf Hansson, Sudeep Holla,
	Daniel Lezcano, Arnd Bergmann, linux-arm-kernel, linux-kernel

On Fri, 14 Apr 2023 at 11:47, 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
>
> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---

For the sake of completeness:
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

>
> This one fell between the cracks so resending with tags added.
>
> Mark or Lorenzo, is this something you can pick up?
>
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND v2] firmware/psci: demote suspend-mode warning to info level
  2023-04-14  8:46 [PATCH RESEND v2] firmware/psci: demote suspend-mode warning to info level Johan Hovold
  2023-04-14  9:36 ` Dmitry Baryshkov
@ 2023-04-14 11:01 ` Mark Rutland
  2023-04-14 11:49   ` Arnd Bergmann
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2023-04-14 11:01 UTC (permalink / raw)
  To: Johan Hovold, Arnd Bergmann
  Cc: Lorenzo Pieralisi, Ulf Hansson, Dmitry Baryshkov, Sudeep Holla,
	Daniel Lezcano, linux-arm-kernel, linux-kernel

On Fri, Apr 14, 2023 at 10:46:19AM +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
> 
> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
> 
> This one fell between the cracks so resending with tags added.
> 
> Mark or Lorenzo, is this something you can pick up?
> 
> Johan

Sorry about this.

I don't think we have anything else in this area, so Arnd, are you happy to
pick this via the soc tree?

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 29619f49873a..d9629ff87861 100644
> --- a/drivers/firmware/psci/psci.c
> +++ b/drivers/firmware/psci/psci.c
> @@ -167,7 +167,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.39.2
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND v2] firmware/psci: demote suspend-mode warning to info level
  2023-04-14 11:01 ` Mark Rutland
@ 2023-04-14 11:49   ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2023-04-14 11:49 UTC (permalink / raw)
  To: Mark Rutland, Johan Hovold
  Cc: Lorenzo Pieralisi, Ulf Hansson, Dmitry Baryshkov, Sudeep Holla,
	Daniel Lezcano, linux-arm-kernel, linux-kernel

On Fri, Apr 14, 2023, at 13:01, Mark Rutland wrote:
> On Fri, Apr 14, 2023 at 10:46:19AM +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
>> 
>> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
>> Acked-by: Mark Rutland <mark.rutland@arm.com>
>> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>> ---
>> 
>> This one fell between the cracks so resending with tags added.
>> 
>> Mark or Lorenzo, is this something you can pick up?
>> 
>> Johan
>
> Sorry about this.
>
> I don't think we have anything else in this area, so Arnd, are you happy to
> pick this via the soc tree?

Sure, applied to the fixes branch for 6.3 now.

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-14 11:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14  8:46 [PATCH RESEND v2] firmware/psci: demote suspend-mode warning to info level Johan Hovold
2023-04-14  9:36 ` Dmitry Baryshkov
2023-04-14 11:01 ` Mark Rutland
2023-04-14 11:49   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).