aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/odp_init.c
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2016-03-31 08:08:14 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2016-04-11 15:43:35 +0300
commitf664cb8477f751652918fc04fc72b7c2e47d4496 (patch)
treeaabe159e0a3c5dc18054980947f2699f3a46d3ac /platform/linux-generic/odp_init.c
parent5dfb394439560fc13275c74c3e529faf9730f05a (diff)
linux-generic: add support for initial cpumasks
These code changes depend on the addition of control and worker cpumask pointers to the ODP initialization parameters, and implement the change in behavior suggested with that patch. They serve as the 'glue' between the input of the new ODP API initial cpuset masks and the use of those new cpumasks by the ODP application or instance. These changes allow multiple concurrent ODP instances to be given CPU resources which do not conflict with one another, so multiple ODP instances can coexist harmoniously with any isolation support on the underlying platform as well as with one another. Specifically: if either of the cpumask pointers are NULL when calling odp_init_global(), then that function creates 'best-guess' default values for the unspecified cpumasks and saves those defaults into global variables for later reference. However, if the cpumasks are valid and their pointers initialized prior to calling odp_init_global() then that routine saves their contents into the global variables instead of the default cpumasks. When odp_cpumask_default_control() or odp_cpumask_default_worker() are called they build the caller's cpumasks based on the saved contents of the global cpumask variables. Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/odp_init.c')
-rw-r--r--platform/linux-generic/odp_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c
index 56b1e9585..51aaa9a40 100644
--- a/platform/linux-generic/odp_init.c
+++ b/platform/linux-generic/odp_init.c
@@ -27,7 +27,7 @@ int odp_init_global(odp_instance_t *instance,
odp_global_data.abort_fn = params->abort_fn;
}
- if (odp_cpumask_init_global()) {
+ if (odp_cpumask_init_global(params)) {
ODP_ERR("ODP cpumask init failed.\n");
goto init_failed;
}