[API,NEXT,v6,14/14] test: update CPU Hz calling functions

Message ID 1442495411-12362-15-git-send-email-hongbo.zhang@freescale.com
State New
Headers show

Commit Message

hongbo.zhang@freescale.com Sept. 17, 2015, 1:10 p.m.
From: Hongbo Zhang <hongbo.zhang@linaro.org>

The previous odp_sys_cpu_hz() is moved to cpu.h and then renamed to
odp_cpu_hz(), but all the calling function of odp{_sys}_cpu_hz() want to
show maximun CPU capacity in fact, so they should be updated to use the
newly added odp_cpu_hz_max() instead of odp_cpu_hz().
This patch updates the test codes.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
---
 test/api_test/odp_common.c        | 2 +-
 test/performance/odp_atomic.c     | 2 +-
 test/performance/odp_l2fwd.c      | 2 +-
 test/performance/odp_scheduling.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/test/api_test/odp_common.c b/test/api_test/odp_common.c
index 8d05efe..bb89f63 100644
--- a/test/api_test/odp_common.c
+++ b/test/api_test/odp_common.c
@@ -42,7 +42,7 @@  void odp_print_system_info(void)
 	printf("---------------\n");
 	printf("ODP API version: %s\n",        odp_version_api_str());
 	printf("CPU model:       %s\n",        odp_cpu_model_str());
-	printf("CPU freq (hz):   %"PRIu64"\n", odp_cpu_hz());
+	printf("CPU freq (hz):   %"PRIu64"\n", odp_cpu_hz_max());
 	printf("Cache line size: %i\n",        odp_sys_cache_line_size());
 	printf("CPU count:       %i\n",        odp_cpu_count());
 	printf("CPU mask:        %s\n",        str);
diff --git a/test/performance/odp_atomic.c b/test/performance/odp_atomic.c
index 74d4f3a..dea6210 100644
--- a/test/performance/odp_atomic.c
+++ b/test/performance/odp_atomic.c
@@ -338,7 +338,7 @@  void odp_print_system_info(void)
 	printf("---------------\n");
 	printf("ODP API version: %s\n",        odp_version_api_str());
 	printf("CPU model:       %s\n",        odp_cpu_model_str());
-	printf("CPU freq (hz):   %"PRIu64"\n", odp_cpu_hz());
+	printf("CPU freq (hz):   %"PRIu64"\n", odp_cpu_hz_max());
 	printf("Cache line size: %i\n",        odp_sys_cache_line_size());
 	printf("CPU count:       %i\n",        odp_cpu_count());
 	printf("CPU mask:        %s\n",        str);
diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index 91138bc..9ff4a77 100644
--- a/test/performance/odp_l2fwd.c
+++ b/test/performance/odp_l2fwd.c
@@ -669,7 +669,7 @@  static void print_info(char *progname, appl_args_t *appl_args)
 	       "Cache line size: %i\n"
 	       "CPU count:       %i\n"
 	       "\n",
-	       odp_version_api_str(), odp_cpu_model_str(), odp_cpu_hz(),
+	       odp_version_api_str(), odp_cpu_model_str(), odp_cpu_hz_max(),
 	       odp_sys_cache_line_size(), odp_cpu_count());
 
 	printf("Running ODP appl: \"%s\"\n"
diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c
index 72be34d..50f6c80 100644
--- a/test/performance/odp_scheduling.c
+++ b/test/performance/odp_scheduling.c
@@ -879,7 +879,7 @@  int main(int argc, char *argv[])
 	printf("---------------\n");
 	printf("ODP API version: %s\n",        odp_version_api_str());
 	printf("CPU model:       %s\n",        odp_cpu_model_str());
-	printf("CPU freq (hz):   %"PRIu64"\n", odp_cpu_hz());
+	printf("CPU freq (hz):   %"PRIu64"\n", odp_cpu_hz_max());
 	printf("Cache line size: %i\n",        odp_sys_cache_line_size());
 	printf("Max CPU count:   %i\n",        odp_cpu_count());