
Since only the master core will relocate itself, the spin-table release address seen by master core and other slave cores is different. This commit fixes this issue by recalculating the spin-table release address' offset instead of leaving it to compiler.
Signed-off-by: Tsung-Han Lin tsunghan.tw@gmail.com --- arch/arm/cpu/armv8/spin_table.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/cpu/armv8/spin_table.c b/arch/arm/cpu/armv8/spin_table.c index ec1c9b8ddb6f..1169e2df5f47 100644 --- a/arch/arm/cpu/armv8/spin_table.c +++ b/arch/arm/cpu/armv8/spin_table.c @@ -11,12 +11,16 @@
int spin_table_update_dt(void *fdt) { + extern unsigned long _start; int cpus_offset, offset; const char *prop; int ret; unsigned long rsv_addr = (unsigned long)&spin_table_reserve_begin; unsigned long rsv_size = &spin_table_reserve_end - &spin_table_reserve_begin; + unsigned long unreloc_spin_release_addr = CONFIG_SYS_TEXT_BASE + + (unsigned long)&spin_table_cpu_release_addr - + (unsigned long)&_start;
cpus_offset = fdt_path_offset(fdt, "/cpus"); if (cpus_offset < 0) @@ -47,7 +51,7 @@ int spin_table_update_dt(void *fdt) continue;
ret = fdt_setprop_u64(fdt, offset, "cpu-release-addr", - (unsigned long)&spin_table_cpu_release_addr); + unreloc_spin_release_addr); if (ret) return -ENOSPC; }