diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-05-12 18:01:13 +0200 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2022-05-16 21:52:22 +0000 |
commit | 6acc05ed310fcd81bea9288df8c4cb4471a8bbbe (patch) | |
tree | d5a360b1cb9d34d75ac279ce18e474cc64bbc9c4 /src/include | |
parent | 94223c41657fa604ff75ce2790504765c8a04713 (diff) |
rules.h: Use more consistent naming
Use 'ENV' consistently and drop the redundant 'STAGE' in the naming.
Change-Id: I51f2a7e70eefad12aa214e92f23e5fd2edf46698
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64296
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/rules.h | 18 | ||||
-rw-r--r-- | src/include/smp/spinlock.h | 2 | ||||
-rw-r--r-- | src/include/stddef.h | 2 | ||||
-rw-r--r-- | src/include/thread.h | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/include/rules.h b/src/include/rules.h index 02b55c5f8a..8ccfe28e66 100644 --- a/src/include/rules.h +++ b/src/include/rules.h @@ -268,15 +268,15 @@ /* Indicates memory layout is determined with arch/x86/car.ld. */ #define ENV_CACHE_AS_RAM (ENV_ROMSTAGE_OR_BEFORE && !CONFIG(RESET_VECTOR_IN_RAM)) /* No .data sections with execute-in-place from ROM. */ -#define ENV_STAGE_HAS_DATA_SECTION !ENV_CACHE_AS_RAM +#define ENV_HAS_DATA_SECTION !ENV_CACHE_AS_RAM #else /* Both .data and .bss, sometimes SRAM not DRAM. */ -#define ENV_STAGE_HAS_DATA_SECTION 1 +#define ENV_HAS_DATA_SECTION 1 #define ENV_CACHE_AS_RAM 0 #endif /* Currently rmodules, ramstage and smm have heap. */ -#define ENV_STAGE_HAS_HEAP_SECTION (ENV_RMODULE || ENV_RAMSTAGE || ENV_SMM) +#define ENV_HAS_HEAP_SECTION (ENV_RMODULE || ENV_RAMSTAGE || ENV_SMM) /* Set USER_SPACE in the makefile for the rare code that runs in userspace */ #if defined(__USER_SPACE__) @@ -293,21 +293,21 @@ #endif #if ENV_X86 -#define STAGE_HAS_SPINLOCKS !ENV_ROMSTAGE_OR_BEFORE +#define ENV_HAS_SPINLOCKS !ENV_ROMSTAGE_OR_BEFORE #elif ENV_RISCV -#define STAGE_HAS_SPINLOCKS 1 +#define ENV_HAS_SPINLOCKS 1 #else -#define STAGE_HAS_SPINLOCKS 0 +#define ENV_HAS_SPINLOCKS 0 #endif /* When set <arch/smp/spinlock.h> is included for the spinlock implementation. */ -#define ENV_STAGE_SUPPORTS_SMP (CONFIG(SMP) && STAGE_HAS_SPINLOCKS) +#define ENV_SUPPORTS_SMP (CONFIG(SMP) && ENV_HAS_SPINLOCKS) #if ENV_X86 && CONFIG(COOP_MULTITASKING) && (ENV_RAMSTAGE || ENV_ROMSTAGE) /* TODO: Enable in all x86 stages */ -#define ENV_STAGE_SUPPORTS_COOP 1 +#define ENV_SUPPORTS_COOP 1 #else -#define ENV_STAGE_SUPPORTS_COOP 0 +#define ENV_SUPPORTS_COOP 0 #endif /** diff --git a/src/include/smp/spinlock.h b/src/include/smp/spinlock.h index 116830cd74..0ca391d93c 100644 --- a/src/include/smp/spinlock.h +++ b/src/include/smp/spinlock.h @@ -1,7 +1,7 @@ #ifndef SMP_SPINLOCK_H #define SMP_SPINLOCK_H -#if ENV_STAGE_SUPPORTS_SMP +#if ENV_SUPPORTS_SMP #include <arch/smp/spinlock.h> #else /* !CONFIG_SMP */ diff --git a/src/include/stddef.h b/src/include/stddef.h index 190413c6a2..100368eddb 100644 --- a/src/include/stddef.h +++ b/src/include/stddef.h @@ -32,7 +32,7 @@ typedef __WINT_TYPE__ wint_t; #define DEVTREE_CONST #endif -#if ENV_STAGE_HAS_DATA_SECTION +#if ENV_HAS_DATA_SECTION #define MAYBE_STATIC_NONZERO static #else #define MAYBE_STATIC_NONZERO diff --git a/src/include/thread.h b/src/include/thread.h index f414db0281..059ba52a2c 100644 --- a/src/include/thread.h +++ b/src/include/thread.h @@ -37,7 +37,7 @@ int thread_run_until(struct thread_handle *handle, enum cb_err (*func)(void *), /* Waits until the thread has terminated and returns the error code */ enum cb_err thread_join(struct thread_handle *handle); -#if ENV_STAGE_SUPPORTS_COOP +#if ENV_SUPPORTS_COOP struct thread { int id; |