zephyr/drivers/timer
Andy Ross 5f63c9d907 drivers/timer: Clamp after tick adjustment, not before
Some early tickless drivers had a common pattern where they would
compute a tick maximum for the request (i.e. the maximum the hardware
counter can handle) but apply it only on the input tick value and not
on the adjusted final value, opening up the overflow condition it was
supposed to have prevented.

Fixes #20939 (Strictly it fixes the specific pattern that was
discovered in that bug.  It's not impossible that other drivers with
alternative implementations have a similar issue, though they look OK
to me via a quick audit).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-27 18:43:53 +01:00
..
altera_avalon_timer_hal.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
apic_timer.c drivers: apic_timer: fix include of system_timer.h 2019-06-27 10:51:32 -07:00
arcv2_timer0.c drivers: timer: fix the bug for SMP 2019-11-13 12:04:18 -08:00
cc13x2_cc26x2_rtc_timer.c drivers/timer: Clamp after tick adjustment, not before 2019-11-27 18:43:53 +01:00
CMakeLists.txt driver: timer: st_stm32: add lptimer management to stm32xx series 2019-11-08 10:04:21 -06:00
cortex_m_systick.c drivers: timer: SysTick: enforce proper min & max SysTick LOAD values 2019-11-26 13:34:30 -06:00
hpet.c drivers/timer: Clamp after tick adjustment, not before 2019-11-27 18:43:53 +01:00
Kconfig driver: timer: st_stm32: add lptimer management to stm32xx series 2019-11-08 10:04:21 -06:00
Kconfig.stm32_lptim kconfig: Fix up newly-introduced copy-pasted headers 2019-11-19 15:25:08 -05:00
legacy_api.h license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
litex_timer.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
loapic_timer.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
mchp_xec_rtos_timer.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
native_posix_timer.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
nrf_rtc_timer.c drivers: timer: nrf_rtc_timer: fix lost ticks from unannounced elapsed 2019-11-26 08:23:50 -05:00
riscv_machine_timer.c drivers/timer: Clamp after tick adjustment, not before 2019-11-27 18:43:53 +01:00
rv32m1_lptmr_timer.c drivers: timer: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 2019-07-24 15:10:02 +02:00
sam0_rtc_timer.c drivers: timer: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 2019-07-24 15:10:02 +02:00
stm32_lptim_timer.c driver: timer: st_stm32: add lptimer management to stm32xx series 2019-11-08 10:04:21 -06:00
sys_clock_init.c include: move system timer headers to include/drivers/timer/ 2019-06-25 15:27:00 -04:00
xlnx_psttc_timer.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
xtensa_sys_timer.c drivers/timer: Clamp after tick adjustment, not before 2019-11-27 18:43:53 +01:00