* [PATCH] firmware/psci: demote suspend-mode warning to debug level
@ 2022-10-24 14:34 Johan Hovold
2022-10-25 10:22 ` Dmitry Baryshkov
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Johan Hovold @ 2022-10-24 14:34 UTC (permalink / raw)
To: Mark Rutland, Lorenzo Pieralisi
Cc: Ulf Hansson, Dmitry Baryshkov, Sudeep Holla, Daniel Lezcano,
linux-arm-kernel, linux-kernel, Johan Hovold
On some Qualcomm platform, 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 debug level.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
Note that a separate change to the cpuidle driver will start logging the
mode actually used:
https://lore.kernel.org/all/20221020115513.93809-1-ulf.hansson@linaro.org/
Johan
drivers/firmware/psci/psci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index e7bcfca4159f..462f37fa6a86 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -165,7 +165,7 @@ 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_debug("failed to set %s mode: %d\n", enable ? "OSI" : "PC", err);
return psci_to_linux_errno(err);
}
--
2.37.3
_______________________________________________
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] 9+ messages in thread* Re: [PATCH] firmware/psci: demote suspend-mode warning to debug level
2022-10-24 14:34 [PATCH] firmware/psci: demote suspend-mode warning to debug level Johan Hovold
@ 2022-10-25 10:22 ` Dmitry Baryshkov
2022-10-25 11:53 ` Sudeep Holla
2022-10-25 13:03 ` Ulf Hansson
2 siblings, 0 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2022-10-25 10:22 UTC (permalink / raw)
To: Johan Hovold, Mark Rutland, Lorenzo Pieralisi
Cc: Ulf Hansson, Sudeep Holla, Daniel Lezcano, linux-arm-kernel,
linux-kernel
On 24/10/2022 17:34, Johan Hovold wrote:
> On some Qualcomm platform, 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 debug level.
>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>
> Note that a separate change to the cpuidle driver will start logging the
> mode actually used:
>
> https://lore.kernel.org/all/20221020115513.93809-1-ulf.hansson@linaro.org/
>
> Johan
>
>
> drivers/firmware/psci/psci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
> index e7bcfca4159f..462f37fa6a86 100644
> --- a/drivers/firmware/psci/psci.c
> +++ b/drivers/firmware/psci/psci.c
> @@ -165,7 +165,7 @@ 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_debug("failed to set %s mode: %d\n", enable ? "OSI" : "PC", err);
> return psci_to_linux_errno(err);
> }
>
--
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] 9+ messages in thread* Re: [PATCH] firmware/psci: demote suspend-mode warning to debug level
2022-10-24 14:34 [PATCH] firmware/psci: demote suspend-mode warning to debug level Johan Hovold
2022-10-25 10:22 ` Dmitry Baryshkov
@ 2022-10-25 11:53 ` Sudeep Holla
2022-10-25 12:56 ` Johan Hovold
2022-10-25 13:03 ` Ulf Hansson
2 siblings, 1 reply; 9+ messages in thread
From: Sudeep Holla @ 2022-10-25 11:53 UTC (permalink / raw)
To: Johan Hovold
Cc: Mark Rutland, Lorenzo Pieralisi, Ulf Hansson, Dmitry Baryshkov,
Daniel Lezcano, linux-arm-kernel, linux-kernel
On Mon, Oct 24, 2022 at 04:34:17PM +0200, Johan Hovold wrote:
> On some Qualcomm platform, 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 debug level.
>
As mentioned in the other thread I prefer to keep this as error as we
shouldn't mask this error and enable more/newer platforms to ignore it
when they can go and fix it. So I don't agree with this.
--
Regards,
Sudeep
_______________________________________________
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] 9+ messages in thread* Re: [PATCH] firmware/psci: demote suspend-mode warning to debug level
2022-10-25 11:53 ` Sudeep Holla
@ 2022-10-25 12:56 ` Johan Hovold
2022-10-25 13:26 ` Sudeep Holla
0 siblings, 1 reply; 9+ messages in thread
From: Johan Hovold @ 2022-10-25 12:56 UTC (permalink / raw)
To: Sudeep Holla
Cc: Johan Hovold, Mark Rutland, Lorenzo Pieralisi, Ulf Hansson,
Dmitry Baryshkov, Daniel Lezcano, linux-arm-kernel, linux-kernel
On Tue, Oct 25, 2022 at 12:53:55PM +0100, Sudeep Holla wrote:
> On Mon, Oct 24, 2022 at 04:34:17PM +0200, Johan Hovold wrote:
> > On some Qualcomm platform, 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 debug level.
> >
>
> As mentioned in the other thread I prefer to keep this as error as we
> shouldn't mask this error and enable more/newer platforms to ignore it
> when they can go and fix it. So I don't agree with this.
But now every owner of an X13s laptop will see this not very informative
error at every boot and wonder what it means. Has something gone broken?
Should they be worried? Can something be done about it?
Remember that this is firmware used by Windows machines so by the time
we see this in Linux it's probably way too late to fix in firmware
anyway.
Johan
_______________________________________________
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] 9+ messages in thread* Re: [PATCH] firmware/psci: demote suspend-mode warning to debug level
2022-10-25 12:56 ` Johan Hovold
@ 2022-10-25 13:26 ` Sudeep Holla
2022-10-25 14:32 ` Johan Hovold
0 siblings, 1 reply; 9+ messages in thread
From: Sudeep Holla @ 2022-10-25 13:26 UTC (permalink / raw)
To: Johan Hovold
Cc: Johan Hovold, Mark Rutland, Lorenzo Pieralisi, Ulf Hansson,
Dmitry Baryshkov, Daniel Lezcano, Sudeep Holla, linux-arm-kernel,
linux-kernel
On Tue, Oct 25, 2022 at 02:56:00PM +0200, Johan Hovold wrote:
> On Tue, Oct 25, 2022 at 12:53:55PM +0100, Sudeep Holla wrote:
> > On Mon, Oct 24, 2022 at 04:34:17PM +0200, Johan Hovold wrote:
> > > On some Qualcomm platform, 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 debug level.
> > >
> >
> > As mentioned in the other thread I prefer to keep this as error as we
> > shouldn't mask this error and enable more/newer platforms to ignore it
> > when they can go and fix it. So I don't agree with this.
>
> But now every owner of an X13s laptop will see this not very informative
> error at every boot and wonder what it means. Has something gone broken?
> Should they be worried? Can something be done about it?
>
I understand that but I have expressed why I am concerned on generalising
it. As long as we inform the concerned owners running Linux(which is quite
small at the moment), keeping it will help to get these fixed on platforms
that are running Linux today for validation and get it fixed if their
platform firmware suffers from the same.
> Remember that this is firmware used by Windows machines so by the time
> we see this in Linux it's probably way too late to fix in firmware
> anyway.
>
I am well aware of that fact, but I am targeting platforms that are using
Linux for validation today.
Honestly, I am not sure if we need to target for zero errors or warnings
on the platforms instead of repeatedly annoy them with warnings until it
is fixed. Otherwise I see it won't be fixed ever.
That said, this is just my opinion.
--
Regards,
Sudeep
_______________________________________________
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] 9+ messages in thread* Re: [PATCH] firmware/psci: demote suspend-mode warning to debug level
2022-10-25 13:26 ` Sudeep Holla
@ 2022-10-25 14:32 ` Johan Hovold
2022-10-26 13:24 ` Mark Rutland
0 siblings, 1 reply; 9+ messages in thread
From: Johan Hovold @ 2022-10-25 14:32 UTC (permalink / raw)
To: Sudeep Holla
Cc: Johan Hovold, Mark Rutland, Lorenzo Pieralisi, Ulf Hansson,
Dmitry Baryshkov, Daniel Lezcano, linux-arm-kernel, linux-kernel
On Tue, Oct 25, 2022 at 02:26:55PM +0100, Sudeep Holla wrote:
> On Tue, Oct 25, 2022 at 02:56:00PM +0200, Johan Hovold wrote:
> > On Tue, Oct 25, 2022 at 12:53:55PM +0100, Sudeep Holla wrote:
> > > On Mon, Oct 24, 2022 at 04:34:17PM +0200, Johan Hovold wrote:
> > > > On some Qualcomm platform, 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 debug level.
> > > >
> > >
> > > As mentioned in the other thread I prefer to keep this as error as we
> > > shouldn't mask this error and enable more/newer platforms to ignore it
> > > when they can go and fix it. So I don't agree with this.
> >
> > But now every owner of an X13s laptop will see this not very informative
> > error at every boot and wonder what it means. Has something gone broken?
> > Should they be worried? Can something be done about it?
> >
>
> I understand that but I have expressed why I am concerned on generalising
> it. As long as we inform the concerned owners running Linux(which is quite
> small at the moment), keeping it will help to get these fixed on platforms
> that are running Linux today for validation and get it fixed if their
> platform firmware suffers from the same.
Trying to inform every user that a warning during boot is actually
benign and nothing to worry about generally seems backwards to me and is
not something that is likely to scale.
> > Remember that this is firmware used by Windows machines so by the time
> > we see this in Linux it's probably way too late to fix in firmware
> > anyway.
> >
>
> I am well aware of that fact, but I am targeting platforms that are using
> Linux for validation today.
>
> Honestly, I am not sure if we need to target for zero errors or warnings
> on the platforms instead of repeatedly annoy them with warnings until it
> is fixed. Otherwise I see it won't be fixed ever.
I understand the sentiment, but will having this warning there actually
lead to any firmware changes? Or will it just lead to having developers
and users debug and report issues which cannot be fixed?
And surely there must be better ways to check firmware for compliance
than scanning Linux boot logs for warnings?
Johan
_______________________________________________
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] 9+ messages in thread* Re: [PATCH] firmware/psci: demote suspend-mode warning to debug level
2022-10-25 14:32 ` Johan Hovold
@ 2022-10-26 13:24 ` Mark Rutland
2022-10-26 13:36 ` Johan Hovold
0 siblings, 1 reply; 9+ messages in thread
From: Mark Rutland @ 2022-10-26 13:24 UTC (permalink / raw)
To: Johan Hovold
Cc: Sudeep Holla, Johan Hovold, Lorenzo Pieralisi, Ulf Hansson,
Dmitry Baryshkov, Daniel Lezcano, linux-arm-kernel, linux-kernel
On Tue, Oct 25, 2022 at 04:32:52PM +0200, Johan Hovold wrote:
> On Tue, Oct 25, 2022 at 02:26:55PM +0100, Sudeep Holla wrote:
> > On Tue, Oct 25, 2022 at 02:56:00PM +0200, Johan Hovold wrote:
> > > On Tue, Oct 25, 2022 at 12:53:55PM +0100, Sudeep Holla wrote:
> > > > On Mon, Oct 24, 2022 at 04:34:17PM +0200, Johan Hovold wrote:
> > > > > On some Qualcomm platform, 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 debug level.
> > > > >
> > > >
> > > > As mentioned in the other thread I prefer to keep this as error as we
> > > > shouldn't mask this error and enable more/newer platforms to ignore it
> > > > when they can go and fix it. So I don't agree with this.
> > >
> > > But now every owner of an X13s laptop will see this not very informative
> > > error at every boot and wonder what it means. Has something gone broken?
> > > Should they be worried? Can something be done about it?
> > >
> >
> > I understand that but I have expressed why I am concerned on generalising
> > it. As long as we inform the concerned owners running Linux(which is quite
> > small at the moment), keeping it will help to get these fixed on platforms
> > that are running Linux today for validation and get it fixed if their
> > platform firmware suffers from the same.
>
> Trying to inform every user that a warning during boot is actually
> benign and nothing to worry about generally seems backwards to me and is
> not something that is likely to scale.
It's not *entirely* beningn; we still have to bodge around this not being to
spec, and there are things that won't work (e.g. if we kexec to a kernel that
expects the FW to actually follow the spec it claims to).
I agree with Sudeep that we should log something here, but I do appreciate that
argumetn that for 90% of users this is not interesting.
I would suggest we make this:
pr_info(FW_BUG "failed to set PC mode: %d\n", ...);
... so that it's always logged for those who care, but as it's INFO rather than
WARNING, it'll easily be filtered out of logs (e.g. for users booting with
"quiet"). Adding FW_BUG will also make this clear we're complaining about a FW
bug rather than this being a kernel-internal error.
Thanks,
Mark.
_______________________________________________
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] 9+ messages in thread* Re: [PATCH] firmware/psci: demote suspend-mode warning to debug level
2022-10-26 13:24 ` Mark Rutland
@ 2022-10-26 13:36 ` Johan Hovold
0 siblings, 0 replies; 9+ messages in thread
From: Johan Hovold @ 2022-10-26 13:36 UTC (permalink / raw)
To: Mark Rutland
Cc: Sudeep Holla, Johan Hovold, Lorenzo Pieralisi, Ulf Hansson,
Dmitry Baryshkov, Daniel Lezcano, linux-arm-kernel, linux-kernel
On Wed, Oct 26, 2022 at 02:24:58PM +0100, Mark Rutland wrote:
> On Tue, Oct 25, 2022 at 04:32:52PM +0200, Johan Hovold wrote:
> > Trying to inform every user that a warning during boot is actually
> > benign and nothing to worry about generally seems backwards to me and is
> > not something that is likely to scale.
>
> It's not *entirely* beningn; we still have to bodge around this not being to
> spec, and there are things that won't work (e.g. if we kexec to a kernel that
> expects the FW to actually follow the spec it claims to).
>
> I agree with Sudeep that we should log something here, but I do appreciate that
> argumetn that for 90% of users this is not interesting.
>
> I would suggest we make this:
>
> pr_info(FW_BUG "failed to set PC mode: %d\n", ...);
>
> ... so that it's always logged for those who care, but as it's INFO rather than
> WARNING, it'll easily be filtered out of logs (e.g. for users booting with
> "quiet"). Adding FW_BUG will also make this clear we're complaining about a FW
> bug rather than this being a kernel-internal error.
Sounds good. I'll respin.
Johan
_______________________________________________
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] 9+ messages in thread
* Re: [PATCH] firmware/psci: demote suspend-mode warning to debug level
2022-10-24 14:34 [PATCH] firmware/psci: demote suspend-mode warning to debug level Johan Hovold
2022-10-25 10:22 ` Dmitry Baryshkov
2022-10-25 11:53 ` Sudeep Holla
@ 2022-10-25 13:03 ` Ulf Hansson
2 siblings, 0 replies; 9+ messages in thread
From: Ulf Hansson @ 2022-10-25 13:03 UTC (permalink / raw)
To: Johan Hovold
Cc: Mark Rutland, Lorenzo Pieralisi, Dmitry Baryshkov, Sudeep Holla,
Daniel Lezcano, linux-arm-kernel, linux-kernel
On Mon, 24 Oct 2022 at 16:36, Johan Hovold <johan+linaro@kernel.org> wrote:
>
> On some Qualcomm platform, 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 debug level.
>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
FYI, I would be fine with a pr_info() too.
Kind regards
Uffe
> ---
>
> Note that a separate change to the cpuidle driver will start logging the
> mode actually used:
>
> https://lore.kernel.org/all/20221020115513.93809-1-ulf.hansson@linaro.org/
>
> Johan
>
>
> drivers/firmware/psci/psci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
> index e7bcfca4159f..462f37fa6a86 100644
> --- a/drivers/firmware/psci/psci.c
> +++ b/drivers/firmware/psci/psci.c
> @@ -165,7 +165,7 @@ 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_debug("failed to set %s mode: %d\n", enable ? "OSI" : "PC", err);
> return psci_to_linux_errno(err);
> }
>
> --
> 2.37.3
>
_______________________________________________
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] 9+ messages in thread
end of thread, other threads:[~2022-10-26 13:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 14:34 [PATCH] firmware/psci: demote suspend-mode warning to debug level Johan Hovold
2022-10-25 10:22 ` Dmitry Baryshkov
2022-10-25 11:53 ` Sudeep Holla
2022-10-25 12:56 ` Johan Hovold
2022-10-25 13:26 ` Sudeep Holla
2022-10-25 14:32 ` Johan Hovold
2022-10-26 13:24 ` Mark Rutland
2022-10-26 13:36 ` Johan Hovold
2022-10-25 13:03 ` Ulf Hansson
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).