Merge pull request #67 in SEL4/sel4_libs from ~MFERNANDEZ/sel4_libs:19812fa6-322c-457a-99c4-0c545d626a79 to master * commit '742363e77be941ebd6210feecaf8b736ed7260ec': libsel4bench: Separate ARM sources by CPU. libsel4bench: Move ARMv7-a-specific file into subdirectory.
diff --git a/libsel4bench/Makefile b/libsel4bench/Makefile index ebd6d43..49752a5 100644 --- a/libsel4bench/Makefile +++ b/libsel4bench/Makefile
@@ -14,7 +14,9 @@ # Source files required to build the target CFILES := \ $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/*.c)) \ - $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/arch-$(ARCH)/*.c)) + $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/arch-$(ARCH)/*.c)) \ + $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/arch-$(ARCH)/armv/$(ARMV)/*.c)) \ + $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/arch-$(ARCH)/cpu/$(CPU)/*.c)) # Header files/directories this library provides # Note: sel4_client.h may not have been built at the time this is evaluated.
diff --git a/libsel4bench/src/arch-arm/event_counters_armv7a.c b/libsel4bench/src/arch-arm/armv/armv7-a/event_counters_armv7a.c similarity index 97% rename from libsel4bench/src/arch-arm/event_counters_armv7a.c rename to libsel4bench/src/arch-arm/armv/armv7-a/event_counters_armv7a.c index 5ae1544..5b5b0d7 100644 --- a/libsel4bench/src/arch-arm/event_counters_armv7a.c +++ b/libsel4bench/src/arch-arm/armv/armv7-a/event_counters_armv7a.c
@@ -8,11 +8,9 @@ * @TAG(NICTA_BSD) */ -#if defined(ARMV7_A) - #include <utils/util.h> -#include "event_counters.h" +#include "../../event_counters.h" #define NAME_EVENT(id, name) EVENT_COUNTER_FORMAT(SEL4BENCH_ARMV7A_EVENT_##id, name) @@ -58,5 +56,3 @@ { return ARRAY_SIZE(sel4bench_arch_event_counter_data); } - -#endif /* defined(ARMV7_A) */
diff --git a/libsel4bench/src/arch-arm/event_counters_arm1136.c b/libsel4bench/src/arch-arm/cpu/arm1136jf-s/event_counters_arm1136.c similarity index 93% rename from libsel4bench/src/arch-arm/event_counters_arm1136.c rename to libsel4bench/src/arch-arm/cpu/arm1136jf-s/event_counters_arm1136.c index 44a9870..0ef3948 100644 --- a/libsel4bench/src/arch-arm/event_counters_arm1136.c +++ b/libsel4bench/src/arch-arm/cpu/arm1136jf-s/event_counters_arm1136.c
@@ -8,11 +8,9 @@ * @TAG(NICTA_BSD) */ -#if defined(ARM1136J_S) || defined(ARM1136JF_S) - #include <utils/util.h> -#include "event_counters.h" +#include "../../event_counters.h" #define NAME_EVENT(id, name) EVENT_COUNTER_FORMAT(SEL4BENCH_ARM1136_EVENT_##id, name) @@ -54,5 +52,3 @@ { return ARRAY_SIZE(sel4bench_cpu_event_counter_data); } - -#endif /* defined(ARM1136J_S) || defined(ARM1136JF_S) */
diff --git a/libsel4bench/src/arch-arm/event_counters_cortexa15.c b/libsel4bench/src/arch-arm/cpu/cortex-a15/event_counters_cortexa15.c similarity index 96% rename from libsel4bench/src/arch-arm/event_counters_cortexa15.c rename to libsel4bench/src/arch-arm/cpu/cortex-a15/event_counters_cortexa15.c index 396625c..565daf5 100644 --- a/libsel4bench/src/arch-arm/event_counters_cortexa15.c +++ b/libsel4bench/src/arch-arm/cpu/cortex-a15/event_counters_cortexa15.c
@@ -8,11 +8,7 @@ * @TAG(NICTA_BSD) */ -#include <autoconf.h> - -#if defined(CONFIG_ARM_CORTEX_A15) - -#include "event_counters.h" +#include "../../event_counters.h" #define NAME_EVENT(id, name) EVENT_COUNTER_FORMAT(SEL4BENCH_CORTEXA15_EVENT_##id, name) @@ -67,5 +63,3 @@ { return ARRAY_SIZE(sel4bench_cpu_event_counter_data); } - -#endif /* defined(CONFIG_ARM_CORTEX_A15) */
diff --git a/libsel4bench/src/arch-arm/event_counters_cortexa8.c b/libsel4bench/src/arch-arm/cpu/cortex-a8/event_counters_cortexa8.c similarity index 94% rename from libsel4bench/src/arch-arm/event_counters_cortexa8.c rename to libsel4bench/src/arch-arm/cpu/cortex-a8/event_counters_cortexa8.c index 58bfa26..2b0f53c 100644 --- a/libsel4bench/src/arch-arm/event_counters_cortexa8.c +++ b/libsel4bench/src/arch-arm/cpu/cortex-a8/event_counters_cortexa8.c
@@ -8,11 +8,7 @@ * @TAG(NICTA_BSD) */ -#include <autoconf.h> - -#if defined(CONFIG_ARM_CORTEX_A8) - -#include "event_counters.h" +#include "../../event_counters.h" #define NAME_EVENT(id, name) EVENT_COUNTER_FORMAT(SEL4BENCH_CORTEXA8_EVENT_##id, name) @@ -54,5 +50,3 @@ { return ARRAY_SIZE(sel4bench_cpu_event_counter_data); } - -#endif /* defined(CONFIG_ARM_CORTEX_A8) */
diff --git a/libsel4bench/src/arch-arm/event_counters_cortexa9.c b/libsel4bench/src/arch-arm/cpu/cortex-a9/event_counters_cortexa9.c similarity index 95% rename from libsel4bench/src/arch-arm/event_counters_cortexa9.c rename to libsel4bench/src/arch-arm/cpu/cortex-a9/event_counters_cortexa9.c index d8e3a41..c25db15 100644 --- a/libsel4bench/src/arch-arm/event_counters_cortexa9.c +++ b/libsel4bench/src/arch-arm/cpu/cortex-a9/event_counters_cortexa9.c
@@ -8,11 +8,7 @@ * @TAG(NICTA_BSD) */ -#include <autoconf.h> - -#if defined(CONFIG_ARM_CORTEX_A9) - -#include "event_counters.h" +#include "../../event_counters.h" #define NAME_EVENT(id, name) EVENT_COUNTER_FORMAT(SEL4BENCH_CORTEXA9_EVENT_##id, name) @@ -63,5 +59,3 @@ { return ARRAY_SIZE(sel4bench_cpu_event_counter_data); } - -#endif /* defined(CONFIG_ARM_CORTEX_A9) */