SPM: Clear 'signals_waiting' when partition wakes up

When a partition wakes up, it does not wait for any signals
at the moment. This patch sets the 'signals_waiting' to 0
when a partition wakes up. The 'signals_waiting' will be set
again when the partition calls 'psa_wait()' the next time.

Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
Change-Id: Ia57079206d6d0d764756e048fb8f3a2b68c869f3
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
index 01ff97e..4062073 100755
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -679,7 +679,7 @@
     partition->signals_asserted |= signal;
 
     if (partition->signals_waiting & signal) {
-        backend_instance.wake_up(partition, signal);
+        backend_instance.wake_up(partition);
     }
 
     CRITICAL_SECTION_LEAVE(cs_assert);
diff --git a/secure_fw/spm/ffm/backend_ipc.c b/secure_fw/spm/ffm/backend_ipc.c
index 11a4235..f778831 100644
--- a/secure_fw/spm/ffm/backend_ipc.c
+++ b/secure_fw/spm/ffm/backend_ipc.c
@@ -226,11 +226,11 @@
     return ret_signal;
 }
 
-static void ipc_wake_up(struct partition_t *p_pt, psa_signal_t signals)
+static void ipc_wake_up(struct partition_t *p_pt)
 {
     thrd_wake_up(&p_pt->waitobj,
                  p_pt->signals_asserted & p_pt->signals_waiting);
-    p_pt->signals_waiting &= ~signals;
+    p_pt->signals_waiting = 0;
 }
 
 const struct backend_ops_t backend_instance = {
diff --git a/secure_fw/spm/ffm/backend_sfn.c b/secure_fw/spm/ffm/backend_sfn.c
index e102a8a..120e213 100644
--- a/secure_fw/spm/ffm/backend_sfn.c
+++ b/secure_fw/spm/ffm/backend_sfn.c
@@ -148,10 +148,9 @@
     return p_pt->signals_asserted & signal_mask;
 }
 
-static void sfn_wake_up(struct partition_t *p_pt, psa_signal_t signals)
+static void sfn_wake_up(struct partition_t *p_pt)
 {
     (void)p_pt;
-    (void)signals;
 }
 
 const struct backend_ops_t backend_instance = {
diff --git a/secure_fw/spm/include/ffm/backend.h b/secure_fw/spm/include/ffm/backend.h
index 61df7b7..3710aca 100644
--- a/secure_fw/spm/include/ffm/backend.h
+++ b/secure_fw/spm/include/ffm/backend.h
@@ -49,9 +49,9 @@
 
     /*
      * Runtime model-specific Partition wake up operation.
-     * Wakes up the Partition with the give signals.
+     * Wakes up the Partition with the asserted signals in 'p_pt'.
      */
-    void (*wake_up)(struct partition_t *p_pt, psa_signal_t signals);
+    void (*wake_up)(struct partition_t *p_pt);
 };
 
 /* RUNTIME MODEL BACKENDS DECLARATION */