public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] ArmPkg/ArmPsciMpServices Add EFI_NOT_READY return
@ 2023-06-29 20:46 Jeff Brasen
  2023-09-07 14:17 ` [edk2-devel] " Ard Biesheuvel
  2023-10-16 22:55 ` Rebecca Cran
  0 siblings, 2 replies; 5+ messages in thread
From: Jeff Brasen @ 2023-06-29 20:46 UTC (permalink / raw)
  To: devel; +Cc: quic_llindhol, ardb+tianocore, rebecca, Jeff Brasen

Add EFI_NOT_READY return if the CPU can not be enabled if the
processor is already on.

This can occur in normal use if the CPU is still being turned off from
a previous call when this is called again.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
---
 ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
index f822a9877c..e7f4223513 100644
--- a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
+++ b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
@@ -103,7 +103,9 @@ DispatchCpu (
 
   ArmCallSmc (&Args);
 
-  if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
+  if (Args.Arg0 == ARM_SMC_PSCI_RET_ALREADY_ON) {
+    Status = EFI_NOT_READY;
+  } else if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
     DEBUG ((DEBUG_ERROR, "PSCI_CPU_ON call failed: %d\n", Args.Arg0));
     Status = EFI_DEVICE_ERROR;
   }
-- 
2.25.1

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

* Re: [edk2-devel] [PATCH] ArmPkg/ArmPsciMpServices Add EFI_NOT_READY return
  2023-06-29 20:46 [PATCH] ArmPkg/ArmPsciMpServices Add EFI_NOT_READY return Jeff Brasen
@ 2023-09-07 14:17 ` Ard Biesheuvel
  2023-10-04 14:37   ` Jeff Brasen via groups.io
  2023-10-16 22:55 ` Rebecca Cran
  1 sibling, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2023-09-07 14:17 UTC (permalink / raw)
  To: devel, jbrasen; +Cc: quic_llindhol, ardb+tianocore, rebecca

On Thu, 29 Jun 2023 at 22:47, Jeff Brasen via groups.io
<jbrasen=nvidia.com@groups.io> wrote:
>
> Add EFI_NOT_READY return if the CPU can not be enabled if the
> processor is already on.
>
> This can occur in normal use if the CPU is still being turned off from
> a previous call when this is called again.
>
> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

I'll queue this up - thanks.

> ---
>  ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> index f822a9877c..e7f4223513 100644
> --- a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> +++ b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> @@ -103,7 +103,9 @@ DispatchCpu (
>
>    ArmCallSmc (&Args);
>
> -  if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
> +  if (Args.Arg0 == ARM_SMC_PSCI_RET_ALREADY_ON) {
> +    Status = EFI_NOT_READY;
> +  } else if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
>      DEBUG ((DEBUG_ERROR, "PSCI_CPU_ON call failed: %d\n", Args.Arg0));
>      Status = EFI_DEVICE_ERROR;
>    }
> --
> 2.25.1
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108394): https://edk2.groups.io/g/devel/message/108394
Mute This Topic: https://groups.io/mt/99859167/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

* Re: [edk2-devel] [PATCH] ArmPkg/ArmPsciMpServices Add EFI_NOT_READY return
  2023-09-07 14:17 ` [edk2-devel] " Ard Biesheuvel
@ 2023-10-04 14:37   ` Jeff Brasen via groups.io
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Brasen via groups.io @ 2023-10-04 14:37 UTC (permalink / raw)
  To: Ard Biesheuvel, devel@edk2.groups.io
  Cc: quic_llindhol@quicinc.com, ardb+tianocore@kernel.org,
	rebecca@bsdio.com

Anything else needed on this to get it merged?

Thanks,
Jeff

> -----Original Message-----
> From: Ard Biesheuvel <ardb@kernel.org>
> Sent: Thursday, September 7, 2023 8:17 AM
> To: devel@edk2.groups.io; Jeff Brasen <jbrasen@nvidia.com>
> Cc: quic_llindhol@quicinc.com; ardb+tianocore@kernel.org;
> rebecca@bsdio.com
> Subject: Re: [edk2-devel] [PATCH] ArmPkg/ArmPsciMpServices Add
> EFI_NOT_READY return
> 
> External email: Use caution opening links or attachments
> 
> 
> On Thu, 29 Jun 2023 at 22:47, Jeff Brasen via groups.io
> <jbrasen=nvidia.com@groups.io> wrote:
> >
> > Add EFI_NOT_READY return if the CPU can not be enabled if the
> > processor is already on.
> >
> > This can occur in normal use if the CPU is still being turned off from
> > a previous call when this is called again.
> >
> > Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
> 
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
> 
> I'll queue this up - thanks.
> 
> > ---
> >  ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c | 4
> +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git
> > a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> > b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> > index f822a9877c..e7f4223513 100644
> > --- a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> > +++ b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> > @@ -103,7 +103,9 @@ DispatchCpu (
> >
> >    ArmCallSmc (&Args);
> >
> > -  if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
> > +  if (Args.Arg0 == ARM_SMC_PSCI_RET_ALREADY_ON) {
> > +    Status = EFI_NOT_READY;
> > +  } else if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
> >      DEBUG ((DEBUG_ERROR, "PSCI_CPU_ON call failed: %d\n", Args.Arg0));
> >      Status = EFI_DEVICE_ERROR;
> >    }
> > --
> > 2.25.1
> >
> >
> > 
> >
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109319): https://edk2.groups.io/g/devel/message/109319
Mute This Topic: https://groups.io/mt/99859167/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

* Re: [edk2-devel] [PATCH] ArmPkg/ArmPsciMpServices Add EFI_NOT_READY return
  2023-06-29 20:46 [PATCH] ArmPkg/ArmPsciMpServices Add EFI_NOT_READY return Jeff Brasen
  2023-09-07 14:17 ` [edk2-devel] " Ard Biesheuvel
@ 2023-10-16 22:55 ` Rebecca Cran
  2023-10-18  8:51   ` Ard Biesheuvel
  1 sibling, 1 reply; 5+ messages in thread
From: Rebecca Cran @ 2023-10-16 22:55 UTC (permalink / raw)
  To: Jeff Brasen, devel; +Cc: quic_llindhol, ardb+tianocore

Reviewed-by: Rebecca Cran <rebecca@bsdio.com>


Looks like this is still waiting to be merged by an ArmPkg maintainer.


-- 
Rebecca Cran


On 6/29/23 14:46, Jeff Brasen wrote:
> Add EFI_NOT_READY return if the CPU can not be enabled if the
> processor is already on.
>
> This can occur in normal use if the CPU is still being turned off from
> a previous call when this is called again.
>
> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
> ---
>   ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> index f822a9877c..e7f4223513 100644
> --- a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> +++ b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> @@ -103,7 +103,9 @@ DispatchCpu (
>   
>     ArmCallSmc (&Args);
>   
> -  if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
> +  if (Args.Arg0 == ARM_SMC_PSCI_RET_ALREADY_ON) {
> +    Status = EFI_NOT_READY;
> +  } else if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
>       DEBUG ((DEBUG_ERROR, "PSCI_CPU_ON call failed: %d\n", Args.Arg0));
>       Status = EFI_DEVICE_ERROR;
>     }


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109659): https://edk2.groups.io/g/devel/message/109659
Mute This Topic: https://groups.io/mt/99859167/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

* Re: [edk2-devel] [PATCH] ArmPkg/ArmPsciMpServices Add EFI_NOT_READY return
  2023-10-16 22:55 ` Rebecca Cran
@ 2023-10-18  8:51   ` Ard Biesheuvel
  0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2023-10-18  8:51 UTC (permalink / raw)
  To: devel, rebecca; +Cc: Jeff Brasen, quic_llindhol, ardb+tianocore

On Tue, 17 Oct 2023 at 00:55, Rebecca Cran <rebecca@bsdio.com> wrote:
>
> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
>
>
> Looks like this is still waiting to be merged by an ArmPkg maintainer.
>
>

Thanks for the reminder

Really queued up now


>
> On 6/29/23 14:46, Jeff Brasen wrote:
> > Add EFI_NOT_READY return if the CPU can not be enabled if the
> > processor is already on.
> >
> > This can occur in normal use if the CPU is still being turned off from
> > a previous call when this is called again.
> >
> > Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
> > ---
> >   ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> > index f822a9877c..e7f4223513 100644
> > --- a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> > +++ b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
> > @@ -103,7 +103,9 @@ DispatchCpu (
> >
> >     ArmCallSmc (&Args);
> >
> > -  if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
> > +  if (Args.Arg0 == ARM_SMC_PSCI_RET_ALREADY_ON) {
> > +    Status = EFI_NOT_READY;
> > +  } else if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
> >       DEBUG ((DEBUG_ERROR, "PSCI_CPU_ON call failed: %d\n", Args.Arg0));
> >       Status = EFI_DEVICE_ERROR;
> >     }
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109716): https://edk2.groups.io/g/devel/message/109716
Mute This Topic: https://groups.io/mt/99859167/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

end of thread, other threads:[~2023-10-18  8:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-29 20:46 [PATCH] ArmPkg/ArmPsciMpServices Add EFI_NOT_READY return Jeff Brasen
2023-09-07 14:17 ` [edk2-devel] " Ard Biesheuvel
2023-10-04 14:37   ` Jeff Brasen via groups.io
2023-10-16 22:55 ` Rebecca Cran
2023-10-18  8:51   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox