Message ID | 1453198633-24365-9-git-send-email-hongbo.zhang@linaro.org |
---|---|
State | Superseded |
Headers | show |
diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h index 4cbaf58..eaee24b 100644 --- a/include/odp/api/cpu.h +++ b/include/odp/api/cpu.h @@ -71,6 +71,7 @@ const char *odp_cpu_model_str_id(int id); * Returns current frequency of this CPU * * @return CPU frequency in Hz + * @retval 0 on failure */ uint64_t odp_cpu_hz(void); @@ -82,6 +83,7 @@ uint64_t odp_cpu_hz(void); * @param id CPU ID * * @return CPU frequency in Hz + * @retval 0 on failure */ uint64_t odp_cpu_hz_id(int id); @@ -91,6 +93,7 @@ uint64_t odp_cpu_hz_id(int id); * Returns maximum frequency of this CPU * * @return CPU frequency in Hz + * @retval 0 on failure */ uint64_t odp_cpu_hz_max(void); @@ -102,6 +105,7 @@ uint64_t odp_cpu_hz_max(void); * @param id CPU ID * * @return CPU frequency in Hz + * @retval 0 on failure */ uint64_t odp_cpu_hz_max_id(int id); diff --git a/platform/linux-generic/arch/linux/odp_sysinfo_parse.c b/platform/linux-generic/arch/linux/odp_sysinfo_parse.c index 881dd2d..8ff6f48 100644 --- a/platform/linux-generic/arch/linux/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/linux/odp_sysinfo_parse.c @@ -15,5 +15,5 @@ int odp_cpuinfo_parser(FILE *file ODP_UNUSED, uint64_t odp_cpu_hz_current(int id ODP_UNUSED) { - return -1; + return 0; } diff --git a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c index d855637..8e8a9d0 100644 --- a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c @@ -49,5 +49,5 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) uint64_t odp_cpu_hz_current(int id ODP_UNUSED) { - return -1; + return 0; } diff --git a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c index 5a6063a..fadd1d1 100644 --- a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c @@ -48,5 +48,5 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) uint64_t odp_cpu_hz_current(int id ODP_UNUSED) { - return -1; + return 0; } diff --git a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c index e2931cb..831a53a 100644 --- a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c @@ -68,5 +68,5 @@ uint64_t odp_cpu_hz_current(int id) if (mhz) return (uint64_t)(mhz * 1000000.0); - return -1; + return 0; } diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index e4992b5..de187a0 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -241,7 +241,7 @@ uint64_t odp_cpu_hz_max_id(int id) if (id >= 0 && id < MAX_CPU_NUMBER) return odp_global_data.system_info.cpu_hz[id]; else - return -1; + return 0; } uint64_t odp_sys_huge_page_size(void)