diff mbox

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

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

Commit Message

hongbo.zhang@freescale.com Sept. 17, 2015, 1:10 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 they should be 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 8f3c37f..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_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 9dd7f3e..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_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 5050d8e..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_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 c48364b..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_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 67f8742..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_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_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);