diff mbox

[v3,1/4] api: cpu: Added cpu.h

Message ID 1423130234-6305-1-git-send-email-petri.savolainen@linaro.org
State Accepted
Commit 4feec768cd8dd4a39da9bea5a5c206a92df75511
Headers show

Commit Message

Petri Savolainen Feb. 5, 2015, 9:57 a.m. UTC
This file contains cpu related API calls. The calls are
renames from odp_thread_cpu() and odp_sys_cpu_count().

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
---
 include/odp.h                            |  1 +
 include/odp/api/cpu.h                    | 54 ++++++++++++++++++++++++++++++++
 platform/linux-generic/Makefile.am       |  2 ++
 platform/linux-generic/include/odp/cpu.h | 26 +++++++++++++++
 4 files changed, 83 insertions(+)
 create mode 100644 include/odp/api/cpu.h
 create mode 100644 platform/linux-generic/include/odp/cpu.h

Comments

Maxim Uvarov Feb. 9, 2015, 3:11 a.m. UTC | #1
That patches need to be reviewed.

Maxim.

On 02/05/2015 12:57 PM, Petri Savolainen wrote:
> This file contains cpu related API calls. The calls are
> renames from odp_thread_cpu() and odp_sys_cpu_count().
>
> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
> ---
>   include/odp.h                            |  1 +
>   include/odp/api/cpu.h                    | 54 ++++++++++++++++++++++++++++++++
>   platform/linux-generic/Makefile.am       |  2 ++
>   platform/linux-generic/include/odp/cpu.h | 26 +++++++++++++++
>   4 files changed, 83 insertions(+)
>   create mode 100644 include/odp/api/cpu.h
>   create mode 100644 platform/linux-generic/include/odp/cpu.h
>
> diff --git a/include/odp.h b/include/odp.h
> index 139abdf..777b327 100644
> --- a/include/odp.h
> +++ b/include/odp.h
> @@ -27,6 +27,7 @@ extern "C" {
>   #include <odp/hints.h>
>   #include <odp/debug.h>
>   #include <odp/byteorder.h>
> +#include <odp/cpu.h>
>   #include <odp/cpumask.h>
>   #include <odp/barrier.h>
>   #include <odp/spinlock.h>
> diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h
> new file mode 100644
> index 0000000..c389093
> --- /dev/null
> +++ b/include/odp/api/cpu.h
> @@ -0,0 +1,54 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +
> +/**
> + * @file
> + *
> + * ODP CPU API
> + */
> +
> +#ifndef ODP_CPU_H_
> +#define ODP_CPU_H_
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/** @defgroup odp_cpu ODP CPU
> + *  @{
> + */
> +
> +
> +/**
> + * CPU identifier
> + *
> + * Determine CPU identifier on which the calling is running. CPU numbering is
> + * system specific.
> + *
> + * @return CPU identifier
> + */
> +int odp_cpu_id(void);
> +
> +/**
> + * CPU count
> + *
> + * Report the number of CPU's available to this ODP program.
> + * This may be smaller than the number of (online) CPU's in the system.
> + *
> + * @return Number of available CPU's
> + */
> +int odp_cpu_count(void);
> +
> +/**
> + * @}
> + */
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
> index 05f5378..7ebf7a3 100644
> --- a/platform/linux-generic/Makefile.am
> +++ b/platform/linux-generic/Makefile.am
> @@ -18,6 +18,7 @@ odpinclude_HEADERS = \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/classification.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/compiler.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/config.h \
> +		  $(top_srcdir)/platform/linux-generic/include/odp/cpu.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/cpumask.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/crypto.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/debug.h \
> @@ -71,6 +72,7 @@ odpapiinclude_HEADERS = \
>   		  $(top_srcdir)/include/odp/api/classification.h \
>   		  $(top_srcdir)/include/odp/api/compiler.h \
>   		  $(top_srcdir)/include/odp/api/config.h \
> +		  $(top_srcdir)/include/odp/api/cpu.h \
>   		  $(top_srcdir)/include/odp/api/cpumask.h \
>   		  $(top_srcdir)/include/odp/api/crypto.h \
>   		  $(top_srcdir)/include/odp/api/debug.h \
> diff --git a/platform/linux-generic/include/odp/cpu.h b/platform/linux-generic/include/odp/cpu.h
> new file mode 100644
> index 0000000..b5b5320
> --- /dev/null
> +++ b/platform/linux-generic/include/odp/cpu.h
> @@ -0,0 +1,26 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +/**
> + * @file
> + *
> + * ODP CPU
> + */
> +
> +#ifndef ODP_PLAT_CPU_H_
> +#define ODP_PLAT_CPU_H_
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <odp/api/cpu.h>
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
Bill Fischofer Feb. 9, 2015, 4:20 a.m. UTC | #2
On Thu, Feb 5, 2015 at 3:57 AM, Petri Savolainen <
petri.savolainen@linaro.org> wrote:

> This file contains cpu related API calls. The calls are
> renames from odp_thread_cpu() and odp_sys_cpu_count().
>
> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  include/odp.h                            |  1 +
>  include/odp/api/cpu.h                    | 54
> ++++++++++++++++++++++++++++++++
>  platform/linux-generic/Makefile.am       |  2 ++
>  platform/linux-generic/include/odp/cpu.h | 26 +++++++++++++++
>  4 files changed, 83 insertions(+)
>  create mode 100644 include/odp/api/cpu.h
>  create mode 100644 platform/linux-generic/include/odp/cpu.h
>
> diff --git a/include/odp.h b/include/odp.h
> index 139abdf..777b327 100644
> --- a/include/odp.h
> +++ b/include/odp.h
> @@ -27,6 +27,7 @@ extern "C" {
>  #include <odp/hints.h>
>  #include <odp/debug.h>
>  #include <odp/byteorder.h>
> +#include <odp/cpu.h>
>  #include <odp/cpumask.h>
>  #include <odp/barrier.h>
>  #include <odp/spinlock.h>
> diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h
> new file mode 100644
> index 0000000..c389093
> --- /dev/null
> +++ b/include/odp/api/cpu.h
> @@ -0,0 +1,54 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +
> +/**
> + * @file
> + *
> + * ODP CPU API
> + */
> +
> +#ifndef ODP_CPU_H_
> +#define ODP_CPU_H_
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/** @defgroup odp_cpu ODP CPU
> + *  @{
> + */
> +
> +
> +/**
> + * CPU identifier
> + *
> + * Determine CPU identifier on which the calling is running. CPU
> numbering is
> + * system specific.
> + *
> + * @return CPU identifier
> + */
> +int odp_cpu_id(void);
> +
> +/**
> + * CPU count
> + *
> + * Report the number of CPU's available to this ODP program.
> + * This may be smaller than the number of (online) CPU's in the system.
> + *
> + * @return Number of available CPU's
> + */
> +int odp_cpu_count(void);
> +
> +/**
> + * @}
> + */
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
> diff --git a/platform/linux-generic/Makefile.am
> b/platform/linux-generic/Makefile.am
> index 05f5378..7ebf7a3 100644
> --- a/platform/linux-generic/Makefile.am
> +++ b/platform/linux-generic/Makefile.am
> @@ -18,6 +18,7 @@ odpinclude_HEADERS = \
>
> $(top_srcdir)/platform/linux-generic/include/odp/classification.h \
>
> $(top_srcdir)/platform/linux-generic/include/odp/compiler.h \
>
> $(top_srcdir)/platform/linux-generic/include/odp/config.h \
> +                 $(top_srcdir)/platform/linux-generic/include/odp/cpu.h \
>
> $(top_srcdir)/platform/linux-generic/include/odp/cpumask.h \
>
> $(top_srcdir)/platform/linux-generic/include/odp/crypto.h \
>                   $(top_srcdir)/platform/linux-generic/include/odp/debug.h
> \
> @@ -71,6 +72,7 @@ odpapiinclude_HEADERS = \
>                   $(top_srcdir)/include/odp/api/classification.h \
>                   $(top_srcdir)/include/odp/api/compiler.h \
>                   $(top_srcdir)/include/odp/api/config.h \
> +                 $(top_srcdir)/include/odp/api/cpu.h \
>                   $(top_srcdir)/include/odp/api/cpumask.h \
>                   $(top_srcdir)/include/odp/api/crypto.h \
>                   $(top_srcdir)/include/odp/api/debug.h \
> diff --git a/platform/linux-generic/include/odp/cpu.h
> b/platform/linux-generic/include/odp/cpu.h
> new file mode 100644
> index 0000000..b5b5320
> --- /dev/null
> +++ b/platform/linux-generic/include/odp/cpu.h
> @@ -0,0 +1,26 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +/**
> + * @file
> + *
> + * ODP CPU
> + */
> +
> +#ifndef ODP_PLAT_CPU_H_
> +#define ODP_PLAT_CPU_H_
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <odp/api/cpu.h>
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
> --
> 2.2.2
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Feb. 11, 2015, 3:49 a.m. UTC | #3
Ping!

Maxim.

On 02/05/2015 12:57 PM, Petri Savolainen wrote:
> This file contains cpu related API calls. The calls are
> renames from odp_thread_cpu() and odp_sys_cpu_count().
>
> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
> ---
>   include/odp.h                            |  1 +
>   include/odp/api/cpu.h                    | 54 ++++++++++++++++++++++++++++++++
>   platform/linux-generic/Makefile.am       |  2 ++
>   platform/linux-generic/include/odp/cpu.h | 26 +++++++++++++++
>   4 files changed, 83 insertions(+)
>   create mode 100644 include/odp/api/cpu.h
>   create mode 100644 platform/linux-generic/include/odp/cpu.h
>
> diff --git a/include/odp.h b/include/odp.h
> index 139abdf..777b327 100644
> --- a/include/odp.h
> +++ b/include/odp.h
> @@ -27,6 +27,7 @@ extern "C" {
>   #include <odp/hints.h>
>   #include <odp/debug.h>
>   #include <odp/byteorder.h>
> +#include <odp/cpu.h>
>   #include <odp/cpumask.h>
>   #include <odp/barrier.h>
>   #include <odp/spinlock.h>
> diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h
> new file mode 100644
> index 0000000..c389093
> --- /dev/null
> +++ b/include/odp/api/cpu.h
> @@ -0,0 +1,54 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +
> +/**
> + * @file
> + *
> + * ODP CPU API
> + */
> +
> +#ifndef ODP_CPU_H_
> +#define ODP_CPU_H_
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/** @defgroup odp_cpu ODP CPU
> + *  @{
> + */
> +
> +
> +/**
> + * CPU identifier
> + *
> + * Determine CPU identifier on which the calling is running. CPU numbering is
> + * system specific.
> + *
> + * @return CPU identifier
> + */
> +int odp_cpu_id(void);
> +
> +/**
> + * CPU count
> + *
> + * Report the number of CPU's available to this ODP program.
> + * This may be smaller than the number of (online) CPU's in the system.
> + *
> + * @return Number of available CPU's
> + */
> +int odp_cpu_count(void);
> +
> +/**
> + * @}
> + */
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
> index 05f5378..7ebf7a3 100644
> --- a/platform/linux-generic/Makefile.am
> +++ b/platform/linux-generic/Makefile.am
> @@ -18,6 +18,7 @@ odpinclude_HEADERS = \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/classification.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/compiler.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/config.h \
> +		  $(top_srcdir)/platform/linux-generic/include/odp/cpu.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/cpumask.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/crypto.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/debug.h \
> @@ -71,6 +72,7 @@ odpapiinclude_HEADERS = \
>   		  $(top_srcdir)/include/odp/api/classification.h \
>   		  $(top_srcdir)/include/odp/api/compiler.h \
>   		  $(top_srcdir)/include/odp/api/config.h \
> +		  $(top_srcdir)/include/odp/api/cpu.h \
>   		  $(top_srcdir)/include/odp/api/cpumask.h \
>   		  $(top_srcdir)/include/odp/api/crypto.h \
>   		  $(top_srcdir)/include/odp/api/debug.h \
> diff --git a/platform/linux-generic/include/odp/cpu.h b/platform/linux-generic/include/odp/cpu.h
> new file mode 100644
> index 0000000..b5b5320
> --- /dev/null
> +++ b/platform/linux-generic/include/odp/cpu.h
> @@ -0,0 +1,26 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +/**
> + * @file
> + *
> + * ODP CPU
> + */
> +
> +#ifndef ODP_PLAT_CPU_H_
> +#define ODP_PLAT_CPU_H_
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <odp/api/cpu.h>
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
Bill Fischofer Feb. 11, 2015, 3:51 a.m. UTC | #4
I previously reviewed this patch. In fact Gmail says your Ping is a reply
to my reviewed-by.

Bill

On Wednesday, February 11, 2015, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> Ping!
>
> Maxim.
>
> On 02/05/2015 12:57 PM, Petri Savolainen wrote:
>
>> This file contains cpu related API calls. The calls are
>> renames from odp_thread_cpu() and odp_sys_cpu_count().
>>
>> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
>> ---
>>   include/odp.h                            |  1 +
>>   include/odp/api/cpu.h                    | 54
>> ++++++++++++++++++++++++++++++++
>>   platform/linux-generic/Makefile.am       |  2 ++
>>   platform/linux-generic/include/odp/cpu.h | 26 +++++++++++++++
>>   4 files changed, 83 insertions(+)
>>   create mode 100644 include/odp/api/cpu.h
>>   create mode 100644 platform/linux-generic/include/odp/cpu.h
>>
>> diff --git a/include/odp.h b/include/odp.h
>> index 139abdf..777b327 100644
>> --- a/include/odp.h
>> +++ b/include/odp.h
>> @@ -27,6 +27,7 @@ extern "C" {
>>   #include <odp/hints.h>
>>   #include <odp/debug.h>
>>   #include <odp/byteorder.h>
>> +#include <odp/cpu.h>
>>   #include <odp/cpumask.h>
>>   #include <odp/barrier.h>
>>   #include <odp/spinlock.h>
>> diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h
>> new file mode 100644
>> index 0000000..c389093
>> --- /dev/null
>> +++ b/include/odp/api/cpu.h
>> @@ -0,0 +1,54 @@
>> +/* Copyright (c) 2015, Linaro Limited
>> + * All rights reserved.
>> + *
>> + * SPDX-License-Identifier:     BSD-3-Clause
>> + */
>> +
>> +
>> +/**
>> + * @file
>> + *
>> + * ODP CPU API
>> + */
>> +
>> +#ifndef ODP_CPU_H_
>> +#define ODP_CPU_H_
>> +
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>> +/** @defgroup odp_cpu ODP CPU
>> + *  @{
>> + */
>> +
>> +
>> +/**
>> + * CPU identifier
>> + *
>> + * Determine CPU identifier on which the calling is running. CPU
>> numbering is
>> + * system specific.
>> + *
>> + * @return CPU identifier
>> + */
>> +int odp_cpu_id(void);
>> +
>> +/**
>> + * CPU count
>> + *
>> + * Report the number of CPU's available to this ODP program.
>> + * This may be smaller than the number of (online) CPU's in the system.
>> + *
>> + * @return Number of available CPU's
>> + */
>> +int odp_cpu_count(void);
>> +
>> +/**
>> + * @}
>> + */
>> +
>> +#ifdef __cplusplus
>> +}
>> +#endif
>> +
>> +#endif
>> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/
>> Makefile.am
>> index 05f5378..7ebf7a3 100644
>> --- a/platform/linux-generic/Makefile.am
>> +++ b/platform/linux-generic/Makefile.am
>> @@ -18,6 +18,7 @@ odpinclude_HEADERS = \
>>                   $(top_srcdir)/platform/linux-generic/include/odp/classification.h
>> \
>>                   $(top_srcdir)/platform/linux-generic/include/odp/compiler.h
>> \
>>                   $(top_srcdir)/platform/linux-generic/include/odp/config.h
>> \
>> +                 $(top_srcdir)/platform/linux-generic/include/odp/cpu.h
>> \
>>                   $(top_srcdir)/platform/linux-generic/include/odp/cpumask.h
>> \
>>                   $(top_srcdir)/platform/linux-generic/include/odp/crypto.h
>> \
>>                   $(top_srcdir)/platform/linux-generic/include/odp/debug.h
>> \
>> @@ -71,6 +72,7 @@ odpapiinclude_HEADERS = \
>>                   $(top_srcdir)/include/odp/api/classification.h \
>>                   $(top_srcdir)/include/odp/api/compiler.h \
>>                   $(top_srcdir)/include/odp/api/config.h \
>> +                 $(top_srcdir)/include/odp/api/cpu.h \
>>                   $(top_srcdir)/include/odp/api/cpumask.h \
>>                   $(top_srcdir)/include/odp/api/crypto.h \
>>                   $(top_srcdir)/include/odp/api/debug.h \
>> diff --git a/platform/linux-generic/include/odp/cpu.h
>> b/platform/linux-generic/include/odp/cpu.h
>> new file mode 100644
>> index 0000000..b5b5320
>> --- /dev/null
>> +++ b/platform/linux-generic/include/odp/cpu.h
>> @@ -0,0 +1,26 @@
>> +/* Copyright (c) 2015, Linaro Limited
>> + * All rights reserved.
>> + *
>> + * SPDX-License-Identifier:     BSD-3-Clause
>> + */
>> +
>> +/**
>> + * @file
>> + *
>> + * ODP CPU
>> + */
>> +
>> +#ifndef ODP_PLAT_CPU_H_
>> +#define ODP_PLAT_CPU_H_
>> +
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>> +#include <odp/api/cpu.h>
>> +
>> +#ifdef __cplusplus
>> +}
>> +#endif
>> +
>> +#endif
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Feb. 11, 2015, 3:54 a.m. UTC | #5
Bill, was your review for all 3 patches or only for 1/4 ?

Maxim.

On 02/11/2015 06:51 AM, Bill Fischofer wrote:
> I previously reviewed this patch. In fact Gmail says your Ping is a 
> reply to my reviewed-by.
>
> Bill
>
> On Wednesday, February 11, 2015, Maxim Uvarov <maxim.uvarov@linaro.org 
> <mailto:maxim.uvarov@linaro.org>> wrote:
>
>     Ping!
>
>     Maxim.
>
>     On 02/05/2015 12:57 PM, Petri Savolainen wrote:
>
>         This file contains cpu related API calls. The calls are
>         renames from odp_thread_cpu() and odp_sys_cpu_count().
>
>         Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
>         ---
>           include/odp.h                            |  1 +
>           include/odp/api/cpu.h                    | 54
>         ++++++++++++++++++++++++++++++++
>           platform/linux-generic/Makefile.am       |  2 ++
>           platform/linux-generic/include/odp/cpu.h | 26 +++++++++++++++
>           4 files changed, 83 insertions(+)
>           create mode 100644 include/odp/api/cpu.h
>           create mode 100644 platform/linux-generic/include/odp/cpu.h
>
>         diff --git a/include/odp.h b/include/odp.h
>         index 139abdf..777b327 100644
>         --- a/include/odp.h
>         +++ b/include/odp.h
>         @@ -27,6 +27,7 @@ extern "C" {
>           #include <odp/hints.h>
>           #include <odp/debug.h>
>           #include <odp/byteorder.h>
>         +#include <odp/cpu.h>
>           #include <odp/cpumask.h>
>           #include <odp/barrier.h>
>           #include <odp/spinlock.h>
>         diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h
>         new file mode 100644
>         index 0000000..c389093
>         --- /dev/null
>         +++ b/include/odp/api/cpu.h
>         @@ -0,0 +1,54 @@
>         +/* Copyright (c) 2015, Linaro Limited
>         + * All rights reserved.
>         + *
>         + * SPDX-License-Identifier:     BSD-3-Clause
>         + */
>         +
>         +
>         +/**
>         + * @file
>         + *
>         + * ODP CPU API
>         + */
>         +
>         +#ifndef ODP_CPU_H_
>         +#define ODP_CPU_H_
>         +
>         +#ifdef __cplusplus
>         +extern "C" {
>         +#endif
>         +
>         +/** @defgroup odp_cpu ODP CPU
>         + *  @{
>         + */
>         +
>         +
>         +/**
>         + * CPU identifier
>         + *
>         + * Determine CPU identifier on which the calling is running.
>         CPU numbering is
>         + * system specific.
>         + *
>         + * @return CPU identifier
>         + */
>         +int odp_cpu_id(void);
>         +
>         +/**
>         + * CPU count
>         + *
>         + * Report the number of CPU's available to this ODP program.
>         + * This may be smaller than the number of (online) CPU's in
>         the system.
>         + *
>         + * @return Number of available CPU's
>         + */
>         +int odp_cpu_count(void);
>         +
>         +/**
>         + * @}
>         + */
>         +
>         +#ifdef __cplusplus
>         +}
>         +#endif
>         +
>         +#endif
>         diff --git a/platform/linux-generic/Makefile.am
>         b/platform/linux-generic/Makefile.am
>         index 05f5378..7ebf7a3 100644
>         --- a/platform/linux-generic/Makefile.am
>         +++ b/platform/linux-generic/Makefile.am
>         @@ -18,6 +18,7 @@ odpinclude_HEADERS = \
>                          
>         $(top_srcdir)/platform/linux-generic/include/odp/classification.h
>         \
>                          
>         $(top_srcdir)/platform/linux-generic/include/odp/compiler.h \
>                          
>         $(top_srcdir)/platform/linux-generic/include/odp/config.h \
>         +               
>          $(top_srcdir)/platform/linux-generic/include/odp/cpu.h \
>                          
>         $(top_srcdir)/platform/linux-generic/include/odp/cpumask.h \
>                          
>         $(top_srcdir)/platform/linux-generic/include/odp/crypto.h \
>                          
>         $(top_srcdir)/platform/linux-generic/include/odp/debug.h \
>         @@ -71,6 +72,7 @@ odpapiinclude_HEADERS = \
>                           $(top_srcdir)/include/odp/api/classification.h \
>                           $(top_srcdir)/include/odp/api/compiler.h \
>                           $(top_srcdir)/include/odp/api/config.h \
>         +                 $(top_srcdir)/include/odp/api/cpu.h \
>                           $(top_srcdir)/include/odp/api/cpumask.h \
>                           $(top_srcdir)/include/odp/api/crypto.h \
>                           $(top_srcdir)/include/odp/api/debug.h \
>         diff --git a/platform/linux-generic/include/odp/cpu.h
>         b/platform/linux-generic/include/odp/cpu.h
>         new file mode 100644
>         index 0000000..b5b5320
>         --- /dev/null
>         +++ b/platform/linux-generic/include/odp/cpu.h
>         @@ -0,0 +1,26 @@
>         +/* Copyright (c) 2015, Linaro Limited
>         + * All rights reserved.
>         + *
>         + * SPDX-License-Identifier:     BSD-3-Clause
>         + */
>         +
>         +/**
>         + * @file
>         + *
>         + * ODP CPU
>         + */
>         +
>         +#ifndef ODP_PLAT_CPU_H_
>         +#define ODP_PLAT_CPU_H_
>         +
>         +#ifdef __cplusplus
>         +extern "C" {
>         +#endif
>         +
>         +#include <odp/api/cpu.h>
>         +
>         +#ifdef __cplusplus
>         +}
>         +#endif
>         +
>         +#endif
>
>
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org
>     http://lists.linaro.org/mailman/listinfo/lng-odp
>
Bill Fischofer Feb. 11, 2015, 4:08 a.m. UTC | #6
Sorry, that should have been for the series.

Bill

On Tue, Feb 10, 2015 at 9:54 PM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> Bill, was your review for all 3 patches or only for 1/4 ?
>
> Maxim.
>
> On 02/11/2015 06:51 AM, Bill Fischofer wrote:
>
>> I previously reviewed this patch. In fact Gmail says your Ping is a reply
>> to my reviewed-by.
>>
>> Bill
>>
>> On Wednesday, February 11, 2015, Maxim Uvarov <maxim.uvarov@linaro.org
>> <mailto:maxim.uvarov@linaro.org>> wrote:
>>
>>     Ping!
>>
>>     Maxim.
>>
>>     On 02/05/2015 12:57 PM, Petri Savolainen wrote:
>>
>>         This file contains cpu related API calls. The calls are
>>         renames from odp_thread_cpu() and odp_sys_cpu_count().
>>
>>         Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
>>         ---
>>           include/odp.h                            |  1 +
>>           include/odp/api/cpu.h                    | 54
>>         ++++++++++++++++++++++++++++++++
>>           platform/linux-generic/Makefile.am       |  2 ++
>>           platform/linux-generic/include/odp/cpu.h | 26 +++++++++++++++
>>           4 files changed, 83 insertions(+)
>>           create mode 100644 include/odp/api/cpu.h
>>           create mode 100644 platform/linux-generic/include/odp/cpu.h
>>
>>         diff --git a/include/odp.h b/include/odp.h
>>         index 139abdf..777b327 100644
>>         --- a/include/odp.h
>>         +++ b/include/odp.h
>>         @@ -27,6 +27,7 @@ extern "C" {
>>           #include <odp/hints.h>
>>           #include <odp/debug.h>
>>           #include <odp/byteorder.h>
>>         +#include <odp/cpu.h>
>>           #include <odp/cpumask.h>
>>           #include <odp/barrier.h>
>>           #include <odp/spinlock.h>
>>         diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h
>>         new file mode 100644
>>         index 0000000..c389093
>>         --- /dev/null
>>         +++ b/include/odp/api/cpu.h
>>         @@ -0,0 +1,54 @@
>>         +/* Copyright (c) 2015, Linaro Limited
>>         + * All rights reserved.
>>         + *
>>         + * SPDX-License-Identifier:     BSD-3-Clause
>>         + */
>>         +
>>         +
>>         +/**
>>         + * @file
>>         + *
>>         + * ODP CPU API
>>         + */
>>         +
>>         +#ifndef ODP_CPU_H_
>>         +#define ODP_CPU_H_
>>         +
>>         +#ifdef __cplusplus
>>         +extern "C" {
>>         +#endif
>>         +
>>         +/** @defgroup odp_cpu ODP CPU
>>         + *  @{
>>         + */
>>         +
>>         +
>>         +/**
>>         + * CPU identifier
>>         + *
>>         + * Determine CPU identifier on which the calling is running.
>>         CPU numbering is
>>         + * system specific.
>>         + *
>>         + * @return CPU identifier
>>         + */
>>         +int odp_cpu_id(void);
>>         +
>>         +/**
>>         + * CPU count
>>         + *
>>         + * Report the number of CPU's available to this ODP program.
>>         + * This may be smaller than the number of (online) CPU's in
>>         the system.
>>         + *
>>         + * @return Number of available CPU's
>>         + */
>>         +int odp_cpu_count(void);
>>         +
>>         +/**
>>         + * @}
>>         + */
>>         +
>>         +#ifdef __cplusplus
>>         +}
>>         +#endif
>>         +
>>         +#endif
>>         diff --git a/platform/linux-generic/Makefile.am
>>         b/platform/linux-generic/Makefile.am
>>         index 05f5378..7ebf7a3 100644
>>         --- a/platform/linux-generic/Makefile.am
>>         +++ b/platform/linux-generic/Makefile.am
>>         @@ -18,6 +18,7 @@ odpinclude_HEADERS = \
>>                                  $(top_srcdir)/platform/linux-
>> generic/include/odp/classification.h
>>         \
>>                                  $(top_srcdir)/platform/linux-generic/include/odp/compiler.h
>> \
>>                                  $(top_srcdir)/platform/linux-generic/include/odp/config.h
>> \
>>         +                        $(top_srcdir)/platform/linux-generic/include/odp/cpu.h
>> \
>>                                  $(top_srcdir)/platform/linux-generic/include/odp/cpumask.h
>> \
>>                                  $(top_srcdir)/platform/linux-generic/include/odp/crypto.h
>> \
>>                                  $(top_srcdir)/platform/linux-generic/include/odp/debug.h
>> \
>>         @@ -71,6 +72,7 @@ odpapiinclude_HEADERS = \
>>                           $(top_srcdir)/include/odp/api/classification.h
>> \
>>                           $(top_srcdir)/include/odp/api/compiler.h \
>>                           $(top_srcdir)/include/odp/api/config.h \
>>         +                 $(top_srcdir)/include/odp/api/cpu.h \
>>                           $(top_srcdir)/include/odp/api/cpumask.h \
>>                           $(top_srcdir)/include/odp/api/crypto.h \
>>                           $(top_srcdir)/include/odp/api/debug.h \
>>         diff --git a/platform/linux-generic/include/odp/cpu.h
>>         b/platform/linux-generic/include/odp/cpu.h
>>         new file mode 100644
>>         index 0000000..b5b5320
>>         --- /dev/null
>>         +++ b/platform/linux-generic/include/odp/cpu.h
>>         @@ -0,0 +1,26 @@
>>         +/* Copyright (c) 2015, Linaro Limited
>>         + * All rights reserved.
>>         + *
>>         + * SPDX-License-Identifier:     BSD-3-Clause
>>         + */
>>         +
>>         +/**
>>         + * @file
>>         + *
>>         + * ODP CPU
>>         + */
>>         +
>>         +#ifndef ODP_PLAT_CPU_H_
>>         +#define ODP_PLAT_CPU_H_
>>         +
>>         +#ifdef __cplusplus
>>         +extern "C" {
>>         +#endif
>>         +
>>         +#include <odp/api/cpu.h>
>>         +
>>         +#ifdef __cplusplus
>>         +}
>>         +#endif
>>         +
>>         +#endif
>>
>>
>>
>>     _______________________________________________
>>     lng-odp mailing list
>>     lng-odp@lists.linaro.org
>>     http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>
Maxim Uvarov Feb. 11, 2015, 4:18 a.m. UTC | #7
Hole patch set merged!

Maxim.

On 02/05/2015 12:57 PM, Petri Savolainen wrote:
> This file contains cpu related API calls. The calls are
> renames from odp_thread_cpu() and odp_sys_cpu_count().
>
> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
> ---
>   include/odp.h                            |  1 +
>   include/odp/api/cpu.h                    | 54 ++++++++++++++++++++++++++++++++
>   platform/linux-generic/Makefile.am       |  2 ++
>   platform/linux-generic/include/odp/cpu.h | 26 +++++++++++++++
>   4 files changed, 83 insertions(+)
>   create mode 100644 include/odp/api/cpu.h
>   create mode 100644 platform/linux-generic/include/odp/cpu.h
>
> diff --git a/include/odp.h b/include/odp.h
> index 139abdf..777b327 100644
> --- a/include/odp.h
> +++ b/include/odp.h
> @@ -27,6 +27,7 @@ extern "C" {
>   #include <odp/hints.h>
>   #include <odp/debug.h>
>   #include <odp/byteorder.h>
> +#include <odp/cpu.h>
>   #include <odp/cpumask.h>
>   #include <odp/barrier.h>
>   #include <odp/spinlock.h>
> diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h
> new file mode 100644
> index 0000000..c389093
> --- /dev/null
> +++ b/include/odp/api/cpu.h
> @@ -0,0 +1,54 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +
> +/**
> + * @file
> + *
> + * ODP CPU API
> + */
> +
> +#ifndef ODP_CPU_H_
> +#define ODP_CPU_H_
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/** @defgroup odp_cpu ODP CPU
> + *  @{
> + */
> +
> +
> +/**
> + * CPU identifier
> + *
> + * Determine CPU identifier on which the calling is running. CPU numbering is
> + * system specific.
> + *
> + * @return CPU identifier
> + */
> +int odp_cpu_id(void);
> +
> +/**
> + * CPU count
> + *
> + * Report the number of CPU's available to this ODP program.
> + * This may be smaller than the number of (online) CPU's in the system.
> + *
> + * @return Number of available CPU's
> + */
> +int odp_cpu_count(void);
> +
> +/**
> + * @}
> + */
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
> index 05f5378..7ebf7a3 100644
> --- a/platform/linux-generic/Makefile.am
> +++ b/platform/linux-generic/Makefile.am
> @@ -18,6 +18,7 @@ odpinclude_HEADERS = \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/classification.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/compiler.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/config.h \
> +		  $(top_srcdir)/platform/linux-generic/include/odp/cpu.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/cpumask.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/crypto.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/debug.h \
> @@ -71,6 +72,7 @@ odpapiinclude_HEADERS = \
>   		  $(top_srcdir)/include/odp/api/classification.h \
>   		  $(top_srcdir)/include/odp/api/compiler.h \
>   		  $(top_srcdir)/include/odp/api/config.h \
> +		  $(top_srcdir)/include/odp/api/cpu.h \
>   		  $(top_srcdir)/include/odp/api/cpumask.h \
>   		  $(top_srcdir)/include/odp/api/crypto.h \
>   		  $(top_srcdir)/include/odp/api/debug.h \
> diff --git a/platform/linux-generic/include/odp/cpu.h b/platform/linux-generic/include/odp/cpu.h
> new file mode 100644
> index 0000000..b5b5320
> --- /dev/null
> +++ b/platform/linux-generic/include/odp/cpu.h
> @@ -0,0 +1,26 @@
> +/* Copyright (c) 2015, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +/**
> + * @file
> + *
> + * ODP CPU
> + */
> +
> +#ifndef ODP_PLAT_CPU_H_
> +#define ODP_PLAT_CPU_H_
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <odp/api/cpu.h>
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif
diff mbox

Patch

diff --git a/include/odp.h b/include/odp.h
index 139abdf..777b327 100644
--- a/include/odp.h
+++ b/include/odp.h
@@ -27,6 +27,7 @@  extern "C" {
 #include <odp/hints.h>
 #include <odp/debug.h>
 #include <odp/byteorder.h>
+#include <odp/cpu.h>
 #include <odp/cpumask.h>
 #include <odp/barrier.h>
 #include <odp/spinlock.h>
diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h
new file mode 100644
index 0000000..c389093
--- /dev/null
+++ b/include/odp/api/cpu.h
@@ -0,0 +1,54 @@ 
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP CPU API
+ */
+
+#ifndef ODP_CPU_H_
+#define ODP_CPU_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @defgroup odp_cpu ODP CPU
+ *  @{
+ */
+
+
+/**
+ * CPU identifier
+ *
+ * Determine CPU identifier on which the calling is running. CPU numbering is
+ * system specific.
+ *
+ * @return CPU identifier
+ */
+int odp_cpu_id(void);
+
+/**
+ * CPU count
+ *
+ * Report the number of CPU's available to this ODP program.
+ * This may be smaller than the number of (online) CPU's in the system.
+ *
+ * @return Number of available CPU's
+ */
+int odp_cpu_count(void);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 05f5378..7ebf7a3 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -18,6 +18,7 @@  odpinclude_HEADERS = \
 		  $(top_srcdir)/platform/linux-generic/include/odp/classification.h \
 		  $(top_srcdir)/platform/linux-generic/include/odp/compiler.h \
 		  $(top_srcdir)/platform/linux-generic/include/odp/config.h \
+		  $(top_srcdir)/platform/linux-generic/include/odp/cpu.h \
 		  $(top_srcdir)/platform/linux-generic/include/odp/cpumask.h \
 		  $(top_srcdir)/platform/linux-generic/include/odp/crypto.h \
 		  $(top_srcdir)/platform/linux-generic/include/odp/debug.h \
@@ -71,6 +72,7 @@  odpapiinclude_HEADERS = \
 		  $(top_srcdir)/include/odp/api/classification.h \
 		  $(top_srcdir)/include/odp/api/compiler.h \
 		  $(top_srcdir)/include/odp/api/config.h \
+		  $(top_srcdir)/include/odp/api/cpu.h \
 		  $(top_srcdir)/include/odp/api/cpumask.h \
 		  $(top_srcdir)/include/odp/api/crypto.h \
 		  $(top_srcdir)/include/odp/api/debug.h \
diff --git a/platform/linux-generic/include/odp/cpu.h b/platform/linux-generic/include/odp/cpu.h
new file mode 100644
index 0000000..b5b5320
--- /dev/null
+++ b/platform/linux-generic/include/odp/cpu.h
@@ -0,0 +1,26 @@ 
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP CPU
+ */
+
+#ifndef ODP_PLAT_CPU_H_
+#define ODP_PLAT_CPU_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/cpu.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif