SPM: Activate scheduler in psa_wait() if no signal asserted
psa_wait() should always activate scheduler if the expected signal
is not asserted.
Change-Id: I7b910320e7c473b30ef764fdf19f2a04195fa3b1
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/secure_fw/spm/ffm/psa_client_service_apis.c b/secure_fw/spm/ffm/psa_client_service_apis.c
index 9cb287f..b83d0be 100644
--- a/secure_fw/spm/ffm/psa_client_service_apis.c
+++ b/secure_fw/spm/ffm/psa_client_service_apis.c
@@ -145,6 +145,9 @@
(partition->signals_asserted & signal_mask) == 0) {
partition->signals_waiting = signal_mask;
tfm_event_wait(&partition->event);
+ } else if ((partition->signals_asserted & signal_mask) == 0) {
+ /* Activate scheduler to check if any higher priority thread to run */
+ tfm_core_thrd_activate_schedule();
}
return partition->signals_asserted & signal_mask;