Skip to contentSkip to conversation

xen/arm: correct duplicate MPIDR check to actually skip the node

PATCH Applied Matthew Daley 3 participants 4 messages Nov 8, 2013 – Nov 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: correct duplicate MPIDR check to actually skip the node

---
I assume this was what was really intended...

 xen/arch/arm/smpboot.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
xen/arch/arm/smpboot.c +3 -1
index b836be4..6c90fa6 100644
@@ -161,9 +161,11 @@ void __init smp_init_cpus(void)
                 printk(XENLOG_WARNING
                        "cpu node `%s`: duplicate /cpu reg properties in the DT\n",
                        dt_node_full_name(cpu));
-                continue;
+                break;
             }
         }
+        if ( j != cpuidx )
+            continue;
 
         /*
          * Build a stashed array of MPIDR values. Numbering scheme requires
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 3 lines · Matthew Daley

---
I assume this was what was really intended...

CCing Julien... But yes it looks like it.

Quoted 8 lines
 xen/arch/arm/smpboot.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
xen/arch/arm/smpboot.c +0 -0
index b836be4..6c90fa6 100644

xen/arch/arm/smpboot.c void __init smp_init_cpus(void) · line 168

Quoted 9 lines
xen/arch/arm/smpboot.c +3 -1
@@ -161,9 +161,11 @@ void __init smp_init_cpus(void)
                 printk(XENLOG_WARNING
                        "cpu node `%s`: duplicate /cpu reg properties in the DT\n",
                        dt_node_full_name(cpu));
-                continue;
+                break;
             }
         }
+        if ( j != cpuidx )
+            continue;

Took me a moment to figure out what this was for. I'm half minded to suggest this is one of those places where a "goto next_cpu" would have been ok, I'd definitely want a second opinion on that though!

Quoted 3 lines
xen/arch/arm/smpboot.c +0 -0
         /*
          * Build a stashed array of MPIDR values. Numbering scheme requires
Acked-by
#2 lore raw
Quoted 5 lines · Ian Campbell
Quoted 3 lines · Matthew Daley

---
I assume this was what was really intended...

Indeed, that for spotting this error !

Quoted 15 lines

CCing Julien... But yes it looks like it.

Quoted 13 lines
  xen/arch/arm/smpboot.c |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
xen/arch/arm/smpboot.c +1 -1
index b836be4..6c90fa6 100644
@@ -161,9 +161,11 @@ void __init smp_init_cpus(void)
                  printk(XENLOG_WARNING
                         "cpu node `%s`: duplicate /cpu reg properties in the DT\n",
                         dt_node_full_name(cpu));
-                continue;
+                break;
Quoted 9 lines

xen/arch/arm/smpboot.c void __init smp_init_cpus(void) · line 168

Quoted 4 lines
xen/arch/arm/smpboot.c +2 -0
              }
          }
+        if ( j != cpuidx )
+            continue;

Took me a moment to figure out what this was for. I'm half minded to suggest this is one of those places where a "goto next_cpu" would have been ok, I'd definitely want a second opinion on that though!

I'm happy with the both solutions:

Signature · 1 line
Julien Grall
Applied
#3 lore raw
Quoted 34 lines · Julien Grall
Quoted 5 lines · Ian Campbell
Quoted 3 lines · Matthew Daley

---
I assume this was what was really intended...

Indeed, that for spotting this error !

Quoted 15 lines

CCing Julien... But yes it looks like it.

Quoted 13 lines
  xen/arch/arm/smpboot.c |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
xen/arch/arm/smpboot.c +1 -1
index b836be4..6c90fa6 100644
@@ -161,9 +161,11 @@ void __init smp_init_cpus(void)
                  printk(XENLOG_WARNING
                         "cpu node `%s`: duplicate /cpu reg properties in the DT\n",
                         dt_node_full_name(cpu));
-                continue;
+                break;
Quoted 9 lines

xen/arch/arm/smpboot.c void __init smp_init_cpus(void) · line 168

Quoted 4 lines
xen/arch/arm/smpboot.c +2 -0
              }
          }
+        if ( j != cpuidx )
+            continue;

Took me a moment to figure out what this was for. I'm half minded to suggest this is one of those places where a "goto next_cpu" would have been ok, I'd definitely want a second opinion on that though!

Quoted 3 lines

I'm happy with the both solutions:

Applied. thanks.