From 44af01681058576b93a4de6fab09e616c7c333fb Mon Sep 17 00:00:00 2001 From: Dmitriy Korovkin Date: Fri, 4 Nov 2016 15:53:59 -0400 Subject: [PATCH] tests: Add configuration for small frequency dividers for system clock For systems that have both high base (CPU, bus, etc.) frequency and small divider of the base frequency for system clock and this way, do not allow 1 second period for the system clock, set the system clock period to 0.1. Change-Id: Iafb4604112d4adb8430f8bf57a5a31de3f6cf91d Signed-off-by: Dmitriy Korovkin --- tests/legacy/benchmark/latency_measure/Makefile | 11 ++++++++++- .../latency_measure/prj_small_freq_divider.conf | 10 ++++++++++ tests/legacy/benchmark/latency_measure/testcase.ini | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 tests/legacy/benchmark/latency_measure/prj_small_freq_divider.conf diff --git a/tests/legacy/benchmark/latency_measure/Makefile b/tests/legacy/benchmark/latency_measure/Makefile index 3ec95dde9c1..c71193f6c6b 100644 --- a/tests/legacy/benchmark/latency_measure/Makefile +++ b/tests/legacy/benchmark/latency_measure/Makefile @@ -1,5 +1,14 @@ MDEF_FILE = prj.mdef BOARD ?= qemu_x86 -CONF_FILE = prj.conf + +small_freq_divider_frdm_k64f=y +small_freq_divider_arduino_due=y +small_freq_divider_qemu_cortex_m3=y + +ifeq ($(small_freq_divider_$(BOARD)),y) + CONF_FILE = prj_small_freq_divider.conf +else + CONF_FILE = prj.conf +endif include ${ZEPHYR_BASE}/Makefile.inc diff --git a/tests/legacy/benchmark/latency_measure/prj_small_freq_divider.conf b/tests/legacy/benchmark/latency_measure/prj_small_freq_divider.conf new file mode 100644 index 00000000000..9a12d8278bb --- /dev/null +++ b/tests/legacy/benchmark/latency_measure/prj_small_freq_divider.conf @@ -0,0 +1,10 @@ +# needed for printf output sent to console +CONFIG_STDOUT_CONSOLE=y + +# eliminate timer interrupts during the benchmark +# for platforms that do not allow frequency dividers large enough to get +# system clock tick period in 1 sec, make system clock tick to 0.1 sec +CONFIG_SYS_CLOCK_TICKS_PER_SEC=10 + +# We use irq_offload(), enable it +CONFIG_IRQ_OFFLOAD=y diff --git a/tests/legacy/benchmark/latency_measure/testcase.ini b/tests/legacy/benchmark/latency_measure/testcase.ini index 3609d30092d..eeac2a6c499 100644 --- a/tests/legacy/benchmark/latency_measure/testcase.ini +++ b/tests/legacy/benchmark/latency_measure/testcase.ini @@ -1,4 +1,4 @@ [test] tags = benchmark -arch_whitelist = x86 +arch_whitelist = x86 arm