diff mbox series

[v1,2/3] linux-gen: arch: cpu arch specific time header

Message ID 1513861209-18790-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v1,1/3] linux-gen: arch: remove unused powerpc files | expand

Commit Message

Github ODP bot Dec. 21, 2017, 1 p.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


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>

---
/** Email created from pull request 358 (psavol:master-arch-dir-cleanup)
 ** https://github.com/Linaro/odp/pull/358
 ** Patch: https://github.com/Linaro/odp/pull/358.patch
 ** Base sha: 6b5cdc77eb9759a2349b10372a964648559bc92c
 ** Merge commit sha: 93353441d4d0b5d0d679401db0daaef8f7f26ee1
 **/
 platform/linux-generic/Makefile.am                          |  3 ++-
 platform/linux-generic/arch/aarch64/odp_global_time.c       |  2 +-
 platform/linux-generic/arch/default/odp_global_time.c       | 13 +------------
 platform/linux-generic/arch/mips64/odp_cpu_arch.c           |  1 -
 .../odp_time_internal.h => arch/odp_arch_time_internal.h}   |  4 ++--
 platform/linux-generic/arch/x86/cpu_flags.c                 |  2 +-
 platform/linux-generic/arch/x86/odp_global_time.c           |  2 +-
 platform/linux-generic/odp_time.c                           |  2 +-
 8 files changed, 9 insertions(+), 20 deletions(-)
 rename platform/linux-generic/{include/odp_time_internal.h => arch/odp_arch_time_internal.h} (82%)
diff mbox series

Patch

diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index bbe6a21c2..d1b916292 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 97444f7e9..a1b48ea00 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 89cce1cfb..ae8a6bbda 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 620a01044..50ffc2e77 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 99ac79772..ce27101d6 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 e46c4ffb6..fd8806462 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 3ed243cc6..c372f0890 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 0df4682c3..1ec57c7cd 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>