[PATCH boot-wrapper-aarch64 2/4] psci: remove sentinel from id_table

Mark Rutland mark.rutland at arm.com
Wed Jan 14 03:10:38 PST 2015


Hi,

On Tue, Jan 13, 2015 at 02:15:02AM +0000, Zi Shen Lim wrote:
> Tweak the limit check in find_logical_id so we can
> do away with the sentinel from id_table.
> 
> While at it, also remove unused label and fix up spacing.
> 
> Signed-off-by: Zi Shen Lim <zlim at broadcom.com>

This looks like a nice cleanup to me.

So long as this passes build and boot testing I'll apply this shortly.

Thanks,
Mark.

> ---
>  psci.S | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/psci.S b/psci.S
> index 234493d..d045e56 100644
> --- a/psci.S
> +++ b/psci.S
> @@ -69,7 +69,6 @@ vector:
>  id_table:
>  	.quad CPU_IDS
>  __id_end:
> -	.quad MPIDR_INVALID
>  
>  .equ	nr_cpus, ((__id_end - id_table) / 8)
>  
> @@ -159,17 +158,16 @@ psci_cpu_on:
>   * Clobbers x1, x2, x3
>   */
>  find_logical_id:
> -__find_logical_index:
>  	adr	x2, id_table
>  	mov	x1, xzr
>  1:	mov	x3, #nr_cpus	// check we haven't walked off the end of the array
>  	cmp	x1, x3
> -	b.gt	3f
> +	b.ge	3f
>  	ldr	x3, [x2, x1, lsl #3]
>  	cmp	x3, x0
>  	b.eq	2f
>  	add	x1, x1, #1
> -	b 1b
> +	b	1b
>  2:	mov	x0, x1
>  	ret
>  3:	mov	x0, #MPIDR_INVALID
> -- 
> 2.1.0
> 
> 



More information about the linux-arm-kernel mailing list