From: Hongbo Zhang <hongbo.zh...@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.zh...@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 --git a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c 
b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
index 8b430f5..3415516 100644
--- a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
@@ -16,6 +16,7 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
        int model = 0;
        int count = 2;
 
+       strcpy(sysinfo->cpu_arch_str, "octeon");
        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 61714f8..5f4e69d 100644
--- a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c
@@ -16,6 +16,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 24187f0..02ec9ea 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)
        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) {
-- 
2.1.4

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to