diff options
author | Hongbo Zhang <hongbo.zhang@linaro.org> | 2016-01-27 16:56:14 +0800 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-02-08 20:45:23 +0300 |
commit | b69c80b1155676fbb7dad3c4de0f0038ac8b3e5d (patch) | |
tree | 8c6430b21fd15d71de87aa2a2657432ab9541d70 /platform | |
parent | e86a308cad3b6af226965bc2e04cf2e03851222b (diff) |
linux-generic: sysinfo: rename variable cpu_hz to cpu_hz_max
The legacy variable cpu_hz holds the max frequency for odp_cpu_hz_max(),
so rename it to cpu_hz_max for better meaning.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
5 files changed, 6 insertions, 6 deletions
diff --git a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c index 64d65d28d..53074f7bd 100644 --- a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c @@ -26,7 +26,7 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) if (sscanf(pos, "BogoMIPS : %lf", &mhz) == 1) { /* bogomips seems to be 2x freq */ hz = (uint64_t)(mhz * 1000000.0 / 2.0); - sysinfo->cpu_hz[id] = hz; + sysinfo->cpu_hz_max[id] = hz; count--; } } diff --git a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c index 62c3ae364..99457cec4 100644 --- a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c @@ -25,7 +25,7 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) if (pos) if (sscanf(pos, "clock : %lf", &mhz) == 1) { hz = (uint64_t)(mhz * 1000000.0); - sysinfo->cpu_hz[id] = hz; + sysinfo->cpu_hz_max[id] = hz; count--; } } diff --git a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c index d2b3c8099..816629dfa 100644 --- a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c @@ -27,7 +27,7 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) *(pos - 1) = '\0'; if (sscanf(pos, "@ %lfGHz", &ghz) == 1) { hz = (uint64_t)(ghz * 1000000000.0); - sysinfo->cpu_hz[id] = hz; + sysinfo->cpu_hz_max[id] = hz; } id++; } diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index f37c6c3d2..e75154a51 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -27,7 +27,7 @@ extern __thread int __odp_errno; #define MAX_CPU_NUMBER 128 typedef struct { - uint64_t cpu_hz[MAX_CPU_NUMBER]; + uint64_t cpu_hz_max[MAX_CPU_NUMBER]; uint64_t huge_page_size; uint64_t page_size; int cache_line_size; diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index 727053a73..42aef8a11 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -169,7 +169,7 @@ static int systemcpu(odp_system_info_t *sysinfo) ODP_DBG("Warning: use dummy values for freq and model string\n"); ODP_DBG("Refer to https://bugs.linaro.org/show_bug.cgi?id=1870\n"); for (i = 0; i < MAX_CPU_NUMBER; i++) { - sysinfo->cpu_hz[i] = 1400000000; + sysinfo->cpu_hz_max[i] = 1400000000; strcpy(sysinfo->model_str[i], "UNKNOWN"); } @@ -240,7 +240,7 @@ uint64_t odp_cpu_hz_max(void) 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]; + return odp_global_data.system_info.cpu_hz_max[id]; else return 0; } |