diff mbox series

[bootwrapper,13/13] Unify start_el3 & start_no_el3

Message ID 20220111130653.2331827-14-mark.rutland@arm.com (mailing list archive)
State New, archived
Headers show
Series Cleanups and improvements | expand

Commit Message

Mark Rutland Jan. 11, 2022, 1:06 p.m. UTC
Now that the start_el3 and start_no_el3 labels point at the same place,
unify them into a start_bootmethod label and update callers.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
---
 arch/aarch32/boot.S | 5 ++---
 arch/aarch64/boot.S | 4 ++--
 arch/aarch64/psci.S | 3 +--
 3 files changed, 5 insertions(+), 7 deletions(-)

Comments

Robin Murphy Jan. 11, 2022, 2:39 p.m. UTC | #1
On 2022-01-11 13:06, Mark Rutland wrote:
> Now that the start_el3 and start_no_el3 labels point at the same place,
> unify them into a start_bootmethod label and update callers.
> 
> There should be no functional change as a result of this patch.
> 
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> ---
>   arch/aarch32/boot.S | 5 ++---
>   arch/aarch64/boot.S | 4 ++--
>   arch/aarch64/psci.S | 3 +--
>   3 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/aarch32/boot.S b/arch/aarch32/boot.S
> index 820957b..4d16c9c 100644
> --- a/arch/aarch32/boot.S
> +++ b/arch/aarch32/boot.S
> @@ -51,7 +51,7 @@ ASM_FUNC(_start)
>   
>   	bl	cpu_init_bootwrapper
>   
> -	b	start_no_el3
> +	b	start_bootmethod
>   
>   _switch_monitor:
>   	adr	lr, _monitor
> @@ -69,8 +69,7 @@ _monitor:
>   
>   	bl	gic_secure_init
>   
> -	/* Initialise boot method */
> -	b	start_el3
> +	b	start_bootmethod
>   
>   err_invalid_id:
>   	b	.
> diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S
> index c0ec518..da5fa65 100644
> --- a/arch/aarch64/boot.S
> +++ b/arch/aarch64/boot.S
> @@ -57,7 +57,7 @@ reset_at_el3:
>   
>   	bl	gic_secure_init
>   
> -	b	start_el3
> +	b	start_bootmethod
>   
>   	/*
>   	 * EL2 initialization
> @@ -97,7 +97,7 @@ reset_no_el3:
>   
>   	bl	cpu_init_bootwrapper
>   
> -	b	start_no_el3
> +	b	start_bootmethod
>   
>   err_invalid_id:
>   	b	.
> diff --git a/arch/aarch64/psci.S b/arch/aarch64/psci.S
> index d6ca2eb..9709dbb 100644
> --- a/arch/aarch64/psci.S
> +++ b/arch/aarch64/psci.S
> @@ -79,6 +79,5 @@ smc_exit:
>   	ldp	x18, x19, [sp], #16
>   	eret
>   
> -ASM_FUNC(start_el3)
> -ASM_FUNC(start_no_el3)
> +ASM_FUNC(start_bootmethod)

Should there be an equivalent of this hunk for arch/aarch32/psci.S?

Robin.

>   	b	psci_first_spin
Mark Rutland Jan. 12, 2022, 2:37 p.m. UTC | #2
On Tue, Jan 11, 2022 at 02:39:35PM +0000, Robin Murphy wrote:
> On 2022-01-11 13:06, Mark Rutland wrote:
> > Now that the start_el3 and start_no_el3 labels point at the same place,
> > unify them into a start_bootmethod label and update callers.
> > 
> > There should be no functional change as a result of this patch.
> > 
> > Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> > ---
> >   arch/aarch32/boot.S | 5 ++---
> >   arch/aarch64/boot.S | 4 ++--
> >   arch/aarch64/psci.S | 3 +--
> >   3 files changed, 5 insertions(+), 7 deletions(-)
> > 
> > diff --git a/arch/aarch32/boot.S b/arch/aarch32/boot.S
> > index 820957b..4d16c9c 100644
> > --- a/arch/aarch32/boot.S
> > +++ b/arch/aarch32/boot.S
> > @@ -51,7 +51,7 @@ ASM_FUNC(_start)
> >   	bl	cpu_init_bootwrapper
> > -	b	start_no_el3
> > +	b	start_bootmethod
> >   _switch_monitor:
> >   	adr	lr, _monitor
> > @@ -69,8 +69,7 @@ _monitor:
> >   	bl	gic_secure_init
> > -	/* Initialise boot method */
> > -	b	start_el3
> > +	b	start_bootmethod
> >   err_invalid_id:
> >   	b	.
> > diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S
> > index c0ec518..da5fa65 100644
> > --- a/arch/aarch64/boot.S
> > +++ b/arch/aarch64/boot.S
> > @@ -57,7 +57,7 @@ reset_at_el3:
> >   	bl	gic_secure_init
> > -	b	start_el3
> > +	b	start_bootmethod
> >   	/*
> >   	 * EL2 initialization
> > @@ -97,7 +97,7 @@ reset_no_el3:
> >   	bl	cpu_init_bootwrapper
> > -	b	start_no_el3
> > +	b	start_bootmethod
> >   err_invalid_id:
> >   	b	.
> > diff --git a/arch/aarch64/psci.S b/arch/aarch64/psci.S
> > index d6ca2eb..9709dbb 100644
> > --- a/arch/aarch64/psci.S
> > +++ b/arch/aarch64/psci.S
> > @@ -79,6 +79,5 @@ smc_exit:
> >   	ldp	x18, x19, [sp], #16
> >   	eret
> > -ASM_FUNC(start_el3)
> > -ASM_FUNC(start_no_el3)
> > +ASM_FUNC(start_bootmethod)
> 
> Should there be an equivalent of this hunk for arch/aarch32/psci.S?

Yes, and likewise for arch/aarch64/spin.S.

I'll go fix that an re-test.

Mark.
diff mbox series

Patch

diff --git a/arch/aarch32/boot.S b/arch/aarch32/boot.S
index 820957b..4d16c9c 100644
--- a/arch/aarch32/boot.S
+++ b/arch/aarch32/boot.S
@@ -51,7 +51,7 @@  ASM_FUNC(_start)
 
 	bl	cpu_init_bootwrapper
 
-	b	start_no_el3
+	b	start_bootmethod
 
 _switch_monitor:
 	adr	lr, _monitor
@@ -69,8 +69,7 @@  _monitor:
 
 	bl	gic_secure_init
 
-	/* Initialise boot method */
-	b	start_el3
+	b	start_bootmethod
 
 err_invalid_id:
 	b	.
diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S
index c0ec518..da5fa65 100644
--- a/arch/aarch64/boot.S
+++ b/arch/aarch64/boot.S
@@ -57,7 +57,7 @@  reset_at_el3:
 
 	bl	gic_secure_init
 
-	b	start_el3
+	b	start_bootmethod
 
 	/*
 	 * EL2 initialization
@@ -97,7 +97,7 @@  reset_no_el3:
 
 	bl	cpu_init_bootwrapper
 
-	b	start_no_el3
+	b	start_bootmethod
 
 err_invalid_id:
 	b	.
diff --git a/arch/aarch64/psci.S b/arch/aarch64/psci.S
index d6ca2eb..9709dbb 100644
--- a/arch/aarch64/psci.S
+++ b/arch/aarch64/psci.S
@@ -79,6 +79,5 @@  smc_exit:
 	ldp	x18, x19, [sp], #16
 	eret
 
-ASM_FUNC(start_el3)
-ASM_FUNC(start_no_el3)
+ASM_FUNC(start_bootmethod)
 	b	psci_first_spin