Skip to contentSkip to conversation

xen: arm: use physical processor ID (MPIDR) when calling psci CPU_ON

PATCH In review Ian Campbell 2 participants 4 messages Jul 14, 2014 – Jul 18, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: arm: use physical processor ID (MPIDR) when calling psci CPU_ON

Xen's logical CPU map can differ from the underlying layout.

Also add an emacs magic block to this file.

---
 xen/arch/arm/psci.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
xen/arch/arm/psci.c +11 -1
index 25a8697..b6360d5 100644
@@ -54,7 +54,8 @@ static uint32_t psci_cpu_on_nr;
 
 int call_psci_cpu_on(int cpu)
 {
-    return __invoke_psci_fn_smc(psci_cpu_on_nr, cpu, __pa(init_secondary), 0);
+    return __invoke_psci_fn_smc(psci_cpu_on_nr,
+                                cpu_logical_map(cpu), __pa(init_secondary), 0);
 }
 
 int __init psci_init(void)
@@ -96,3 +97,12 @@ int __init psci_init(void)
 
     return 0;
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw

Hi Ian,

Quoted 5 lines · Ian Campbell

Xen's logical CPU map can differ from the underlying layout.

Also add an emacs magic block to this file.

Any plan to backport this patch for Xen 4.4? I suspect we have the same issue on the Versatile Express when PSCI and A7 are used.

Quoted 22 lines
---
 xen/arch/arm/psci.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
xen/arch/arm/psci.c +2 -1
index 25a8697..b6360d5 100644
@@ -54,7 +54,8 @@ static uint32_t psci_cpu_on_nr;
 
 int call_psci_cpu_on(int cpu)
 {
-    return __invoke_psci_fn_smc(psci_cpu_on_nr, cpu, __pa(init_secondary), 0);
+    return __invoke_psci_fn_smc(psci_cpu_on_nr,
+                                cpu_logical_map(cpu), __pa(init_secondary), 0);
 }
 
 int __init psci_init(void)
@@ -96,3 +97,12 @@ int __init psci_init(void)
 
     return 0;

xen/arch/arm/psci.c int __init psci_init(void) · line 108

Quoted 10 lines
xen/arch/arm/psci.c +9 -0
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */

Regards,

Signature · 1 line
Julien Grall
#2 lore raw
Quoted 10 lines · Julien Grall

Hi Ian,

Quoted 5 lines · Ian Campbell

Xen's logical CPU map can differ from the underlying layout.

Also add an emacs magic block to this file.

Thanks.

Quoted 2 lines

Any plan to backport this patch for Xen 4.4? I suspect we have the same issue on the Versatile Express when PSCI and A7 are used.

True. I've added it to my list.