Btw, the same is true of adding any random "sanity checking". The point of
that thing was to simply only work when the PIT works as advertized, and
fail immediately if it doesn't. Even *if* you were to pick a big
calibration delay *and* if you happened to have a PIT that is broken and
doesn't wrap correctly, the design of the thing would mean that it would
then fail the calibration already.
Exactly because it would _see_ that it's not wrapping.
So then it returns zero, and the slow and complicated case can run.
Take a look at the generated assembly language. I literally wrote it so
that you could imagine that it's an old-time asm hacker that wrote the
asm. Don't screw it up.
Linus
--