> diff --git a/platform/linux-generic/odp_init.c b/platform/linux-
> generic/odp_init.c
> index 5b7e192..f595def 100644
> --- a/platform/linux-generic/odp_init.c
> +++ b/platform/linux-generic/odp_init.c
> @@ -8,13 +8,18 @@
> #include <odp_internal.h>
> #include <odp_debug.h>
>
> -
> -int odp_init_global(void)
> +int odp_init_global(odp_global_init_t *params ODP_UNUSED,
> + odp_global_platform_init_t *platform_params ODP_UNUSED)
> {
> odp_thread_init_global();
>
> odp_system_info_init();
>
> + if (odp_init_platform(platform_params)) {
> platform_params is used here, so remove ODP_UNUSED from argument list.
>> On the other hand, it would be better to remove odp_init_platform()
>> altogether since does not do anything. It's better to add it when actually
>> used.
>> The order of init calls is very important, e.g. now you could not allocate
>> shared
>> memory in odp_init_platform() because it's executed before shm init...
> odp_init_platform() does do something for DPDK / KS2 and we need a place
>holder because
> we want this to be shared between implementations don't we ?
> This is the stuff that must happen before any ODP init starts to satisfy the
> platform SDK
Internals of odp_init_global() is totally platform independent - it cannot be
shared in general. It's HW/OS/ODP implementation dependent what needs to be
initialized in global init, and in which order (e.g. HW spinlocks before shm,
shm before barriers, etc.).
So, if odp_init_platform() is empty for linux-generic, it's better to leave it
out. Also it may not be even one call, the platform_params maybe passed all
over the init calls.
-Petri
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp