diff mbox

[U-Boot] arm64: optimize smp_kick_all_cpus

Message ID 1466155967-15330-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit afedf5488de99925f00ead847e40d7ba0d508f0e
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada June 17, 2016, 9:32 a.m. UTC
gic_kick_secondary_cpus can directly return to the caller of
smp_kick_all_cpus.  We do not have to use x29 register here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/arm/cpu/armv8/start.S | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

York Sun June 17, 2016, 3:24 p.m. UTC | #1
On 06/17/2016 02:32 AM, Masahiro Yamada wrote:
> gic_kick_secondary_cpus can directly return to the caller of
> smp_kick_all_cpus.  We do not have to use x29 register here.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>   arch/arm/cpu/armv8/start.S | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> index c1a2f45..670e323 100644
> --- a/arch/arm/cpu/armv8/start.S
> +++ b/arch/arm/cpu/armv8/start.S
> @@ -258,12 +258,10 @@ ENDPROC(lowlevel_init)
>
>   WEAK(smp_kick_all_cpus)
>   	/* Kick secondary cpus up by SGI 0 interrupt */
> -	mov	x29, lr			/* Save LR */
>   #if defined(CONFIG_GICV2) || defined(CONFIG_GICV3)
>   	ldr	x0, =GICD_BASE
> -	bl	gic_kick_secondary_cpus
> +	b	gic_kick_secondary_cpus
>   #endif
> -	mov	lr, x29			/* Restore LR */
>   	ret
>   ENDPROC(smp_kick_all_cpus)
>
>

Reviewed-by: York Sun <york.sun@nxp.com>
Tom Rini June 25, 2016, 2:52 a.m. UTC | #2
On Fri, Jun 17, 2016 at 06:32:47PM +0900, Masahiro Yamada wrote:

> gic_kick_secondary_cpus can directly return to the caller of
> smp_kick_all_cpus.  We do not have to use x29 register here.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: York Sun <york.sun@nxp.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index c1a2f45..670e323 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -258,12 +258,10 @@  ENDPROC(lowlevel_init)
 
 WEAK(smp_kick_all_cpus)
 	/* Kick secondary cpus up by SGI 0 interrupt */
-	mov	x29, lr			/* Save LR */
 #if defined(CONFIG_GICV2) || defined(CONFIG_GICV3)
 	ldr	x0, =GICD_BASE
-	bl	gic_kick_secondary_cpus
+	b	gic_kick_secondary_cpus
 #endif
-	mov	lr, x29			/* Restore LR */
 	ret
 ENDPROC(smp_kick_all_cpus)