summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-03-22 15:48:51 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-04-20 09:59:12 +0100
commitaa61368eb554e9910c503f78560153805a2d6859 (patch)
treeffcdb0f2665acbfebd1d866cefb0724600162ce0 /include
parent044bb2faabd7981af4ef419e1037fec28e5b3f8b (diff)
Control inclusion of helper code used for asserts
Many asserts depend on code that is conditionally compiled based on the DEBUG define. This patch modifies the conditional inclusion of such code so that it is based on the ENABLE_ASSERTIONS build option. Change-Id: I6406674788aa7e1ad7c23d86ce94482ad3c382bd Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/lib/el3_runtime/context_mgmt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/lib/el3_runtime/context_mgmt.h b/include/lib/el3_runtime/context_mgmt.h
index ca868ddb..31bf6816 100644
--- a/include/lib/el3_runtime/context_mgmt.h
+++ b/include/lib/el3_runtime/context_mgmt.h
@@ -87,7 +87,7 @@ void cm_set_context_by_mpidr(uint64_t mpidr,
******************************************************************************/
static inline void cm_set_next_context(void *context)
{
-#if DEBUG
+#if ENABLE_ASSERTIONS
uint64_t sp_mode;
/*
@@ -98,7 +98,7 @@ static inline void cm_set_next_context(void *context)
: "=r" (sp_mode));
assert(sp_mode == MODE_SP_EL0);
-#endif
+#endif /* ENABLE_ASSERTIONS */
__asm__ volatile("msr spsel, #1\n"
"mov sp, %0\n"