]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(cpufeat): resolve build errors due to compiler optimization
authorJayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Wed, 1 Mar 2023 15:35:28 +0000 (15:35 +0000)
committerjayanthchidanand-arm <jayanthdodderi.chidanand@arm.com>
Wed, 1 Mar 2023 16:54:07 +0000 (17:54 +0100)
Currently most of the architectural feature build flags are set
to 2(FEATURE_STATE_CHECK) for fvp platform only.

However other platforms still configure them by default to 0, which
would lead to build failures in cases when compiler configured
to build TF-A  with zero optimization (CFLAGS='-O0').

This patch addresses such build issues and thereby resolves the failures
seen under CI-l3 test_configurations.

Change-Id: I45b82b821951bba6b9df08177f7d286e624a4239
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
include/lib/extensions/brbe.h
include/lib/extensions/trbe.h
include/lib/extensions/trf.h

index aac1ace597abb978d3f9c3f8879b3ca775ac32b5..aee208d04589ce2f082329695188d8f4bd866070 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022, Arm Limited. All rights reserved.
+ * Copyright (c) 2022-2023, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -7,6 +7,12 @@
 #ifndef BRBE_H
 #define BRBE_H
 
+#if ENABLE_BRBE_FOR_NS
 void brbe_enable(void);
+#else
+void brbe_enable(void)
+{
+}
+#endif /* ENABLE_BRBE_FOR_NS */
 
 #endif /* BRBE_H */
index 1753ab6bf06a8b98eee6eb622c0442737d0d2f58..0eff7c4ee13d28bdbbdee11e08b5eaf447a3f644 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2021-2023, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -7,6 +7,12 @@
 #ifndef TRBE_H
 #define TRBE_H
 
+#if ENABLE_TRBE_FOR_NS
 void trbe_enable(void);
+#else
+void trbe_enable(void)
+{
+}
+#endif /* ENABLE_TRBE_FOR_NS */
 
 #endif /* TRBE_H */
index 18f17f36df66493880b3ed847c042a1050f5580b..a440abd4b680168bc5256329ad1feb2ea1204f34 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2021-2023, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -7,6 +7,12 @@
 #ifndef TRF_H
 #define TRF_H
 
+#if ENABLE_TRF_FOR_NS
 void trf_enable(void);
+#else
+void trf_enable(void)
+{
+}
+#endif /* ENABLE_TRF_FOR_NS */
 
 #endif /* TRF_H */