summaryrefslogtreecommitdiff
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-12-12 06:12:45 -0800
committerAndes <uboot@andestech.com>2018-12-18 09:56:27 +0800
commit51ab4570f3920ae3d6822c96fe03ffb97e2072b4 (patch)
tree7474fc94b643c1627d43c4b9029d1dc4d3f46f90 /arch/riscv/include
parent7f5d35a547afb1e4d8e7ca780ab1b9f78ed11d68 (diff)
riscv: Save boot hart id to the global data
At present the hart id passed via a0 in the U-Boot entry is saved to s0 at the beginning but does not preserve later. Save it to the global data structure so that it can be used later. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/global_data.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h
index 46fcfab8407..a3a342c6e1c 100644
--- a/arch/riscv/include/asm/global_data.h
+++ b/arch/riscv/include/asm/global_data.h
@@ -12,6 +12,7 @@
/* Architecture-specific global data */
struct arch_global_data {
+ long boot_hart; /* boot hart id */
#ifdef CONFIG_SIFIVE_CLINT
void __iomem *clint; /* clint base address */
#endif