@@ -26,7 +26,7 @@ extern __thread int __odp_errno;
#define MAX_CPU_NUMBER 128
typedef struct {
- uint64_t cpu_hz;
+ uint64_t cpu_hz[MAX_CPU_NUMBER];
uint64_t huge_page_size;
uint64_t page_size;
int cache_line_size;
@@ -149,7 +149,7 @@ static int cpuinfo_x86(FILE *file, odp_system_info_t *sysinfo)
}
}
- sysinfo->cpu_hz = (uint64_t) (mhz * 1000000.0);
+ sysinfo->cpu_hz[0] = (uint64_t)(mhz * 1000000.0);
return 0;
}
@@ -199,7 +199,7 @@ static int cpuinfo_octeon(FILE *file, odp_system_info_t *sysinfo)
}
/* bogomips seems to be 2x freq */
- sysinfo->cpu_hz = (uint64_t) (mhz * 1000000.0 / 2.0);
+ sysinfo->cpu_hz[0] = (uint64_t)(mhz * 1000000.0 / 2.0);
return 0;
}
@@ -237,7 +237,7 @@ static int cpuinfo_powerpc(FILE *file, odp_system_info_t *sysinfo)
}
}
- sysinfo->cpu_hz = (uint64_t) (mhz * 1000000.0);
+ sysinfo->cpu_hz[0] = (uint64_t)(mhz * 1000000.0);
}
@@ -330,7 +330,7 @@ static int systemcpu(odp_system_info_t *sysinfo)
sysinfo->huge_page_size = huge_page_size();
/* Dummy values */
- sysinfo->cpu_hz = 1400000000;
+ sysinfo->cpu_hz[0] = 1400000000;
sysinfo->cache_line_size = 64;
strncpy(sysinfo->model_str[0], "UNKNOWN", sizeof(sysinfo->model_str));
@@ -376,7 +376,7 @@ int odp_system_info_init(void)
*/
uint64_t odp_sys_cpu_hz(void)
{
- return odp_global_data.system_info.cpu_hz;
+ return odp_global_data.system_info.cpu_hz[0];
}
uint64_t odp_sys_huge_page_size(void)