diff mbox series

[MM-PART2,RESEND,v2,09/19] xen/arm64: head: Correctly report the HW CPU ID

Message ID 20190514122456.28559-10-julien.grall@arm.com (mailing list archive)
State New, archived
Headers show
Series xen/arm: Clean-up & fixes in boot/mm code | expand

Commit Message

Julien Grall May 14, 2019, 12:24 p.m. UTC
There are no reason to consider the HW CPU ID will be 0 when the
processor is part of a uniprocessor system. At best, this will result to
conflicting output as the rest of Xen use the value directly read from
MPIDR_EL1.

So remove the zeroing and logic to check if the CPU is part of a
uniprocessor system.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>

---
    Changes in v2:
        - Add Andrii's reviewed-by
---
 xen/arch/arm/arm64/head.S | 6 ------
 1 file changed, 6 deletions(-)

Comments

Stefano Stabellini May 20, 2019, 10:56 p.m. UTC | #1
On Tue, 14 May 2019, Julien Grall wrote:
> There are no reason to consider the HW CPU ID will be 0 when the
> processor is part of a uniprocessor system. At best, this will result to
> conflicting output as the rest of Xen use the value directly read from
> MPIDR_EL1.
> 
> So remove the zeroing and logic to check if the CPU is part of a
> uniprocessor system.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>
> Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>     Changes in v2:
>         - Add Andrii's reviewed-by
> ---
>  xen/arch/arm/arm64/head.S | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
> index b957eb90fb..08094a273e 100644
> --- a/xen/arch/arm/arm64/head.S
> +++ b/xen/arch/arm/arm64/head.S
> @@ -277,15 +277,9 @@ GLOBAL(init_secondary)
>          mov   x26, #1                /* X26 := skip_zero_bss */
>  
>  common_start:
> -        mov   x24, #0                /* x24 := CPU ID. Initialy zero until we
> -                                      * find that multiprocessor extensions are
> -                                      * present and the system is SMP  */
>          mrs   x0, mpidr_el1
> -        tbnz  x0, _MPIDR_UP, 1f      /* Uniprocessor system? */
> -
>          ldr   x13, =(~MPIDR_HWID_MASK)
>          bic   x24, x0, x13           /* Mask out flags to get CPU ID */
> -1:
>  
>          /* Non-boot CPUs wait here until __cpu_up is ready for them */
>          cbz   x22, 1f
> -- 
> 2.11.0
>
diff mbox series

Patch

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index b957eb90fb..08094a273e 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -277,15 +277,9 @@  GLOBAL(init_secondary)
         mov   x26, #1                /* X26 := skip_zero_bss */
 
 common_start:
-        mov   x24, #0                /* x24 := CPU ID. Initialy zero until we
-                                      * find that multiprocessor extensions are
-                                      * present and the system is SMP  */
         mrs   x0, mpidr_el1
-        tbnz  x0, _MPIDR_UP, 1f      /* Uniprocessor system? */
-
         ldr   x13, =(~MPIDR_HWID_MASK)
         bic   x24, x0, x13           /* Mask out flags to get CPU ID */
-1:
 
         /* Non-boot CPUs wait here until __cpu_up is ready for them */
         cbz   x22, 1f