Dualcpu: Hotfix to fix unused ns_mailbox_spin_lock() error
ns_mailbox_spin_lock()/unlock() is unused without multi-core tests
and will break build in configression without tests.
Fix it by using TFM_MULTI_CORE_TEST to control build of them.
Change-Id: I859355607f6d67845e0945d980724276ea7d8dcb
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/interface/src/tfm_ns_mailbox.c b/interface/src/tfm_ns_mailbox.c
index 21ee1d8..60758b2 100644
--- a/interface/src/tfm_ns_mailbox.c
+++ b/interface/src/tfm_ns_mailbox.c
@@ -89,20 +89,6 @@
}
}
-/*
- * When NSPE mailbox only covers a single non-secure core, spinlock is only
- * required to disable IRQ.
- */
-static inline void ns_mailbox_spin_lock(void)
-{
- __disable_irq();
-}
-
-static inline void ns_mailbox_spin_unlock(void)
-{
- __enable_irq();
-}
-
static uint8_t acquire_empty_slot(const struct ns_mailbox_queue_t *queue)
{
uint8_t idx;
@@ -138,6 +124,20 @@
}
#ifdef TFM_MULTI_CORE_TEST
+/*
+ * When NSPE mailbox only covers a single non-secure core, spinlock is only
+ * required to disable IRQ.
+ */
+static inline void ns_mailbox_spin_lock(void)
+{
+ __disable_irq();
+}
+
+static inline void ns_mailbox_spin_unlock(void)
+{
+ __enable_irq();
+}
+
void tfm_ns_mailbox_tx_stats_init(void)
{
if (!mailbox_queue_ptr) {