-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
random: remove rand32_timestamp.c #22951
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For illustration, here's some values reported by QEMU by this mechanism with icount enabled:
And when I switch to the rand32_timer.c, much better results:
I see no value in keeping this around. |
All checks are passing now. Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
This is a copy of rand32_timer.c that uses z_do_read_cpu_timestamp32() instead of k_cycle_get_32(), with some logic to ensure different values when called in rapid succession missing. Like the other driver, its reported values are not random, it's a testing generator only. This appears to have no advantages over rand32_timer.c, just remove it. In QEMU emulation, the reported TSC values tend to have the lowest five bits zeroed. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
andrewboie
force-pushed
the
random-x86-fix
branch
from
February 19, 2020 18:21
5f4c13e
to
ca38ff4
Compare
7 tasks
dcpleung
approved these changes
Feb 19, 2020
dleach02
approved these changes
Feb 19, 2020
wentongwu
approved these changes
Feb 20, 2020
ceolin
approved these changes
Feb 20, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a copy of rand32_timer.c that uses
z_do_read_cpu_timestamp32() instead of k_cycle_get_32(),
with some logic to ensure different values when called in
rapid succession missing.
Like the other driver, its reported values are not random,
it's a testing generator only.
This appears to have no advantages over rand32_timer.c,
just remove it. In QEMU emulation, the reported TSC values
tend to have the lowest five bits zeroed.
Signed-off-by: Andrew Boie andrew.p.boie@intel.com