diff mbox

[API,NEXT,v5,15/17] example: update CPU Hz calling functions

Message ID 1442325342-13806-16-git-send-email-hongbo.zhang@freescale.com
State New
Headers show

Commit Message

hongbo.zhang@freescale.com Sept. 15, 2015, 1:55 p.m. UTC
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 all the odp_sys_cpu_hz() calling
functions are updated to use the newly added odp_cpu_hz_max() instead of
odp_cpu_hz().
This patch updates the example part of codes.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
---
 example/classifier/odp_classifier.c | 2 +-
 example/generator/odp_generator.c   | 2 +-
 example/ipsec/odp_ipsec.c           | 2 +-
 example/packet/odp_pktio.c          | 2 +-
 example/timer/odp_timer_test.c      | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
index 021d4dc..85372a6 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -746,7 +746,7 @@  static void print_info(char *progname, appl_args_t *appl_args)
 			"CPU count:       %i\n"
 			"\n",
 			odp_version_api_str(), odp_cpu_model_str(),
-			odp_sys_cpu_hz(), odp_sys_cache_line_size(),
+			odp_cpu_hz_max(), odp_sys_cache_line_size(),
 			odp_cpu_count());
 
 	printf("Running ODP appl: \"%s\"\n"
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index 9f9511f..e72fae9 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -1063,7 +1063,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_sys_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/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index ee43c3f..5d2856d 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -1534,7 +1534,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_sys_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/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index 92bb243..555f461 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -650,7 +650,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_sys_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/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index bee4be7..a8448b5 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -350,7 +350,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_sys_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());
 
@@ -446,7 +446,7 @@  int main(int argc, char *argv[])
 		return -1;
 	}
 
-	printf("CPU freq %"PRIu64" Hz\n", odp_sys_cpu_hz());
+	printf("CPU freq %"PRIu64" Hz\n", odp_cpu_hz_max());
 	printf("Cycles vs nanoseconds:\n");
 	ns = 0;
 	cycles = odp_time_ns_to_cycles(ns);