All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PSCI: Print a warning if PSCI doesn't accept PC mode
@ 2022-07-27 18:20 ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-07-27 18:20 UTC (permalink / raw)
  To: Mark Rutland, Lorenzo Pieralisi; +Cc: linux-arm-kernel, linux-pm

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.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/firmware/psci/psci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index cfb448eabdaa..b907768eea01 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -597,7 +597,9 @@ static int __init psci_1_0_init(struct device_node *np)
 		pr_info("OSI mode supported.\n");
 
 		/* Default to PC mode. */
-		psci_set_osi_mode(false);
+		err = psci_set_osi_mode(false);
+		if (err)
+			pr_info("setting PC mode failed with %d\n", err);
 	}
 
 	return 0;
-- 
2.35.1


_______________________________________________
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] 6+ messages in thread

* [PATCH] PSCI: Print a warning if PSCI doesn't accept PC mode
@ 2022-07-27 18:20 ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-07-27 18:20 UTC (permalink / raw)
  To: Mark Rutland, Lorenzo Pieralisi; +Cc: linux-arm-kernel, linux-pm

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.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/firmware/psci/psci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index cfb448eabdaa..b907768eea01 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -597,7 +597,9 @@ static int __init psci_1_0_init(struct device_node *np)
 		pr_info("OSI mode supported.\n");
 
 		/* Default to PC mode. */
-		psci_set_osi_mode(false);
+		err = psci_set_osi_mode(false);
+		if (err)
+			pr_info("setting PC mode failed with %d\n", err);
 	}
 
 	return 0;
-- 
2.35.1


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

* Re: [PATCH] PSCI: Print a warning if PSCI doesn't accept PC mode
  2022-07-27 18:20 ` Dmitry Baryshkov
@ 2022-07-28  8:58   ` Sudeep Holla
  -1 siblings, 0 replies; 6+ messages in thread
From: Sudeep Holla @ 2022-07-28  8:58 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Mark Rutland, Lorenzo Pieralisi, Sudeep Holla, linux-arm-kernel,
	linux-pm

On Wed, Jul 27, 2022 at 09:20:34PM +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.
>

Are you seeing that even setting to PC mode failing on msm8996. 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.

> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/firmware/psci/psci.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
> index cfb448eabdaa..b907768eea01 100644
> --- a/drivers/firmware/psci/psci.c
> +++ b/drivers/firmware/psci/psci.c
> @@ -597,7 +597,9 @@ static int __init psci_1_0_init(struct device_node *np)
>  		pr_info("OSI mode supported.\n");
>  
>  		/* Default to PC mode. */
> -		psci_set_osi_mode(false);
> +		err = psci_set_osi_mode(false);
> +		if (err)
> +			pr_info("setting PC mode failed with %d\n", err);

Since we don't care about error value here, does it make sense to add the
log in psci_set_osi_mode() that covers both PC and OSI case whenever it is
called ?

-- 
Regards,
Sudeep

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

* Re: [PATCH] PSCI: Print a warning if PSCI doesn't accept PC mode
@ 2022-07-28  8:58   ` Sudeep Holla
  0 siblings, 0 replies; 6+ messages in thread
From: Sudeep Holla @ 2022-07-28  8:58 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Mark Rutland, Lorenzo Pieralisi, Sudeep Holla, linux-arm-kernel,
	linux-pm

On Wed, Jul 27, 2022 at 09:20:34PM +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.
>

Are you seeing that even setting to PC mode failing on msm8996. 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.

> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/firmware/psci/psci.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
> index cfb448eabdaa..b907768eea01 100644
> --- a/drivers/firmware/psci/psci.c
> +++ b/drivers/firmware/psci/psci.c
> @@ -597,7 +597,9 @@ static int __init psci_1_0_init(struct device_node *np)
>  		pr_info("OSI mode supported.\n");
>  
>  		/* Default to PC mode. */
> -		psci_set_osi_mode(false);
> +		err = psci_set_osi_mode(false);
> +		if (err)
> +			pr_info("setting PC mode failed with %d\n", err);

Since we don't care about error value here, does it make sense to add the
log in psci_set_osi_mode() that covers both PC and OSI case whenever it is
called ?

-- 
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] 6+ messages in thread

* Re: [PATCH] PSCI: Print a warning if PSCI doesn't accept PC mode
  2022-07-28  8:58   ` Sudeep Holla
@ 2022-07-28  9:35     ` Dmitry Baryshkov
  -1 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-07-28  9:35 UTC (permalink / raw)
  To: Sudeep Holla; +Cc: Mark Rutland, Lorenzo Pieralisi, linux-arm-kernel, linux-pm

On Thu, 28 Jul 2022 at 11:58, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Wed, Jul 27, 2022 at 09:20:34PM +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.
> >
>
> Are you seeing that even setting to PC mode failing on msm8996. 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.

It helped me to understand that it is not only setting OSI, who fails
with the 'not_supported' status, but setting PC mode also fails. Which
later led me to checking which functions are provided at all, etc.

>
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  drivers/firmware/psci/psci.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
> > index cfb448eabdaa..b907768eea01 100644
> > --- a/drivers/firmware/psci/psci.c
> > +++ b/drivers/firmware/psci/psci.c
> > @@ -597,7 +597,9 @@ static int __init psci_1_0_init(struct device_node *np)
> >               pr_info("OSI mode supported.\n");
> >
> >               /* Default to PC mode. */
> > -             psci_set_osi_mode(false);
> > +             err = psci_set_osi_mode(false);
> > +             if (err)
> > +                     pr_info("setting PC mode failed with %d\n", err);
>
> Since we don't care about error value here, does it make sense to add the
> log in psci_set_osi_mode() that covers both PC and OSI case whenever it is
> called ?

Yes, this sounds like a logical idea. I'll do this in v2.

-- 
With best wishes
Dmitry

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

* Re: [PATCH] PSCI: Print a warning if PSCI doesn't accept PC mode
@ 2022-07-28  9:35     ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-07-28  9:35 UTC (permalink / raw)
  To: Sudeep Holla; +Cc: Mark Rutland, Lorenzo Pieralisi, linux-arm-kernel, linux-pm

On Thu, 28 Jul 2022 at 11:58, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Wed, Jul 27, 2022 at 09:20:34PM +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.
> >
>
> Are you seeing that even setting to PC mode failing on msm8996. 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.

It helped me to understand that it is not only setting OSI, who fails
with the 'not_supported' status, but setting PC mode also fails. Which
later led me to checking which functions are provided at all, etc.

>
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  drivers/firmware/psci/psci.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
> > index cfb448eabdaa..b907768eea01 100644
> > --- a/drivers/firmware/psci/psci.c
> > +++ b/drivers/firmware/psci/psci.c
> > @@ -597,7 +597,9 @@ static int __init psci_1_0_init(struct device_node *np)
> >               pr_info("OSI mode supported.\n");
> >
> >               /* Default to PC mode. */
> > -             psci_set_osi_mode(false);
> > +             err = psci_set_osi_mode(false);
> > +             if (err)
> > +                     pr_info("setting PC mode failed with %d\n", err);
>
> Since we don't care about error value here, does it make sense to add the
> log in psci_set_osi_mode() that covers both PC and OSI case whenever it is
> called ?

Yes, this sounds like a logical idea. I'll do this in v2.

-- 
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] 6+ messages in thread

end of thread, other threads:[~2022-07-28  9:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 18:20 [PATCH] PSCI: Print a warning if PSCI doesn't accept PC mode Dmitry Baryshkov
2022-07-27 18:20 ` Dmitry Baryshkov
2022-07-28  8:58 ` Sudeep Holla
2022-07-28  8:58   ` Sudeep Holla
2022-07-28  9:35   ` Dmitry Baryshkov
2022-07-28  9:35     ` Dmitry Baryshkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.