diff mbox

[v2] xen/arm: Clean up identify processor call for secondary cpus

Message ID 1375105333-15696-1-git-send-email-julien.grall@linaro.org
State Accepted, archived
Headers show

Commit Message

Julien Grall July 29, 2013, 1:42 p.m. UTC
The smp_processor_id() is set at the beginning of start_secondary. We don't
need to compute ourself the offset of the cpu data.

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

---
    Changes in v2:
        - Initalize the current cpu data with boot cpu data
---
 xen/arch/arm/smpboot.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Ian Campbell July 29, 2013, 3:58 p.m. UTC | #1
On Mon, 2013-07-29 at 14:42 +0100, Julien Grall wrote:
> The smp_processor_id() is set at the beginning of start_secondary. We don't
> need to compute ourself the offset of the cpu data.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>

Applied, thanks.

> 
> ---
>     Changes in v2:
>         - Initalize the current cpu data with boot cpu data
> ---
>  xen/arch/arm/smpboot.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
> index 5895178..b6aea63 100644
> --- a/xen/arch/arm/smpboot.c
> +++ b/xen/arch/arm/smpboot.c
> @@ -137,15 +137,13 @@ void __cpuinit start_secondary(unsigned long boot_phys_offset,
>                                 unsigned long fdt_paddr,
>                                 unsigned long cpuid)
>  {
> -    struct cpuinfo_arm *c = cpu_data + cpuid;
> -
>      memset(get_cpu_info(), 0, sizeof (struct cpu_info));
>  
>      /* TODO: handle boards where CPUIDs are not contiguous */
>      set_processor_id(cpuid);
>  
> -    *c = boot_cpu_data;
> -    identify_cpu(c);
> +    current_cpu_data = boot_cpu_data;
> +    identify_cpu(&current_cpu_data);
>  
>      init_traps();
>
diff mbox

Patch

diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 5895178..b6aea63 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -137,15 +137,13 @@  void __cpuinit start_secondary(unsigned long boot_phys_offset,
                                unsigned long fdt_paddr,
                                unsigned long cpuid)
 {
-    struct cpuinfo_arm *c = cpu_data + cpuid;
-
     memset(get_cpu_info(), 0, sizeof (struct cpu_info));
 
     /* TODO: handle boards where CPUIDs are not contiguous */
     set_processor_id(cpuid);
 
-    *c = boot_cpu_data;
-    identify_cpu(c);
+    current_cpu_data = boot_cpu_data;
+    identify_cpu(&current_cpu_data);
 
     init_traps();