From e6c0da159b885bf5858f81d522f6f9a35b25de87 Mon Sep 17 00:00:00 2001 From: Kalyani Chidambaram Date: Mon, 8 Oct 2018 17:01:01 -0700 Subject: [PATCH] cpus: denver: fixup register used to store return address The denver_enable_dco and denver_disable_dco use register X3 to store the return address. But X3 gets over-written by other functions, downstream. This patch stores the return address to X18 instead, to fix this anomaly. Change-Id: Ic40bfc1d9abaa7b90348843b9ecd09521bb4ee7b Signed-off-by: Kalyani Chidambaram --- lib/cpus/aarch64/denver.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cpus/aarch64/denver.S b/lib/cpus/aarch64/denver.S index c377b28b4..e260f8d28 100644 --- a/lib/cpus/aarch64/denver.S +++ b/lib/cpus/aarch64/denver.S @@ -156,12 +156,12 @@ endfunc denver_disable_ext_debug * ---------------------------------------------------- */ func denver_enable_dco - mov x3, x30 + mov x18, x30 bl plat_my_core_pos mov x1, #1 lsl x1, x1, x0 msr s3_0_c15_c0_2, x1 - mov x30, x3 + mov x30, x18 ret endfunc denver_enable_dco @@ -171,7 +171,7 @@ endfunc denver_enable_dco */ func denver_disable_dco - mov x3, x30 + mov x18, x30 /* turn off background work */ bl plat_my_core_pos @@ -188,7 +188,7 @@ func denver_disable_dco and x2, x2, x1 cbnz x2, 1b - mov x30, x3 + mov x30, x18 ret endfunc denver_disable_dco