diff mbox

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

Message ID 1453111808-15762-10-git-send-email-hongbo.zhang@linaro.org
State Superseded
Headers show

Commit Message

Hongbo Zhang Jan. 18, 2016, 10:10 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 fd3cb0a..bb1d5d8 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 c471a82..e221f10 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 71c7c9f..aeb3d8f 100644
--- a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c
@@ -14,6 +14,7 @@  int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
 	double ghz = 0.0;
 	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) {