From 2e200d002b86a26efa3bb4d642750244a29b1a8a Mon Sep 17 00:00:00 2001 From: Jun Nie Date: Mon, 8 Oct 2018 14:43:09 +0800 Subject: 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 --- .../psci/api_tests/psci_features/test_psci_features.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 +#include #include #include #include @@ -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( -- cgit v1.2.3