diff mbox

[Xen-devel] xen: arm: use physical processor ID (MPIDR) when calling psci CPU_ON

Message ID 1405354907-3743-1-git-send-email-ian.campbell@citrix.com
State Accepted
Commit d99504872178523b024bfb36736b158a42c5060e
Headers show

Commit Message

Ian Campbell July 14, 2014, 4:21 p.m. UTC
Xen's logical CPU map can differ from the underlying layout.

Also add an emacs magic block to this file.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/psci.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Julien Grall July 14, 2014, 6:13 p.m. UTC | #1
Hi Ian,

On 07/14/2014 05:21 PM, Ian Campbell wrote:
> Xen's logical CPU map can differ from the underlying layout.
> 
> Also add an emacs magic block to this file.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Julien Grall <julien.grall@linaro.org>

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.

> ---
>  xen/arch/arm/psci.c |   12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c
> index 25a8697..b6360d5 100644
> --- a/xen/arch/arm/psci.c
> +++ b/xen/arch/arm/psci.c
> @@ -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:
> + */
> 

Regards,
Ian Campbell July 15, 2014, 9:32 a.m. UTC | #2
On Mon, 2014-07-14 at 19:13 +0100, Julien Grall wrote:
> Hi Ian,
> 
> On 07/14/2014 05:21 PM, Ian Campbell wrote:
> > Xen's logical CPU map can differ from the underlying layout.
> > 
> > Also add an emacs magic block to this file.
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> 
> Acked-by: Julien Grall <julien.grall@linaro.org>

Thanks.

> 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.
Ian Campbell July 18, 2014, 12:52 p.m. UTC | #3
On Mon, 2014-07-14 at 19:13 +0100, Julien Grall wrote:
> Hi Ian,
> 
> On 07/14/2014 05:21 PM, Ian Campbell wrote:
> > Xen's logical CPU map can differ from the underlying layout.
> > 
> > Also add an emacs magic block to this file.
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> 
> Acked-by: Julien Grall <julien.grall@linaro.org>

Applied, thanks.
diff mbox

Patch

diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c
index 25a8697..b6360d5 100644
--- a/xen/arch/arm/psci.c
+++ b/xen/arch/arm/psci.c
@@ -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:
+ */