diff mbox series

[v4,4/5] arm: boot: set boot_info starting from first_cpu

Message ID 1525182297-205763-1-git-send-email-imammedo@redhat.com
State New
Headers show
Series None | expand

Commit Message

Igor Mammedov May 1, 2018, 1:44 p.m. UTC
Even though nothing is currently broken (since all boards
use first_cpu as boot cpu), make sure that boot_info is set
on all CPUs.
If some board would like support heterogenuos setup (i.e.
init boot_info on subset of CPUs) in future, it should add
a reasonable API to do it, instead of starting assigning
boot_info from some CPU and till the end of present CPUs
list.

Ref:
"Message-ID: <CAFEAcA_NMWuA8WSs3cNeY6xX1kerO_uAcN_3=fK02BEhHJW86g@mail.gmail.com>"

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Maydell May 3, 2018, 3:03 p.m. UTC | #1
On 1 May 2018 at 14:44, Igor Mammedov <imammedo@redhat.com> wrote:
> Even though nothing is currently broken (since all boards
> use first_cpu as boot cpu), make sure that boot_info is set
> on all CPUs.
> If some board would like support heterogenuos setup (i.e.
> init boot_info on subset of CPUs) in future, it should add
> a reasonable API to do it, instead of starting assigning
> boot_info from some CPU and till the end of present CPUs
> list.

It's a bit confusing to only send one patch rather than the
whole set -- our automated patch application and testing
tooling gets confused. I noticed this one by chance because
I was skimming the commit log for v3 and noticed that it was
missing this text. If the change had been in code rather than
in the commit message I would probably not have picked it up...

thanks
-- PMM
Igor Mammedov May 4, 2018, 8:05 a.m. UTC | #2
On Thu, 3 May 2018 16:03:09 +0100
Peter Maydell <peter.maydell@linaro.org> wrote:

> On 1 May 2018 at 14:44, Igor Mammedov <imammedo@redhat.com> wrote:
> > Even though nothing is currently broken (since all boards
> > use first_cpu as boot cpu), make sure that boot_info is set
> > on all CPUs.
> > If some board would like support heterogenuos setup (i.e.
> > init boot_info on subset of CPUs) in future, it should add
> > a reasonable API to do it, instead of starting assigning
> > boot_info from some CPU and till the end of present CPUs
> > list.  
> 
> It's a bit confusing to only send one patch rather than the
> whole set -- our automated patch application and testing
> tooling gets confused. I noticed this one by chance because
> I was skimming the commit log for v3 and noticed that it was
> missing this text. If the change had been in code rather than
> in the commit message I would probably not have picked it up...
I wanted to not to spam too much list with respin of whole series
for commit message fixup, sending fixed up vX as reply is usually
ok for x86 trees but it's up to a maintainer preference.
Next time for fixups, I'll respin whole series if it's intended
to go via ARM tree.

> thanks
> -- PMM
diff mbox series

Patch

diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index ad71dd4..144abbd 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -1139,7 +1139,7 @@  void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
     }
     info->is_linux = is_linux;
 
-    for (cs = CPU(cpu); cs; cs = CPU_NEXT(cs)) {
+    for (cs = first_cpu; cs; cs = CPU_NEXT(cs)) {
         ARM_CPU(cs)->env.boot_info = info;
     }