[U-Boot,v5,12/18] arm: mark save_boot_params_ret as a function

Message ID 1507645279-25188-13-git-send-email-philipp.tomsich@theobroma-systems.com
State Accepted
Delegated to: Philipp Tomsich
Headers show
Series
  • rockchip: back-to-bootrom: replace assembly-implementation with C-code
Related show

Commit Message

Philipp Tomsich Oct. 10, 2017, 2:21 p.m.
As no '.type' was set for save_boot_params_ret in start.S, binutils
did not track whether it was emitted as A32 or T32.  By properly
marking save_boot_params_ret as a potential function entry, we can
make sure that the compiler will insert the appropriate instructions
for branching to save_boot_params_ret both for call-sites emitted as
A32 and T32.

Reported-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Andy Yan <andy.yan@rock-chips.com>

---

Changes in v5: None
Changes in v4: None
Changes in v3:
- tracked the root-cause why no interwork branch was emitted and fixed
  it using a '.type'-directive in start.S to mark save_boot_params_ret
  as a (possible) function-entry.

Changes in v2: None

 arch/arm/cpu/armv7/start.S | 1 +
 1 file changed, 1 insertion(+)

Comments

Philipp Tomsich Nov. 7, 2017, 2:18 p.m. | #1
> As no '.type' was set for save_boot_params_ret in start.S, binutils
> did not track whether it was emitted as A32 or T32.  By properly
> marking save_boot_params_ret as a potential function entry, we can
> make sure that the compiler will insert the appropriate instructions
> for branching to save_boot_params_ret both for call-sites emitted as
> A32 and T32.
> 
> Reported-by: Andy Yan <andy.yan@rock-chips.com>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Tested-by: Andy Yan <andy.yan@rock-chips.com>
> ---
> 
> Changes in v5: None
> Changes in v4: None
> Changes in v3:
> - tracked the root-cause why no interwork branch was emitted and fixed
>   it using a '.type'-directive in start.S to mark save_boot_params_ret
>   as a (possible) function-entry.
> 
> Changes in v2: None
> 
>  arch/arm/cpu/armv7/start.S | 1 +
>  1 file changed, 1 insertion(+)
> 

Applied to u-boot-rockchip/next, thanks!

Patch

diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 7b84a7a..95a0b52 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -31,6 +31,7 @@ 
 
 	.globl	reset
 	.globl	save_boot_params_ret
+	.type   save_boot_params_ret,%function
 #ifdef CONFIG_ARMV7_LPAE
 	.global	switch_to_hypervisor_ret
 #endif