diff mbox

[v6,API-NEXT,01/12] linux-generic: sysinfo: move cpu_arch_str to odp_system_info_t

Message ID 1453198633-24365-2-git-send-email-hongbo.zhang@linaro.org
State Superseded
Headers show

Commit Message

Hongbo Zhang Jan. 19, 2016, 10:17 a.m. UTC
From: Hongbo Zhang <hongbo.zhang@linaro.org>

This is a pre-step for separating platform specific codes into their own
arch files.
Value of cpu_arch_str will be set later in separate arch parser code.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
---
 platform/linux-generic/include/odp_internal.h | 1 +
 platform/linux-generic/odp_system_info.c      | 5 -----
 2 files changed, 1 insertion(+), 5 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h
index cdbed7d..39e6f78 100644
--- a/platform/linux-generic/include/odp_internal.h
+++ b/platform/linux-generic/include/odp_internal.h
@@ -31,6 +31,7 @@  typedef struct {
 	uint64_t page_size;
 	int      cache_line_size;
 	int      cpu_count;
+	char     cpu_arch_str[128];
 	char     model_str[MAX_CPU_NUMBER][128];
 } odp_system_info_t;
 
diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c
index bab3f44..f965023 100644
--- a/platform/linux-generic/odp_system_info.c
+++ b/platform/linux-generic/odp_system_info.c
@@ -26,7 +26,6 @@ 
 
 
 typedef struct {
-	const char *cpu_arch_str;
 	int (*cpuinfo_parser)(FILE *file, odp_system_info_t *sysinfo);
 
 } odp_compiler_info_t;
@@ -291,19 +290,15 @@  static uint64_t arch_cpu_hz_current(int id ODP_UNUSED)
 
 static odp_compiler_info_t compiler_info = {
 	#if defined __x86_64__ || defined __i386__
-	.cpu_arch_str = "x86",
 	.cpuinfo_parser = cpuinfo_x86
 
 	#elif defined __arm__ || defined __aarch64__
-	.cpu_arch_str = "arm",
 	.cpuinfo_parser = cpuinfo_arm
 
 	#elif defined __OCTEON__
-	.cpu_arch_str = "octeon",
 	.cpuinfo_parser = cpuinfo_octeon
 
 	#elif defined __powerpc__
-	.cpu_arch_str = "powerpc",
 	.cpuinfo_parser = cpuinfo_powerpc
 
 	#else