[v5,6/8] linux-generic: systemcpu(): use input parameter instead of global data

Message ID 1456946992-19251-7-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes March 2, 2016, 7:29 p.m.
From: Hongbo Zhang <hongbo.zhang@linaro.org>

In the systemcpu() function, odp_global_data.system_info.huge_page_size
should be sysinfo->huge_page_size instead, because when systemcpu() is
called, the &odp_global_data.system_info is passed as parameter, we should
operate the parameter instead of the global data directly, what's more,
in function systemcpu(), sysinfo->cpu_count and sysinfo->cache_line_size
are used, we should follow same pattern for sysinfo->huge_page_size.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/odp_system_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c
index bedbbc8..2d202a0 100644
--- a/platform/linux-generic/odp_system_info.c
+++ b/platform/linux-generic/odp_system_info.c
@@ -137,7 +137,7 @@  static int systemcpu(odp_system_info_t *sysinfo)
 		return -1;
 	}
 
-	odp_global_data.system_info.huge_page_size = huge_page_size();
+	sysinfo->huge_page_size = huge_page_size();
 
 	return 0;
 }