aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/cpu/cpu.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-26 11:27:30 -0400
committerTom Rini <trini@konsulko.com>2022-09-26 11:27:30 -0400
commitffa2c88bcf8618b6d6fb71f5263beede9a179b20 (patch)
tree750fa5677f89e5b7b48d1510cba9978a2b13b15e /arch/riscv/cpu/cpu.c
parent9114b7cee817789ad59e0fb6d5cd57f50668b4e1 (diff)
parent3c1ec13317292933fd01d9c60aae3ff1d5bc171e (diff)
Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-riscv into next
Diffstat (limited to 'arch/riscv/cpu/cpu.c')
-rw-r--r--arch/riscv/cpu/cpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index 3ffcbbd23f..52ab02519f 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -19,15 +19,17 @@
* The variables here must be stored in the data section since they are used
* before the bss section is available.
*/
-#ifndef CONFIG_XIP
+#if !CONFIG_IS_ENABLED(XIP)
u32 hart_lottery __section(".data") = 0;
+#ifdef CONFIG_AVAILABLE_HARTS
/*
* The main hart running U-Boot has acquired available_harts_lock until it has
* finished initialization of global data.
*/
u32 available_harts_lock = 1;
#endif
+#endif
static inline bool supports_extension(char ext)
{