diff mbox

[v8,API-NEXT,09/12] linux-generic: sysinfo: set values for cpu_arch_str

Message ID 1453884974-24724-10-git-send-email-hongbo.zhang@linaro.org
State Accepted
Commit 24a6e6464b6837f8ad58fdd8c3d6353a25eb53fd
Headers show

Commit Message

Hongbo Zhang Jan. 27, 2016, 8:56 a.m. UTC
From: Hongbo Zhang <hongbo.zhang@linaro.org>

The values of cpu_arch_str were deleted due to codes reorganization, this
patch adds values to them again.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
---
 platform/linux-generic/arch/mips64/odp_sysinfo_parse.c  | 1 +
 platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c | 1 +
 platform/linux-generic/arch/x86/odp_sysinfo_parse.c     | 1 +
 3 files changed, 3 insertions(+)
diff mbox

Patch

diff --git a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
index b6e0e2c..dcecbb9 100644
--- a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
@@ -15,6 +15,7 @@  int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
 	int model = 0;
 	int count = 2;
 
+	strcpy(sysinfo->cpu_arch_str, "mips64");
 	while (fgets(str, sizeof(str), file) != NULL && count > 0) {
 		if (!mhz) {
 			pos = strstr(str, "BogoMIPS");
diff --git a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c
index 83d88ca..1ed95ad 100644
--- a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c
@@ -15,6 +15,7 @@  int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
 	int model = 0;
 	int count = 2;
 
+	strcpy(sysinfo->cpu_arch_str, "powerpc");
 	while (fgets(str, sizeof(str), file) != NULL && count > 0) {
 		if (!mhz) {
 			pos = strstr(str, "clock");
diff --git a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c
index 831a53a..d2b3c80 100644
--- a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c
@@ -15,6 +15,7 @@  int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
 	uint64_t hz;
 	int id = 0;
 
+	strcpy(sysinfo->cpu_arch_str, "x86");
 	while (fgets(str, sizeof(str), file) != NULL && id < MAX_CPU_NUMBER) {
 		pos = strstr(str, "model name");
 		if (pos) {