From 674db4df9af78b67435412d074bc2b97bd266762 Mon Sep 17 00:00:00 2001 From: Chuck Jordan Date: Wed, 15 Feb 2017 19:54:55 -0800 Subject: [PATCH] test: repair test_tickless for ARC because _tsc_read is now present A _tsc_read has been added for ARC targets. This test can use that when ARC. See ZEP-1413 Change-Id: Ib63aecbe9f3eb2b97ad1086fc79b57e8f0774fca Signed-off-by: Chuck Jordan --- tests/legacy/kernel/test_tickless/microkernel/src/Makefile | 1 - .../kernel/test_tickless/microkernel/src/test_tickless.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/legacy/kernel/test_tickless/microkernel/src/Makefile b/tests/legacy/kernel/test_tickless/microkernel/src/Makefile index 722cfcaa7f0e..f29e6badb53b 100644 --- a/tests/legacy/kernel/test_tickless/microkernel/src/Makefile +++ b/tests/legacy/kernel/test_tickless/microkernel/src/Makefile @@ -2,4 +2,3 @@ ccflags-y += -I${ZEPHYR_BASE}/tests/include obj-y = test_tickless.o obj-$(CONFIG_ARM) += timestamps.o -obj-$(CONFIG_ARC) += timestamps.o diff --git a/tests/legacy/kernel/test_tickless/microkernel/src/test_tickless.c b/tests/legacy/kernel/test_tickless/microkernel/src/test_tickless.c index e3bda2d1a862..0f31a3e9b997 100644 --- a/tests/legacy/kernel/test_tickless/microkernel/src/test_tickless.c +++ b/tests/legacy/kernel/test_tickless/microkernel/src/test_tickless.c @@ -32,7 +32,7 @@ extern int32_t _sys_idle_threshold_ticks; * timestamp routines. */ -#if defined(CONFIG_X86) +#if defined(CONFIG_X86) || defined(CONFIG_ARC) typedef uint64_t _timer_res_t; #define _TIMER_ZERO 0ULL @@ -123,7 +123,7 @@ void ticklessTestTask(void) } cal_tsc /= CAL_REPS; -#if defined(CONFIG_X86) +#if defined(CONFIG_X86) || defined(CONFIG_ARC) printk("Calibrated time stamp period = 0x%x%x\n", (uint32_t)(cal_tsc >> 32), (uint32_t)(cal_tsc & 0xFFFFFFFFLL)); #elif defined(CONFIG_ARM) || defined(CONFIG_SOC_QUARK_SE_C1000_SS) @@ -160,7 +160,7 @@ void ticklessTestTask(void) printk("end ticks : %d\n", end_ticks); printk("diff ticks : %d\n", diff_ticks); -#if defined(CONFIG_X86) +#if defined(CONFIG_X86) || defined(CONFIG_ARC) printk("diff time stamp: 0x%x%x\n", (uint32_t)(diff_tsc >> 32), (uint32_t)(diff_tsc & 0xFFFFFFFFULL)); printk("Cal time stamp: 0x%x%x\n",