Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: timer: nrf_rtc: fix TICKLESS=n processing #25412

Merged
merged 1 commit into from
May 19, 2020

Conversation

pabigot
Copy link
Collaborator

@pabigot pabigot commented May 18, 2020

Some kernel tests use CONFIG_TICKLESS_KERNEL=n with
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1 to detect when a test runs longer
than 1 second. These tests break if a tick is announced every time a
timeout occurs. Only announce if the measured duration since the last
tick is at least the duration of a tick.

Fixes #24660

@zephyrbot
Copy link
Collaborator

zephyrbot commented May 18, 2020

All checks passed.

checkpatch (informational only, not a failure)

-:10: WARNING:LONG_LINE: line over 80 characters
#10: FILE: drivers/timer/nrf_rtc_timer.c:180:
+	z_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? dticks : (dticks > 0));

- total: 0 errors, 1 warnings, 8 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Your patch has style problems, please review.

NOTE: Ignored message types: AVOID_EXTERNS BRACES CONFIG_EXPERIMENTAL CONST_STRUCT DATE_TIME FILE_PATH_CHANGES MINMAX NETWORKING_BLOCK_COMMENT_STYLE PRINTK_WITHOUT_KERN_LEVEL SPDX_LICENSE_TAG SPLIT_STRING VOLATILE

NOTE: If any of the errors are false positives, please report
      them to the maintainers.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

@pabigot pabigot requested a review from carlescufi May 18, 2020 14:29
Some kernel tests use `CONFIG_TICKLESS_KERNEL=n` with
`CONFIG_SYS_CLOCK_TICKS_PER_SEC=1` to detect when a test runs longer
than 1 second.  These tests break if a tick is announced every time a
timeout occurs.  Only announce if the measured duration since the last
tick is at least the duration of a tick.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
@pabigot pabigot force-pushed the nordic/20200518a branch from 3f4dabd to f4c15fb Compare May 18, 2020 14:36
@pabigot pabigot requested a review from ioannisg May 18, 2020 15:09
@carlescufi carlescufi merged commit ec55314 into zephyrproject-rtos:master May 19, 2020
@pabigot pabigot deleted the nordic/20200518a branch May 26, 2020 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests/benchmarks/sys_kernel failed on nrf platforms
4 participants