All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm/ast2600: Fix SMP booting with -kernel
@ 2021-03-03  1:05 Joel Stanley
  2021-03-03 11:19 ` Cédric Le Goater
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Stanley @ 2021-03-03  1:05 UTC (permalink / raw)
  To: Cédric Le Goater; +Cc: Andrew Jeffery, Peter Maydell, qemu-arm, qemu-devel

The ast2600 machines do not have PSCI firmware, so this property should
have never been set. Removing this node fixes SMP booting Linux kernels
that have PSCI enabled, as Linux fails to find PSCI in the device tree
and falls back to the soc-specific method for enabling secondary CPUs.

The comment is out of date as Qemu has supported -kernel booting since
9bb6d14081ce ("aspeed: Add boot stub for smp booting"), in v5.1.

Fixes: f25c0ae1079d ("aspeed/soc: Add AST2600 support")
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 hw/arm/aspeed_ast2600.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index bf31ca351feb..49b00763864c 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -241,8 +241,6 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
 
     /* CPU */
     for (i = 0; i < sc->num_cpus; i++) {
-        object_property_set_int(OBJECT(&s->cpu[i]), "psci-conduit",
-                                QEMU_PSCI_CONDUIT_SMC, &error_abort);
         if (sc->num_cpus > 1) {
             object_property_set_int(OBJECT(&s->cpu[i]), "reset-cbar",
                                     ASPEED_A7MPCORE_ADDR, &error_abort);
@@ -253,11 +251,6 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
         object_property_set_int(OBJECT(&s->cpu[i]), "cntfrq", 1125000000,
                                 &error_abort);
 
-        /*
-         * TODO: the secondary CPUs are started and a boot helper
-         * is needed when using -kernel
-         */
-
         if (!qdev_realize(DEVICE(&s->cpu[i]), NULL, errp)) {
             return;
         }
-- 
2.30.1



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

* Re: [PATCH] arm/ast2600: Fix SMP booting with -kernel
  2021-03-03  1:05 [PATCH] arm/ast2600: Fix SMP booting with -kernel Joel Stanley
@ 2021-03-03 11:19 ` Cédric Le Goater
  0 siblings, 0 replies; 2+ messages in thread
From: Cédric Le Goater @ 2021-03-03 11:19 UTC (permalink / raw)
  To: Joel Stanley; +Cc: Andrew Jeffery, Peter Maydell, qemu-arm, qemu-devel

On 3/3/21 2:05 AM, Joel Stanley wrote:
> The ast2600 machines do not have PSCI firmware, so this property should
> have never been set. Removing this node fixes SMP booting Linux kernels
> that have PSCI enabled, as Linux fails to find PSCI in the device tree
> and falls back to the soc-specific method for enabling secondary CPUs.
> 
> The comment is out of date as Qemu has supported -kernel booting since
> 9bb6d14081ce ("aspeed: Add boot stub for smp booting"), in v5.1.
> 
> Fixes: f25c0ae1079d ("aspeed/soc: Add AST2600 support")
> Signed-off-by: Joel Stanley <joel@jms.id.au>

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Cédric Le Goater <clg@kaod.org>

Thanks

C.

> ---
>  hw/arm/aspeed_ast2600.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
> index bf31ca351feb..49b00763864c 100644
> --- a/hw/arm/aspeed_ast2600.c
> +++ b/hw/arm/aspeed_ast2600.c
> @@ -241,8 +241,6 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
>  
>      /* CPU */
>      for (i = 0; i < sc->num_cpus; i++) {
> -        object_property_set_int(OBJECT(&s->cpu[i]), "psci-conduit",
> -                                QEMU_PSCI_CONDUIT_SMC, &error_abort);
>          if (sc->num_cpus > 1) {
>              object_property_set_int(OBJECT(&s->cpu[i]), "reset-cbar",
>                                      ASPEED_A7MPCORE_ADDR, &error_abort);
> @@ -253,11 +251,6 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
>          object_property_set_int(OBJECT(&s->cpu[i]), "cntfrq", 1125000000,
>                                  &error_abort);
>  
> -        /*
> -         * TODO: the secondary CPUs are started and a boot helper
> -         * is needed when using -kernel
> -         */
> -
>          if (!qdev_realize(DEVICE(&s->cpu[i]), NULL, errp)) {
>              return;
>          }
> 



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

end of thread, other threads:[~2021-03-03 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03  1:05 [PATCH] arm/ast2600: Fix SMP booting with -kernel Joel Stanley
2021-03-03 11:19 ` Cédric Le Goater

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.