diff --git a/boards/arm/qemu_cortex_m3/Kconfig.defconfig b/boards/arm/qemu_cortex_m3/Kconfig.defconfig index 5fb001c4d19..d612dcb0417 100644 --- a/boards/arm/qemu_cortex_m3/Kconfig.defconfig +++ b/boards/arm/qemu_cortex_m3/Kconfig.defconfig @@ -7,10 +7,4 @@ config BUILD_OUTPUT_BIN config BOARD default "qemu_cortex_m3" -config TICKLESS_IDLE - default y - -config TICKLESS_KERNEL - default y - endif # BOARD_QEMU_CORTEX_M3 diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig index 5acb1d8d739..b0cac141473 100644 --- a/drivers/timer/Kconfig +++ b/drivers/timer/Kconfig @@ -132,6 +132,7 @@ config CORTEX_M_SYSTICK bool "Cortex-M SYSTICK timer" default y depends on CPU_HAS_SYSTICK + select TICKLESS_CAPABLE help This module implements a kernel device driver for the Cortex-M processor SYSTICK timer and provides the standard "system clock driver" interfaces. @@ -242,6 +243,16 @@ config SYSTEM_CLOCK_INIT_PRIORITY the clock to be running already, you should let the default value as it is (0). +config TICKLESS_CAPABLE + bool "Timer driver supports tickless operation" + help + Timer drivers should select this flag if they are capable of + supporting tickless operation. That is, a call to + z_clock_set_timeout() with a number of ticks greater than + one should be expected not to produce a call to + z_clock_announce() (really, not to produce an interrupt at + all) until the specified expiration. + config QEMU_TICKLESS_WORKAROUND bool "Disable tickless on qemu due to asynchrony bug" depends on QEMU_TARGET && TICKLESS_KERNEL diff --git a/kernel/Kconfig b/kernel/Kconfig index 75cc556742a..cd11f833b40 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -677,7 +677,7 @@ endmenu config TICKLESS_IDLE bool "Tickless idle" - default y if SYS_POWER_MANAGEMENT + default y if SYS_POWER_MANAGEMENT || TICKLESS_CAPABLE help This option suppresses periodic system clock interrupts whenever the kernel becomes idle. This permits the system to remain in a power @@ -696,7 +696,7 @@ config TICKLESS_IDLE_THRESH config TICKLESS_KERNEL bool "Tickless kernel" - default n + default y if TICKLESS_CAPABLE help This option enables a fully event driven kernel. Periodic system clock interrupt generation would be stopped at all times. This option