summaryrefslogtreecommitdiff
path: root/include/lib
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2017-01-23 16:49:43 +0000
committerGitHub <noreply@github.com>2017-01-23 16:49:43 +0000
commit4abd2225c232e5d102e52db504c7f0f363b87795 (patch)
tree37b3325a0e118c50742f61ba4733a7ff4b9b82bb /include/lib
parente02be2072276769f69735027bcab6868a5ac12e1 (diff)
parent6af03f9c455861d1d37439665bc06c415215d36a (diff)
Merge pull request #800 from masahir0y/ifdef
Correct preprocessor conditionals
Diffstat (limited to 'include/lib')
-rw-r--r--include/lib/cpus/aarch32/cpu_macros.S8
-rw-r--r--include/lib/cpus/aarch64/cpu_macros.S12
2 files changed, 10 insertions, 10 deletions
diff --git a/include/lib/cpus/aarch32/cpu_macros.S b/include/lib/cpus/aarch32/cpu_macros.S
index 17dd2582..64df2366 100644
--- a/include/lib/cpus/aarch32/cpu_macros.S
+++ b/include/lib/cpus/aarch32/cpu_macros.S
@@ -51,11 +51,11 @@
CPU_MIDR: /* cpu_ops midr */
.space 4
/* Reset fn is needed during reset */
-#if IMAGE_BL1 || IMAGE_BL32
+#if defined(IMAGE_BL1) || defined(IMAGE_BL32)
CPU_RESET_FUNC: /* cpu_ops reset_func */
.space 4
#endif
-#if IMAGE_BL32 /* The power down core and cluster is needed only in BL32 */
+#ifdef IMAGE_BL32 /* The power down core and cluster is needed only in BL32 */
CPU_PWR_DWN_OPS: /* cpu_ops power down functions */
.space (4 * CPU_MAX_PWR_DWN_OPS)
#endif
@@ -117,10 +117,10 @@ CPU_OPS_SIZE = .
.align 2
.type cpu_ops_\_name, %object
.word \_midr
-#if IMAGE_BL1 || IMAGE_BL32
+#if defined(IMAGE_BL1) || defined(IMAGE_BL32)
.word \_resetfunc
#endif
-#if IMAGE_BL32
+#ifdef IMAGE_BL32
1:
/* Insert list of functions */
fill_constants CPU_MAX_PWR_DWN_OPS, \_power_down_ops
diff --git a/include/lib/cpus/aarch64/cpu_macros.S b/include/lib/cpus/aarch64/cpu_macros.S
index 570ef884..5012877e 100644
--- a/include/lib/cpus/aarch64/cpu_macros.S
+++ b/include/lib/cpus/aarch64/cpu_macros.S
@@ -51,15 +51,15 @@
CPU_MIDR: /* cpu_ops midr */
.space 8
/* Reset fn is needed in BL at reset vector */
-#if IMAGE_BL1 || IMAGE_BL31
+#if defined(IMAGE_BL1) || defined(IMAGE_BL31)
CPU_RESET_FUNC: /* cpu_ops reset_func */
.space 8
#endif
-#if IMAGE_BL31 /* The power down core and cluster is needed only in BL31 */
+#ifdef IMAGE_BL31 /* The power down core and cluster is needed only in BL31 */
CPU_PWR_DWN_OPS: /* cpu_ops power down functions */
.space (8 * CPU_MAX_PWR_DWN_OPS)
#endif
-#if (IMAGE_BL31 && CRASH_REPORTING)
+#if defined(IMAGE_BL31) && CRASH_REPORTING
CPU_REG_DUMP: /* cpu specific register dump for crash reporting */
.space 8
#endif
@@ -121,10 +121,10 @@ CPU_OPS_SIZE = .
.align 3
.type cpu_ops_\_name, %object
.quad \_midr
-#if IMAGE_BL1 || IMAGE_BL31
+#if defined(IMAGE_BL1) || defined(IMAGE_BL31)
.quad \_resetfunc
#endif
-#if IMAGE_BL31
+#ifdef IMAGE_BL31
1:
/* Insert list of functions */
fill_constants CPU_MAX_PWR_DWN_OPS, \_power_down_ops
@@ -141,7 +141,7 @@ CPU_OPS_SIZE = .
.endif
.endif
#endif
-#if (IMAGE_BL31 && CRASH_REPORTING)
+#if defined(IMAGE_BL31) && CRASH_REPORTING
.quad \_name\()_cpu_reg_dump
#endif
.endm