On 29 January 2016 at 17:10, Savolainen, Petri (Nokia - FI/Espoo) <petri.savolai...@nokia.com> wrote: > > >> -----Original Message----- >> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT >> hongbo.zh...@linaro.org >> Sent: Friday, January 29, 2016 10:50 AM >> To: lng-odp@lists.linaro.org >> Subject: [lng-odp] [PATCH API-NEXT 2/4] linux-generic: separate MIPS >> ODP_CACHE_LINE_SIZE to its arch file >> >> From: Hongbo Zhang <hongbo.zh...@linaro.org> >> >> Currently all ODP_CACHE_LINE_SIZE macros for different architectures are >> held in one header file, they should be moved to their own arch file. >> This patch moves ODP_CACHE_LINE_SIZE for MIPS. >> >> Signed-off-by: Hongbo Zhang <hongbo.zh...@linaro.org> >> --- >> platform/linux-generic/arch/mips64/odp/cpu_arch.h | 2 ++ >> platform/linux-generic/include/odp/align.h | 4 ---- >> 2 files changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/platform/linux-generic/arch/mips64/odp/cpu_arch.h >> b/platform/linux-generic/arch/mips64/odp/cpu_arch.h >> index 3bfa0dc..3e4a1ed 100644 >> --- a/platform/linux-generic/arch/mips64/odp/cpu_arch.h >> +++ b/platform/linux-generic/arch/mips64/odp/cpu_arch.h >> @@ -11,6 +11,8 @@ >> extern "C" { >> #endif >> >> +#define ODP_CACHE_LINE_SIZE 128 > > > This is actually specific to octeon. MIPS spec allow extensions and Octeon > does that. MIPS64 arch file could have MIPS defaults and then use #ifdef > __OCTEON__ to override those which are Octeon specific. Maybe Cavium guys > could help and check these arch definitions. > Then in the arch/mips64/odp/cpu_arch.h
we do like this: #if defined __OCTEON__ #define ODP_CACHE_LINE_SIZE 128 #endif This should be OK? > > -Petri > > > >> + >> static inline void odp_cpu_pause(void) >> { >> __asm__ __volatile__ ("nop"); >> diff --git a/platform/linux-generic/include/odp/align.h b/platform/linux- >> generic/include/odp/align.h >> index 4e045c6..6aba925 100644 >> --- a/platform/linux-generic/include/odp/align.h >> +++ b/platform/linux-generic/include/odp/align.h >> @@ -35,10 +35,6 @@ extern "C" { >> >> #define ODP_CACHE_LINE_SIZE 64 >> >> -#elif defined __OCTEON__ >> - >> -#define ODP_CACHE_LINE_SIZE 128 >> - >> #elif defined __powerpc__ >> >> #define ODP_CACHE_LINE_SIZE 64 >> -- >> 2.1.4 >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp