summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Nie <jun.nie@linaro.org>2018-10-08 14:43:09 +0800
committerJun Nie <jun.nie@linaro.org>2018-10-08 14:43:09 +0800
commit2e200d002b86a26efa3bb4d642750244a29b1a8a (patch)
tree0f844c832692f61a4b16e1c88090b60639a71c1d
parent166a91d6a7f0a2fbfdf1eea991b7389a1c7a23ad (diff)
downloadtrusted-firmware-tf-2e200d002b86a26efa3bb4d642750244a29b1a8a.tar.gz
psci: skip SMP power operation for uniprocessor
Skip SMP power operations for uniprocessor because they are not mandotary for uniprocessor. Signed-off-by: Jun Nie <jun.nie@linaro.org>
-rw-r--r--tests/runtime_services/standard_service/psci/api_tests/psci_features/test_psci_features.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/runtime_services/standard_service/psci/api_tests/psci_features/test_psci_features.c b/tests/runtime_services/standard_service/psci/api_tests/psci_features/test_psci_features.c
index 9302176..58bb001 100644
--- a/tests/runtime_services/standard_service/psci/api_tests/psci_features/test_psci_features.c
+++ b/tests/runtime_services/standard_service/psci/api_tests/psci_features/test_psci_features.c
@@ -29,6 +29,7 @@
*/
#include <debug.h>
+#include <plat_topology.h>
#include <psci.h>
#include <smc.h>
#include <tftf_lib.h>
@@ -45,7 +46,7 @@
test_result_t test_psci_features(void)
{
test_result_t result = TEST_RESULT_SUCCESS;
- int32_t ret_flag;
+ int32_t ret_flag, cpus_cnt;
const psci_function_t *psci_fn;
for (unsigned int i = 0; i < PSCI_NUM_CALLS; i++) {
@@ -71,6 +72,17 @@ test_result_t test_psci_features(void)
psci_fn->id == SMC_PSCI_AFFINITY_INFO_AARCH64)
continue;
#endif
+ /* Skip SMP power operation for uniprocessor */
+ if (psci_fn->id == SMC_PSCI_CPU_ON_AARCH32 ||
+ psci_fn->id == SMC_PSCI_CPU_ON_AARCH64 ||
+ psci_fn->id == SMC_PSCI_AFFINITY_INFO_AARCH32 ||
+ psci_fn->id == SMC_PSCI_AFFINITY_INFO_AARCH64) {
+ cpus_cnt = tftf_get_total_cpus_count();
+ if (cpus_cnt < 2) {
+ continue;
+ }
+ }
+
if (ret_flag == PSCI_E_NOT_SUPPORTED) {
result = TEST_RESULT_FAIL;
tftf_testcase_printf(