Hi,

Got:
Using patch: 0001-linux-generic-fixup-cache-line-size-API.patch
  Trying to apply patch
  Patch applied
WARNING: Possible unwrapped commit description (prefer a maximum 75
chars per line)

Also see my question inline below...


On 19 July 2016 at 12:18, Brian Brooks <brian.bro...@linaro.org> wrote:
> Define the ODP API for cache line size to the cache line size defined in the
> (internal) architecture specific directories. Prefix internal cache line size
> identifier with '_' since it leaks into the ODP API header files by inclusion.
>
> Signed-off-by: Brian Brooks <brian.bro...@linaro.org>
> ---
>  platform/linux-generic/arch/default/odp/api/cpu_arch.h | 10 +---------
>  platform/linux-generic/arch/mips64/odp/api/cpu_arch.h  | 14 ++++----------
>  platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h | 10 +---------
>  platform/linux-generic/arch/x86/odp/api/cpu_arch.h     | 10 +---------
>  platform/linux-generic/include/odp/api/align.h         |  8 ++------
>  5 files changed, 9 insertions(+), 43 deletions(-)
>
> diff --git a/platform/linux-generic/arch/default/odp/api/cpu_arch.h 
> b/platform/linux-generic/arch/default/odp/api/cpu_arch.h
> index 29f8889..22b1da2 100644
> --- a/platform/linux-generic/arch/default/odp/api/cpu_arch.h
> +++ b/platform/linux-generic/arch/default/odp/api/cpu_arch.h
> @@ -11,15 +11,7 @@
>  extern "C" {
>  #endif
>
> -/** @ingroup odp_compiler_optim
> - *  @{
> - */
> -
> -#define ODP_CACHE_LINE_SIZE 64
> -
> -/**
> - * @}
> - */
> +#define _ODP_CACHE_LINE_SIZE 64
>
>  static inline void odp_cpu_pause(void)
>  {
> diff --git a/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h 
> b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h
> index 7b5bfd2..1f49cd2 100644
> --- a/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h
> +++ b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h
> @@ -11,18 +11,12 @@
>  extern "C" {
>  #endif
>
> -/** @ingroup odp_compiler_optim
> - *  @{
> - */
> -
> -#if defined __OCTEON__
> -#define ODP_CACHE_LINE_SIZE 128
> +#if defined(__OCTEON__)

Any reason I don't know for these parentheses? I am not aware of them
doing any difference and it does not seem we use to have then in the
rest of the code.

Christophe.

> +#define _ODP_CACHE_LINE_SIZE 128
> +#else
> +#error Please add support for your arch in cpu_arch.h
>  #endif
>
> -/**
> - * @}
> - */
> -
>  static inline void odp_cpu_pause(void)
>  {
>         __asm__ __volatile__ ("nop");
> diff --git a/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h 
> b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h
> index 29f8889..22b1da2 100644
> --- a/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h
> +++ b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h
> @@ -11,15 +11,7 @@
>  extern "C" {
>  #endif
>
> -/** @ingroup odp_compiler_optim
> - *  @{
> - */
> -
> -#define ODP_CACHE_LINE_SIZE 64
> -
> -/**
> - * @}
> - */
> +#define _ODP_CACHE_LINE_SIZE 64
>
>  static inline void odp_cpu_pause(void)
>  {
> diff --git a/platform/linux-generic/arch/x86/odp/api/cpu_arch.h 
> b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h
> index 3a16fa6..44e6b30 100644
> --- a/platform/linux-generic/arch/x86/odp/api/cpu_arch.h
> +++ b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h
> @@ -11,15 +11,7 @@
>  extern "C" {
>  #endif
>
> -/** @ingroup odp_compiler_optim
> - *  @{
> - */
> -
> -#define ODP_CACHE_LINE_SIZE 64
> -
> -/**
> - * @}
> - */
> +#define _ODP_CACHE_LINE_SIZE 64
>
>  static inline void odp_cpu_pause(void)
>  {
> diff --git a/platform/linux-generic/include/odp/api/align.h 
> b/platform/linux-generic/include/odp/api/align.h
> index d8bc653..c36b17b 100644
> --- a/platform/linux-generic/include/odp/api/align.h
> +++ b/platform/linux-generic/include/odp/api/align.h
> @@ -31,16 +31,12 @@ extern "C" {
>
>  #define ODP_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)
>
> -#if defined __arm__ || defined __aarch64__
> -
> -#define ODP_CACHE_LINE_SIZE 64
> -
> -#endif
> -
>  #else
>  #error Non-gcc compatible compiler
>  #endif
>
> +#define ODP_CACHE_LINE_SIZE _ODP_CACHE_LINE_SIZE
> +
>  #define ODP_PAGE_SIZE       4096
>
>  #define ODP_ALIGNED_CACHE   ODP_ALIGNED(ODP_CACHE_LINE_SIZE)
> --
> 2.9.0
>

Reply via email to