This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 4f2ebb270c30a46c97355da84587a2220281798c (commit) via 1f2bfb175ea39f6a358bb40d92efd21f709f1dd8 (commit) via 62f4a34301f57a39e4bdacab4b45f29596b76ede (commit) from dccf4d8fcba4f912d4844b6d4a30f045b1e12651 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 4f2ebb270c30a46c97355da84587a2220281798c Author: Petri Savolainen petri.savolainen@linaro.org Date: Thu Dec 14 16:24:58 2017 +0200
linux-gen: arch: single cpu cycles file
CPU cycle functions were mixed over odp_cpu_cycles.c and odp_cpu_arch.c files. Implement all three cpu cycle API functions in odp_cpu_cycles.c. odp_cpu_arch.c is deleted.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index d1b91629..8152ea18 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -224,37 +224,32 @@ __LIB__libodp_linux_la_SOURCES = \ odp_weak.c
if ARCH_IS_ARM -__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_arch.c \ - arch/default/odp_cpu_cycles.c \ +__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_cycles.c \ arch/default/odp_global_time.c \ arch/default/odp_sysinfo_parse.c arch_odp_headers = arch/arm/odp/api/cpu_arch.h endif if ARCH_IS_AARCH64 -__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_arch.c \ - arch/default/odp_cpu_cycles.c \ +__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_cycles.c \ arch/aarch64/odp_global_time.c \ arch/default/odp_sysinfo_parse.c arch_odp_headers = arch/aarch64/odp/api/cpu_arch.h endif if ARCH_IS_MIPS64 -__LIB__libodp_linux_la_SOURCES += arch/mips64/odp_cpu_arch.c \ - arch/default/odp_cpu_cycles.c \ +__LIB__libodp_linux_la_SOURCES += arch/mips64/odp_cpu_cycles.c \ arch/default/odp_global_time.c \ arch/mips64/odp_sysinfo_parse.c arch_odp_headers = arch/mips64/odp/api/cpu_arch.h endif if ARCH_IS_POWERPC -__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_arch.c \ - arch/default/odp_cpu_cycles.c \ +__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_cycles.c \ arch/default/odp_global_time.c \ arch/powerpc/odp_sysinfo_parse.c arch_odp_headers = arch/powerpc/odp/api/cpu_arch.h endif if ARCH_IS_X86 __LIB__libodp_linux_la_SOURCES += arch/x86/cpu_flags.c \ - arch/x86/odp_cpu_arch.c \ - arch/default/odp_cpu_cycles.c \ + arch/x86/odp_cpu_cycles.c \ arch/x86/odp_global_time.c \ arch/x86/odp_sysinfo_parse.c arch_odp_headers = arch/x86/odp/api/cpu_arch.h diff --git a/platform/linux-generic/arch/default/odp_cpu_arch.c b/platform/linux-generic/arch/default/odp_cpu_arch.c deleted file mode 100644 index 8a8da744..00000000 --- a/platform/linux-generic/arch/default/odp_cpu_arch.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "config.h" - -#include <odp_posix_extensions.h> - -#include <stdlib.h> -#include <time.h> - -#include <odp/api/cpu.h> -#include <odp_debug_internal.h> - -#define GIGA 1000000000 - -uint64_t odp_cpu_cycles(void) -{ - struct timespec time; - uint64_t sec, ns, hz, cycles; - int ret; - - ret = clock_gettime(CLOCK_MONOTONIC_RAW, &time); - - if (ret != 0) - ODP_ABORT("clock_gettime failed\n"); - - hz = odp_cpu_hz_max(); - sec = (uint64_t)time.tv_sec; - ns = (uint64_t)time.tv_nsec; - - cycles = sec * hz; - cycles += (ns * hz) / GIGA; - - return cycles; -} diff --git a/platform/linux-generic/arch/default/odp_cpu_cycles.c b/platform/linux-generic/arch/default/odp_cpu_cycles.c index ccc58882..548aa817 100644 --- a/platform/linux-generic/arch/default/odp_cpu_cycles.c +++ b/platform/linux-generic/arch/default/odp_cpu_cycles.c @@ -6,7 +6,36 @@
#include "config.h"
+#include <odp_posix_extensions.h> + +#include <stdlib.h> +#include <time.h> + #include <odp/api/cpu.h> +#include <odp_debug_internal.h> + +#define GIGA 1000000000 + +uint64_t odp_cpu_cycles(void) +{ + struct timespec time; + uint64_t sec, ns, hz, cycles; + int ret; + + ret = clock_gettime(CLOCK_MONOTONIC_RAW, &time); + + if (ret != 0) + ODP_ABORT("clock_gettime failed\n"); + + hz = odp_cpu_hz_max(); + sec = (uint64_t)time.tv_sec; + ns = (uint64_t)time.tv_nsec; + + cycles = sec * hz; + cycles += (ns * hz) / GIGA; + + return cycles; +}
uint64_t odp_cpu_cycles_max(void) { diff --git a/platform/linux-generic/arch/mips64/odp_cpu_arch.c b/platform/linux-generic/arch/mips64/odp_cpu_cycles.c similarity index 79% rename from platform/linux-generic/arch/mips64/odp_cpu_arch.c rename to platform/linux-generic/arch/mips64/odp_cpu_cycles.c index 50ffc2e7..85a95f09 100644 --- a/platform/linux-generic/arch/mips64/odp_cpu_arch.c +++ b/platform/linux-generic/arch/mips64/odp_cpu_cycles.c @@ -21,3 +21,13 @@ uint64_t odp_cpu_cycles(void)
return cycle; } + +uint64_t odp_cpu_cycles_max(void) +{ + return UINT64_MAX; +} + +uint64_t odp_cpu_cycles_resolution(void) +{ + return 1; +} diff --git a/platform/linux-generic/arch/x86/odp_cpu_arch.c b/platform/linux-generic/arch/x86/odp_cpu_cycles.c similarity index 77% rename from platform/linux-generic/arch/x86/odp_cpu_arch.c rename to platform/linux-generic/arch/x86/odp_cpu_cycles.c index a20d9173..a474ac25 100644 --- a/platform/linux-generic/arch/x86/odp_cpu_arch.c +++ b/platform/linux-generic/arch/x86/odp_cpu_cycles.c @@ -4,14 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */
-#include "config.h" - -#include <odp_posix_extensions.h> - #include <odp/api/cpu.h> -#include <odp_debug_internal.h> - -#include <time.h>
uint64_t odp_cpu_cycles(void) { @@ -29,3 +22,13 @@ uint64_t odp_cpu_cycles(void)
return tsc.tsc_64; } + +uint64_t odp_cpu_cycles_max(void) +{ + return UINT64_MAX; +} + +uint64_t odp_cpu_cycles_resolution(void) +{ + return 1; +}
commit 1f2bfb175ea39f6a358bb40d92efd21f709f1dd8 Author: Petri Savolainen petri.savolainen@linaro.org Date: Thu Dec 14 09:49:14 2017 +0200
linux-gen: arch: cpu arch specific time header
Rename odp_time_internal.h to odp_arch_time_internal.h, and move it under arch directory. This header specifies internal CPU arch specific time counter functions. All architectures must implement these functions.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index bbe6a21c..d1b91629 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -5,6 +5,7 @@ include $(top_srcdir)/platform/Makefile.inc
AM_CPPFLAGS = -I$(srcdir)/include AM_CPPFLAGS += -I$(top_srcdir)/include +AM_CPPFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch AM_CPPFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ AM_CPPFLAGS += -I$(top_builddir)/include AM_CPPFLAGS += -Iinclude @@ -115,6 +116,7 @@ nodist_odpapiplatinclude_HEADERS = \ include/odp/api/plat/static_inline.h
noinst_HEADERS = \ + arch/odp_arch_time_internal.h \ include/_fdserver_internal.h \ include/_ishm_internal.h \ include/_ishmphy_internal.h \ @@ -150,7 +152,6 @@ noinst_HEADERS = \ include/odp_schedule_if.h \ include/odp_sorted_list_internal.h \ include/odp_shm_internal.h \ - include/odp_time_internal.h \ include/odp_timer_internal.h \ include/odp_timer_wheel_internal.h \ include/odp_traffic_mngr_internal.h \ diff --git a/platform/linux-generic/arch/aarch64/odp_global_time.c b/platform/linux-generic/arch/aarch64/odp_global_time.c index 97444f7e..a1b48ea0 100644 --- a/platform/linux-generic/arch/aarch64/odp_global_time.c +++ b/platform/linux-generic/arch/aarch64/odp_global_time.c @@ -11,7 +11,7 @@ #include <time.h>
#include <odp_debug_internal.h> -#include <odp_time_internal.h> +#include <odp_arch_time_internal.h>
int cpu_has_global_time(void) { diff --git a/platform/linux-generic/arch/default/odp_global_time.c b/platform/linux-generic/arch/default/odp_global_time.c index 89cce1cf..ae8a6bbd 100644 --- a/platform/linux-generic/arch/default/odp_global_time.c +++ b/platform/linux-generic/arch/default/odp_global_time.c @@ -4,18 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */
-#include "config.h" - -#include <odp_posix_extensions.h> - -#include <stdlib.h> -#include <time.h> - -#include <odp/api/cpu.h> -#include <odp/api/hints.h> -#include <odp/api/system_info.h> -#include <odp_debug_internal.h> -#include <odp_time_internal.h> +#include <odp_arch_time_internal.h>
int cpu_has_global_time(void) { diff --git a/platform/linux-generic/arch/mips64/odp_cpu_arch.c b/platform/linux-generic/arch/mips64/odp_cpu_arch.c index 620a0104..50ffc2e7 100644 --- a/platform/linux-generic/arch/mips64/odp_cpu_arch.c +++ b/platform/linux-generic/arch/mips64/odp_cpu_arch.c @@ -9,7 +9,6 @@ #include <odp/api/cpu.h> #include <odp/api/hints.h> #include <odp/api/system_info.h> -#include <odp_time_internal.h>
uint64_t odp_cpu_cycles(void) { diff --git a/platform/linux-generic/include/odp_time_internal.h b/platform/linux-generic/arch/odp_arch_time_internal.h similarity index 82% rename from platform/linux-generic/include/odp_time_internal.h rename to platform/linux-generic/arch/odp_arch_time_internal.h index 99ac7977..ce27101d 100644 --- a/platform/linux-generic/include/odp_time_internal.h +++ b/platform/linux-generic/arch/odp_arch_time_internal.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */
-#ifndef ODP_TIME_INTERNAL_H_ -#define ODP_TIME_INTERNAL_H_ +#ifndef ODP_ARCH_TIME_INTERNAL_H_ +#define ODP_ARCH_TIME_INTERNAL_H_
#ifdef __cplusplus extern "C" { diff --git a/platform/linux-generic/arch/x86/cpu_flags.c b/platform/linux-generic/arch/x86/cpu_flags.c index e46c4ffb..fd880646 100644 --- a/platform/linux-generic/arch/x86/cpu_flags.c +++ b/platform/linux-generic/arch/x86/cpu_flags.c @@ -41,7 +41,7 @@
#include <cpu_flags.h> #include <odp_debug_internal.h> -#include <odp_time_internal.h> +#include <odp_arch_time_internal.h> #include <stdio.h> #include <stdint.h>
diff --git a/platform/linux-generic/arch/x86/odp_global_time.c b/platform/linux-generic/arch/x86/odp_global_time.c index 3ed243cc..c372f089 100644 --- a/platform/linux-generic/arch/x86/odp_global_time.c +++ b/platform/linux-generic/arch/x86/odp_global_time.c @@ -13,7 +13,7 @@ #include <odp/api/cpu.h> #include <odp/api/hints.h> #include <odp_debug_internal.h> -#include <odp_time_internal.h> +#include <odp_arch_time_internal.h>
uint64_t cpu_global_time(void) { diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c index 0df4682c..1ec57c7c 100644 --- a/platform/linux-generic/odp_time.c +++ b/platform/linux-generic/odp_time.c @@ -12,7 +12,7 @@ #include <odp/api/time.h> #include <odp/api/hints.h> #include <odp_debug_internal.h> -#include <odp_time_internal.h> +#include <odp_arch_time_internal.h> #include <string.h> #include <inttypes.h>
commit 62f4a34301f57a39e4bdacab4b45f29596b76ede Author: Petri Savolainen petri.savolainen@linaro.org Date: Thu Dec 14 15:36:47 2017 +0200
linux-gen: arch: remove unused powerpc files
These C files were not built.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/arch/powerpc/odp_cpu_arch.c b/platform/linux-generic/arch/powerpc/odp_cpu_arch.c deleted file mode 100644 index 6a16f13a..00000000 --- a/platform/linux-generic/arch/powerpc/odp_cpu_arch.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "config.h" - -#include <odp_posix_extensions.h> - -#include <stdlib.h> -#include <time.h> - -#include <odp/api/cpu.h> -#include <odp/api/hints.h> -#include <odp/api/system_info.h> -#include <odp_debug_internal.h> -#include <odp_time_internal.h> - -#define GIGA 1000000000 - -uint64_t odp_cpu_cycles(void) -{ - struct timespec time; - uint64_t sec, ns, hz, cycles; - int ret; - - ret = clock_gettime(CLOCK_MONOTONIC_RAW, &time); - - if (ret != 0) - ODP_ABORT("clock_gettime failed\n"); - - hz = odp_cpu_hz_max(); - sec = (uint64_t)time.tv_sec; - ns = (uint64_t)time.tv_nsec; - - cycles = sec * hz; - cycles += (ns * hz) / GIGA; - - return cycles; -} diff --git a/platform/linux-generic/arch/powerpc/odp_global_time.c b/platform/linux-generic/arch/powerpc/odp_global_time.c deleted file mode 100644 index d54ba6bc..00000000 --- a/platform/linux-generic/arch/powerpc/odp_global_time.c +++ /dev/null @@ -1,15 +0,0 @@ - -int cpu_has_global_time(void) -{ - return 0; -} - -uint64_t cpu_global_time(void) -{ - return 0; -} - -uint64_t cpu_global_time_freq(void) -{ - return 0; -}
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/Makefile.am | 18 ++++------ .../linux-generic/arch/aarch64/odp_global_time.c | 2 +- platform/linux-generic/arch/default/odp_cpu_arch.c | 38 -------------------- .../linux-generic/arch/default/odp_cpu_cycles.c | 29 +++++++++++++++ .../linux-generic/arch/default/odp_global_time.c | 13 +------ .../mips64/{odp_cpu_arch.c => odp_cpu_cycles.c} | 11 +++++- .../odp_arch_time_internal.h} | 4 +-- platform/linux-generic/arch/powerpc/odp_cpu_arch.c | 41 ---------------------- .../linux-generic/arch/powerpc/odp_global_time.c | 15 -------- platform/linux-generic/arch/x86/cpu_flags.c | 2 +- .../arch/x86/{odp_cpu_arch.c => odp_cpu_cycles.c} | 17 +++++---- platform/linux-generic/arch/x86/odp_global_time.c | 2 +- platform/linux-generic/odp_time.c | 2 +- 13 files changed, 63 insertions(+), 131 deletions(-) delete mode 100644 platform/linux-generic/arch/default/odp_cpu_arch.c rename platform/linux-generic/arch/mips64/{odp_cpu_arch.c => odp_cpu_cycles.c} (79%) rename platform/linux-generic/{include/odp_time_internal.h => arch/odp_arch_time_internal.h} (82%) delete mode 100644 platform/linux-generic/arch/powerpc/odp_cpu_arch.c delete mode 100644 platform/linux-generic/arch/powerpc/odp_global_time.c rename platform/linux-generic/arch/x86/{odp_cpu_arch.c => odp_cpu_cycles.c} (77%)
hooks/post-receive