tests/kernel/tickless: Remove use of CONFIG_TICKLESS_IDLE_THRESHOLD

This kconfig isn't actually exercised in this test, it's just being
used to compute some sleep durations.  Also I want it gone.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2021-03-03 13:08:34 -08:00 committed by Anas Nashif
commit d72b5d16a6
2 changed files with 7 additions and 9 deletions

View file

@ -1,5 +1,4 @@
CONFIG_ZTEST=y CONFIG_ZTEST=y
CONFIG_PM=y CONFIG_PM=y
CONFIG_TICKLESS_IDLE_THRESH=20
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100 CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
CONFIG_MP_NUM_CPUS=1 CONFIG_MP_NUM_CPUS=1

View file

@ -11,21 +11,20 @@
#define NUM_THREAD 4 #define NUM_THREAD 4
static K_THREAD_STACK_ARRAY_DEFINE(tstack, NUM_THREAD, STACK_SIZE); static K_THREAD_STACK_ARRAY_DEFINE(tstack, NUM_THREAD, STACK_SIZE);
static struct k_thread tdata[NUM_THREAD]; static struct k_thread tdata[NUM_THREAD];
/*for those not supporting tickless idle*/
#ifndef CONFIG_TICKLESS_IDLE #define IDLE_THRESH 20
#define CONFIG_TICKLESS_IDLE_THRESH 20
#endif
/*sleep duration tickless*/ /*sleep duration tickless*/
#define SLEEP_TICKLESS k_ticks_to_ms_floor64(CONFIG_TICKLESS_IDLE_THRESH) #define SLEEP_TICKLESS k_ticks_to_ms_floor64(IDLE_THRESH)
/*sleep duration with tick*/ /*sleep duration with tick*/
#define SLEEP_TICKFUL k_ticks_to_ms_floor64(CONFIG_TICKLESS_IDLE_THRESH - 1) #define SLEEP_TICKFUL k_ticks_to_ms_floor64(IDLE_THRESH - 1)
/*slice size is set as half of the sleep duration*/ /*slice size is set as half of the sleep duration*/
#define SLICE_SIZE k_ticks_to_ms_floor64(CONFIG_TICKLESS_IDLE_THRESH >> 1) #define SLICE_SIZE k_ticks_to_ms_floor64(IDLE_THRESH >> 1)
/*maximum slice duration accepted by the test*/ /*maximum slice duration accepted by the test*/
#define SLICE_SIZE_LIMIT k_ticks_to_ms_floor64((CONFIG_TICKLESS_IDLE_THRESH >> 1) + 1) #define SLICE_SIZE_LIMIT k_ticks_to_ms_floor64((IDLE_THRESH >> 1) + 1)
/*align to millisecond boundary*/ /*align to millisecond boundary*/
#if defined(CONFIG_ARCH_POSIX) #if defined(CONFIG_ARCH_POSIX)