Attention is currently required from: Peter Marheine, Thomas Heijligen.
Hello Thomas Heijligen, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/81545?usp=email
to look at the new patch set (#2).
Change subject: udelay: only use OS time for delays, except on DOS ......................................................................
udelay: only use OS time for delays, except on DOS
As proposed on the mailing list ("RFC: remove the calibrated delay loop"), this removes the calibrated delay loop and uses OS-based timing functions for all delays because the calibrated delay loop can delay for shorter times than intended.
When sleeping this now uses nanosleep() if available, and otherwise usleep(). When busy-looping, it uses clock_gettime() with CLOCK_MONOTONIC or CLOCK_REALTIME depending on availability, and gettimeofday() otherwise.
The calibrated delay loop is retained for DOS only, because timer resolution on DJGPP is only about 50 milliseconds. Since typical delays in flashrom are around 10 microseconds, using OS timing there would regress performance by around 500x. The old implementation is reused with some branches removed based on the knowledge that timer resolution will not be better than about 50 milliseconds.
Signed-off-by: Peter Marheine pmarheine@chromium.org Change-Id: I7ac5450d194a475143698d65d64d8bcd2fd25e3f --- M Makefile M include/programmer.h M libflashrom.c M meson.build M udelay.c A udelay_dos.c 6 files changed, 203 insertions(+), 171 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/45/81545/2